Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
521388e
add multi-volume support
majosm Aug 11, 2022
d7f83ce
deprecate mpi_communicator argument in create_discretization_collection
majosm Aug 15, 2022
5988087
Merge remote-tracking branch 'origin/main' into multi-volume
majosm Aug 29, 2022
53965f4
Merge remote-tracking branch 'origin/main' into multi-volume
majosm Sep 1, 2022
ed2be88
don't depend on full grudge multi-volume support yet
majosm Aug 26, 2022
191d7ca
change grudge branch
majosm Aug 30, 2022
6b475f9
use new DOFDesc methods
majosm Aug 30, 2022
e861f11
clean up some DOFDesc stuff
majosm Aug 30, 2022
85e8dcb
tweak indepedent volumes test
majosm Aug 31, 2022
d3d42c8
Merge remote-tracking branch 'origin/main' into multi-volume
majosm Sep 7, 2022
ec7a340
Merge remote-tracking branch 'origin/main' into multi-volume
majosm Sep 13, 2022
07405f9
add multiple independent volume example
majosm Aug 31, 2022
a6940d2
add missing btag -> bdtag promotion in euler_operator
majosm Sep 7, 2022
fd3c2c4
unify dd naming
majosm Sep 1, 2022
ef3863e
add missing dd argument to get_inviscid_timestep
majosm Sep 6, 2022
4aa83f1
remove deprecated +=
majosm Sep 7, 2022
8c7de8a
add missing btag -> bdtag promotion in make_operator_fluid_states
majosm Sep 7, 2022
1d235ee
wrap btag -> bdtag promotion into a function
majosm Sep 7, 2022
3dfca1b
fix doc build issue
majosm Sep 16, 2022
bbfbd77
clarify what multiple-volumes example does
majosm Sep 16, 2022
17090ab
clarify solution setup in test_independent_volumes
majosm Sep 16, 2022
ab0ecc6
group euler imports
majosm Sep 16, 2022
0280f0d
set grudge branch
majosm Sep 19, 2022
6cc3fb1
Merge remote-tracking branch 'origin/main' into multi-volume
majosm Sep 19, 2022
401fd23
Merge remote-tracking branch 'origin/main' into multi-volume
majosm Sep 20, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,8 @@
rst_prolog = """
.. |mirgecom| replace:: *MIRGE-Com*
"""

# FIXME: Remove when grudge#280 gets merged
nitpick_ignore_regex = [
("py:class", r".*BoundaryDomainTag.*"),
]
6 changes: 2 additions & 4 deletions examples/autoignition-mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ def main(actx_class, ctx_factory=cl.create_some_context, use_logmgr=True,
generate_mesh)
local_nelements = local_mesh.nelements

dcoll = create_discretization_collection(actx, local_mesh, order=order,
mpi_communicator=comm)
dcoll = create_discretization_collection(actx, local_mesh, order=order)
nodes = actx.thaw(dcoll.nodes())
ones = dcoll.zeros(actx) + 1.0

Expand Down Expand Up @@ -320,8 +319,7 @@ def get_fluid_state(cv, tseed):
else:
rst_cv = restart_data["cv"]
old_dcoll = \
create_discretization_collection(actx, local_mesh, order=rst_order,
mpi_communicator=comm)
create_discretization_collection(actx, local_mesh, order=rst_order)
from meshmode.discretization.connection import make_same_mesh_connection
connection = make_same_mesh_connection(actx, dcoll.discr_from_dd("vol"),
old_dcoll.discr_from_dd("vol"))
Expand Down
25 changes: 12 additions & 13 deletions examples/doublemach-mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from functools import partial

from meshmode.mesh import BTAG_ALL, BTAG_NONE # noqa
from grudge.dof_desc import DTAG_BOUNDARY
from grudge.dof_desc import BoundaryDomainTag
from grudge.shortcuts import make_visualizer


