diff --git a/examples/wave/wave-min.py b/examples/wave/wave-min.py index d6dd94ff552c16986e1338c88b63f4df0cc88ca0..28b1911088bd2d0aa321ed746acb7b69009a324d 100644 --- a/examples/wave/wave-min.py +++ b/examples/wave/wave-min.py @@ -47,7 +47,7 @@ def main(write_output=True): sym_source_center_dist = sym_x - source_center from grudge.models.wave import StrongWaveOperator - from grudge.mesh import TAG_ALL, TAG_NONE + from meshmode.mesh import BTAG_ALL, BTAG_NONE op = StrongWaveOperator(-0.1, discr.dimensions, source_f=( sym.CFunction("sin")(source_omega*sym.ScalarParameter("t")) diff --git a/grudge/models/em.py b/grudge/models/em.py index 3929c6ac399a6f4fd5d2d121f5ca7360946465f9..3575e4253a40f5034c4b793c8ebbd5c216e9036b 100644 --- a/grudge/models/em.py +++ b/grudge/models/em.py @@ -49,10 +49,10 @@ class MaxwellOperator(HyperbolicOperator): def __init__(self, epsilon, mu, flux_type, bdry_flux_type=None, - pec_tag=grudge.mesh.TAG_ALL, - pmc_tag=grudge.mesh.TAG_NONE, - absorb_tag=grudge.mesh.TAG_NONE, - incident_tag=grudge.mesh.TAG_NONE, + pec_tag=BTAG_ALL, + pmc_tag=BTAG_NONE, + absorb_tag=BTAG_NONE, + incident_tag=BTAG_NONE, incident_bc=lambda maxwell_op, e, h: 0, current=0, dimensions=None): """ :arg flux_type: can be in [0,1] for anything between central and upwind, @@ -294,7 +294,7 @@ class MaxwellOperator(HyperbolicOperator): e, h = self.split_eh(self.field_placeholder(w)) if not self.fixed_material: from warnings import warn - if self.incident_tag != grudge.mesh.TAG_NONE: + if self.incident_tag != BTAG_NONE: warn("Incident boundary conditions assume homogeneous" " background material, results may be unphysical") diff --git a/grudge/models/wave.py b/grudge/models/wave.py index 5c0f3a323ffc8db273a3694e4e080cd9c5dc808b..f483e9214d0e4ba3f5e5468cec3acb268a35eae1 100644 --- a/grudge/models/wave.py +++ b/grudge/models/wave.py @@ -28,9 +28,9 @@ THE SOFTWARE. import numpy as np -import grudge.mesh from grudge.models import HyperbolicOperator from grudge.second_order import CentralSecondDerivative +from meshmode.mesh import BTAG_ALL, BTAG_NONE # {{{ constant-velocity @@ -55,10 +55,10 @@ class StrongWaveOperator(HyperbolicOperator): def __init__(self, c, dimensions, source_f=0, flux_type="upwind", - dirichlet_tag=grudge.mesh.TAG_ALL, + dirichlet_tag=BTAG_ALL, dirichlet_bc_f=0, - neumann_tag=grudge.mesh.TAG_NONE, - radiation_tag=grudge.mesh.TAG_NONE): + neumann_tag=BTAG_NONE, + radiation_tag=BTAG_NONE): assert isinstance(dimensions, int) self.c = c @@ -218,9 +218,9 @@ class VariableVelocityStrongWaveOperator(HyperbolicOperator): def __init__( self, c, dimensions, source=0, flux_type="upwind", - dirichlet_tag=grudge.mesh.TAG_ALL, - neumann_tag=grudge.mesh.TAG_NONE, - radiation_tag=grudge.mesh.TAG_NONE, + dirichlet_tag=BTAG_ALL, + neumann_tag=BTAG_NONE, + radiation_tag=BTAG_NONE, time_sign=1, diffusion_coeff=None, diffusion_scheme=CentralSecondDerivative() diff --git a/grudge/symbolic/primitives.py b/grudge/symbolic/primitives.py index aba3c746ba6ac91a70cf1a83bc348203e20827a0..8ce50cc8fb12abaf23f9aa8d3305cf0312694260 100644 --- a/grudge/symbolic/primitives.py +++ b/grudge/symbolic/primitives.py @@ -136,7 +136,7 @@ class BoundaryPair(LeafBase): application of boundary fluxes. """ - def __init__(self, field, bfield, tag=grudge.mesh.TAG_ALL): + def __init__(self, field, bfield, tag=BTAG_ALL): self.field = field self.bfield = bfield self.tag = tag