From 6c57f93abfcad102ed003102998a0370244a3b60 Mon Sep 17 00:00:00 2001 From: Felix Koehler Date: Fri, 24 May 2024 08:49:11 +0200 Subject: [PATCH] Fix signs for hyperdiffusion coefficient --- apebench/scenarios/physical/_special_linear.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apebench/scenarios/physical/_special_linear.py b/apebench/scenarios/physical/_special_linear.py index 07dcb0b..6dd1972 100644 --- a/apebench/scenarios/physical/_special_linear.py +++ b/apebench/scenarios/physical/_special_linear.py @@ -195,7 +195,8 @@ def get_ref_stepper(self) -> ex.BaseStepper: domain_extent=self.domain_extent, num_points=self.num_points, dt=self.dt, - hyper_diffusivity=self.hyp_diffusion_coef, + # Need minus to match the sign of the diffusion coefficient + hyper_diffusivity=-self.hyp_diffusion_coef, diffuse_on_diffuse=True, ) @@ -205,7 +206,8 @@ def get_coarse_stepper(self) -> ex.BaseStepper: domain_extent=self.domain_extent, num_points=self.num_points, dt=self.dt * self.coarse_proportion, - hyper_diffusivity=self.hyp_diffusion_coef, + # Need minus to match the sign of the diffusion coefficient + hyper_diffusivity=-self.hyp_diffusion_coef, diffuse_on_diffuse=True, )