Expand Down Expand Up @@ -192,8 +192,7 @@ def main(ctx_factory=cl.create_some_context, use_logmgr=True,

from mirgecom.discretization import create_discretization_collection
order = 3
dcoll = create_discretization_collection(actx, local_mesh, order=order,
mpi_communicator=comm)
dcoll = create_discretization_collection(actx, local_mesh, order=order)
nodes = actx.thaw(dcoll.nodes())

from grudge.dof_desc import DISCR_TAG_QUAD
Expand Down Expand Up @@ -237,22 +236,22 @@ def main(ctx_factory=cl.create_some_context, use_logmgr=True,
eos = IdealSingleGas()
gas_model = GasModel(eos=eos, transport=transport_model)

def _boundary_state(dcoll, btag, gas_model, state_minus, **kwargs):
def _boundary_state(dcoll, dd_bdry, gas_model, state_minus, **kwargs):
actx = state_minus.array_context
bnd_discr = dcoll.discr_from_dd(btag)
bnd_discr = dcoll.discr_from_dd(dd_bdry)
nodes = actx.thaw(bnd_discr.nodes())
return make_fluid_state(initializer(x_vec=nodes, eos=gas_model.eos,
**kwargs), gas_model)

boundaries = {
DTAG_BOUNDARY("ic1"):
PrescribedFluidBoundary(boundary_state_func=_boundary_state),
DTAG_BOUNDARY("ic2"):
PrescribedFluidBoundary(boundary_state_func=_boundary_state),
DTAG_BOUNDARY("ic3"):
PrescribedFluidBoundary(boundary_state_func=_boundary_state),
DTAG_BOUNDARY("wall"): AdiabaticNoslipMovingBoundary(),
DTAG_BOUNDARY("out"): AdiabaticNoslipMovingBoundary(),
BoundaryDomainTag("ic1"):
PrescribedFluidBoundary(boundary_state_func=_boundary_state),
BoundaryDomainTag("ic2"):
PrescribedFluidBoundary(boundary_state_func=_boundary_state),
BoundaryDomainTag("ic3"):
PrescribedFluidBoundary(boundary_state_func=_boundary_state),
BoundaryDomainTag("wall"): AdiabaticNoslipMovingBoundary(),
BoundaryDomainTag("out"): AdiabaticNoslipMovingBoundary(),
}

if rst_filename:
Expand Down
9 changes: 4 additions & 5 deletions examples/heat-source-mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from meshmode.mesh import BTAG_ALL, BTAG_NONE # noqa
import grudge.op as op
from grudge.shortcuts import make_visualizer
from grudge.dof_desc import DTAG_BOUNDARY
from grudge.dof_desc import BoundaryDomainTag
from mirgecom.discretization import create_discretization_collection
from mirgecom.integrators import rk4_step
from mirgecom.diffusion import (
Expand Down Expand Up @@ -111,8 +111,7 @@ def main(actx_class, ctx_factory=cl.create_some_context, use_logmgr=True,

order = 3

dcoll = create_discretization_collection(actx, local_mesh, order=order,
mpi_communicator=comm)
dcoll = create_discretization_collection(actx, local_mesh, order=order)

if dim == 2:
# no deep meaning here, just a fudge factor
Expand All @@ -125,8 +124,8 @@ def main(actx_class, ctx_factory=cl.create_some_context, use_logmgr=True,
nodes = actx.thaw(dcoll.nodes())

boundaries = {
DTAG_BOUNDARY("dirichlet"): DirichletDiffusionBoundary(0.),
DTAG_BOUNDARY("neumann"): NeumannDiffusionBoundary(0.)
BoundaryDomainTag("dirichlet"): DirichletDiffusionBoundary(0.),
BoundaryDomainTag("neumann"): NeumannDiffusionBoundary(0.)
}

u = dcoll.zeros(actx)
Expand Down
27 changes: 13 additions & 14 deletions examples/hotplate-mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from meshmode.mesh import BTAG_ALL, BTAG_NONE # noqa

from grudge.shortcuts import make_visualizer
from grudge.dof_desc import DTAG_BOUNDARY
from grudge.dof_desc import BoundaryDomainTag

from mirgecom.discretization import create_discretization_collection
from mirgecom.fluid import make_conserved
Expand Down Expand Up @@ -168,9 +168,7 @@ def main(ctx_factory=cl.create_some_context, use_logmgr=True,
local_nelements = local_mesh.nelements

order = 1
dcoll = create_discretization_collection(
actx, local_mesh, order=order, mpi_communicator=comm
)
dcoll = create_discretization_collection(actx, local_mesh, order=order)
nodes = actx.thaw(dcoll.nodes())

if logmgr:
Expand Down Expand Up @@ -221,21 +219,22 @@ def tramp_2d(x_vec, eos, cv=None, **kwargs):

exact = initializer(x_vec=nodes, eos=gas_model.eos)

def _boundary_state(dcoll, btag, gas_model, state_minus, **kwargs):
def _boundary_state(dcoll, dd_bdry, gas_model, state_minus, **kwargs):
actx = state_minus.array_context
bnd_discr = dcoll.discr_from_dd(btag)
bnd_discr = dcoll.discr_from_dd(dd_bdry)
nodes = actx.thaw(bnd_discr.nodes())
return make_fluid_state(initializer(x_vec=nodes, eos=gas_model.eos,
**kwargs), gas_model)

boundaries = {DTAG_BOUNDARY("-1"):
PrescribedFluidBoundary(boundary_state_func=_boundary_state),
DTAG_BOUNDARY("+1"):
PrescribedFluidBoundary(boundary_state_func=_boundary_state),
DTAG_BOUNDARY("-2"): IsothermalNoSlipBoundary(
wall_temperature=bottom_boundary_temperature),
DTAG_BOUNDARY("+2"): IsothermalNoSlipBoundary(
wall_temperature=top_boundary_temperature)}
boundaries = {
BoundaryDomainTag("-1"): PrescribedFluidBoundary(
boundary_state_func=_boundary_state),
BoundaryDomainTag("+1"): PrescribedFluidBoundary(
boundary_state_func=_boundary_state),
BoundaryDomainTag("-2"): IsothermalNoSlipBoundary(
wall_temperature=bottom_boundary_temperature),
BoundaryDomainTag("+2"): IsothermalNoSlipBoundary(
wall_temperature=top_boundary_temperature)}

if rst_filename:
current_t = restart_data["t"]
Expand Down
8 changes: 3 additions & 5 deletions examples/lump-mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ def main(actx_class, ctx_factory=cl.create_some_context, use_logmgr=True,
local_nelements = local_mesh.nelements

order = 3
dcoll = create_discretization_collection(
actx, local_mesh, order=order, mpi_communicator=comm
)
dcoll = create_discretization_collection(actx, local_mesh, order=order)
nodes = actx.thaw(dcoll.nodes())

vis_timer = None
Expand Down Expand Up @@ -180,9 +178,9 @@ def main(actx_class, ctx_factory=cl.create_some_context, use_logmgr=True,
from mirgecom.gas_model import GasModel, make_fluid_state
gas_model = GasModel(eos=eos)

def boundary_solution(dcoll, btag, gas_model, state_minus, **kwargs):
def boundary_solution(dcoll, dd_bdry, gas_model, state_minus, **kwargs):
actx = state_minus.array_context
bnd_discr = dcoll.discr_from_dd(btag)
bnd_discr = dcoll.discr_from_dd(dd_bdry)
nodes = actx.thaw(bnd_discr.nodes())
return make_fluid_state(initializer(x_vec=nodes, eos=gas_model.eos,
**kwargs), gas_model)
Expand Down
8 changes: 3 additions & 5 deletions examples/mixture-mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ def main(actx_class, ctx_factory=cl.create_some_context, use_logmgr=True,
local_nelements = local_mesh.nelements

order = 3
dcoll = create_discretization_collection(
actx, local_mesh, order=order, mpi_communicator=comm
)
dcoll = create_discretization_collection(actx, local_mesh, order=order)
nodes = actx.thaw(dcoll.nodes())

vis_timer = None
Expand Down Expand Up @@ -202,9 +200,9 @@ def main(actx_class, ctx_factory=cl.create_some_context, use_logmgr=True,
initializer = MixtureInitializer(dim=dim, nspecies=nspecies,
massfractions=y0s, velocity=velocity)

def boundary_solution(dcoll, btag, gas_model, state_minus, **kwargs):
def boundary_solution(dcoll, dd_bdry, gas_model, state_minus, **kwargs):
actx = state_minus.array_context
bnd_discr = dcoll.discr_from_dd(btag)
bnd_discr = dcoll.discr_from_dd(dd_bdry)
nodes = actx.thaw(bnd_discr.nodes())
return make_fluid_state(initializer(x_vec=nodes, eos=gas_model.eos,
**kwargs), gas_model,
Expand Down
1 change: 1 addition & 0 deletions examples/multiple-volumes-mpi-lazy.py
Loading