Skip to content

Commit

Permalink
Support multiple volumes in a discretization collection
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Mar 17, 2022
1 parent ef39455 commit 752aa81
Show file tree
Hide file tree
Showing 20 changed files with 1,358 additions and 690 deletions.
1 change: 1 addition & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def get_version():
"https://documen.tician.de/arraycontext/": None,
"https://documen.tician.de/meshmode/": None,
"https://documen.tician.de/loopy/": None,
"https://mpi4py.readthedocs.io/en/stable": None,
}

# index-page demo uses pyopencl via plot_directive
Expand Down
6 changes: 4 additions & 2 deletions examples/old_symbolics/dagrt-fusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -1206,15 +1206,17 @@ def problem_stats(order=3):
with open_output_file("grudge-problem-stats.txt") as outf:
_, dg_discr_2d = get_wave_op_with_discr(
actx, dims=2, order=order)
print("Number of 2D elements:", dg_discr_2d.mesh.nelements, file=outf)
mesh_2d = dg_discr_2d.discr_from_dd("vol").mesh
print("Number of 2D elements:", mesh_2d.nelements, file=outf)
vol_discr_2d = dg_discr_2d.discr_from_dd("vol")
dofs_2d = {group.nunit_dofs for group in vol_discr_2d.groups}
from pytools import one
print("Number of DOFs per 2D element:", one(dofs_2d), file=outf)

_, dg_discr_3d = get_wave_op_with_discr(
actx, dims=3, order=order)
print("Number of 3D elements:", dg_discr_3d.mesh.nelements, file=outf)
mesh_3d = dg_discr_3d.discr_from_dd("vol").mesh
print("Number of 3D elements:", mesh_3d.nelements, file=outf)
vol_discr_3d = dg_discr_3d.discr_from_dd("vol")
dofs_3d = {group.nunit_dofs for group in vol_discr_3d.groups}
from pytools import one
Expand Down
5 changes: 3 additions & 2 deletions grudge/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
import grudge.symbolic as sym
from grudge.execution import bind

from grudge.discretization import DiscretizationCollection
from grudge.discretization import (
DiscretizationCollection, make_discretization_collection)

__all__ = [
"sym", "bind", "DiscretizationCollection"
"sym", "bind", "DiscretizationCollection", "make_discretization_collection"
]
Loading

0 comments on commit 752aa81

Please sign in to comment.