diff --git a/grudge/models/__init__.py b/grudge/models/__init__.py index 3fb254b963ac4f3f1401a742ea11d0b5ba98ff18..997207d18be7f02ec29231298cc53c8cfdf7f2db 100644 --- a/grudge/models/__init__.py +++ b/grudge/models/__init__.py @@ -39,8 +39,10 @@ class HyperbolicOperator(Operator): """A base class for hyperbolic Discontinuous Galerkin operators.""" @abstractmethod - def max_eigenvalue(self, t, fields, dcoll): - """Return an upperbound on the maximal eigenvalue for the operator.""" + def max_characteristic_velocity(self, t, fields, dcoll): + """Return an upper bound on the characteristic + velocities of the operator. + """ def estimate_rk4_timestep(self, dcoll, t=None, fields=None, dt_scaling=None): """Estimate the largest stable timestep for an RK4 method.""" @@ -48,7 +50,7 @@ class HyperbolicOperator(Operator): from grudge.dt_utils import (dt_non_geometric_factor, dt_geometric_factor) - max_lambda = self.max_eigenvalue(t, fields, dcoll) + max_lambda = self.max_characteristic_velocity(t, fields, dcoll) dt_factor = \ (dt_non_geometric_factor(dcoll, scaling=dt_scaling) * dt_geometric_factor(dcoll)) diff --git a/grudge/models/advection.py b/grudge/models/advection.py index 95baf5545468764dfa7700aca29c841af5ddcc33..2469498aef61fff823d794123992f586cfa1cb39 100644 --- a/grudge/models/advection.py +++ b/grudge/models/advection.py @@ -84,7 +84,7 @@ class AdvectionOperatorBase(HyperbolicOperator): def weak_flux(self, u_tpair): return advection_weak_flux(self.dcoll, self.flux_type, u_tpair, self.v) - def max_eigenvalue(self, t=None, fields=None, dcoll=None): + def max_characteristic_velocity(self, t=None, fields=None, dcoll=None): return op.norm(self.dcoll, self.v, 2) diff --git a/grudge/models/em.py b/grudge/models/em.py index f56ca991d3e61485322f2fece95aa805cb27c901..5dcc40933885a55dbcb26ad0b46894c29974b9f5 100644 --- a/grudge/models/em.py +++ b/grudge/models/em.py @@ -332,7 +332,7 @@ class MaxwellOperator(HyperbolicOperator): """ return 6*(True,) - def max_eigenvalue_expr(self): + def max_characteristic_vel_expr(self): """Return the largest eigenvalue of Maxwell's equations as a hyperbolic system. """ @@ -344,14 +344,16 @@ class MaxwellOperator(HyperbolicOperator): return op.nodal_max(self.dcoll, "vol", 1 / actx.np.sqrt(self.epsilon * self.mu)) - def max_eigenvalue(self, t, fields=None, discr=None, context=None): + def max_characteristic_velocity(self, t, fields=None, discr=None, context=None): if context is None: context = {} if self.fixed_material: - return self.max_eigenvalue_expr() + return self.max_characteristic_vel_expr() else: - raise ValueError("max_eigenvalue is no longer supported for " - "variable-coefficient problems--use max_eigenvalue_expr") + raise ValueError( + "max_characteristic_velocity is no longer supported for " + "variable-coefficient problems--use max_characteristic_vel_expr" + ) def check_bc_coverage(self, mesh): from meshmode.mesh import check_bc_coverage diff --git a/grudge/models/wave.py b/grudge/models/wave.py index 5001b0b224aee1d72fc479113dd61cbc22463e62..e101fd0443918c3cbb3b5f530a002ff2437578fd 100644 --- a/grudge/models/wave.py +++ b/grudge/models/wave.py @@ -175,7 +175,7 @@ class WeakWaveOperator(HyperbolicOperator): self.neumann_tag, self.radiation_tag]) - def max_eigenvalue(self, t, fields=None, dcoll=None): + def max_characteristic_velocity(self, t, fields=None, dcoll=None): return abs(self.c) @@ -331,7 +331,7 @@ class VariableCoefficientWeakWaveOperator(HyperbolicOperator): self.neumann_tag, self.radiation_tag]) - def max_eigenvalue(self, t, fields=None, dcoll=None): + def max_characteristic_velocity(self, t, fields=None, dcoll=None): actx = self.dcoll._setup_actx return op.nodal_max(self.dcoll, "vol", actx.np.fabs(self.c))