diff --git a/grudge/models/wave.py b/grudge/models/wave.py index a8b5470070c528fe681bd13702390f1ab58fa498..36a90424a667524ed374febc56eceaa0ad42d66e 100644 --- a/grudge/models/wave.py +++ b/grudge/models/wave.py @@ -220,7 +220,7 @@ class VariableCoefficientWeakWaveOperator(HyperbolicOperator): self.source_f = source_f ones = dcoll.zeros(actx) + 1 - self.sign = freeze(actx.np.where(c > 0, ones, -ones)) + self.sign = freeze(actx.np.where(actx.np.greater(c, 0), ones, -ones)) self.dirichlet_tag = dirichlet_tag self.neumann_tag = neumann_tag @@ -338,7 +338,7 @@ class VariableCoefficientWeakWaveOperator(HyperbolicOperator): self.radiation_tag]) def max_characteristic_velocity(self, actx, **kwargs): - return actx.np.fabs(thaw(self.c, actx)) + return actx.np.abs(thaw(self.c, actx)) # }}} diff --git a/grudge/shortcuts.py b/grudge/shortcuts.py index a3561bcbeedaaaafe56e5979a5eb5c9c004e4f54..d9e5fe1faf26e245e2b4a74b3f68293be51e2293 100644 --- a/grudge/shortcuts.py +++ b/grudge/shortcuts.py @@ -23,7 +23,7 @@ THE SOFTWARE. """ -def set_up_rk4(field_var_name, dt, fields, rhs, t_start=0): +def set_up_rk4(field_var_name, dt, fields, rhs, t_start=0.0): from leap.rk import LSRK4MethodBuilder from dagrt.codegen import PythonCodeGenerator