Skip to content

Commit

Permalink
Fix signs for hyperdiffusion coefficient
Browse files Browse the repository at this point in the history
  • Loading branch information
Ceyron committed May 24, 2024
1 parent 6b6f275 commit 6c57f93
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apebench/scenarios/physical/_special_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand All @@ -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,
)

Expand Down

0 comments on commit 6c57f93

Please sign in to comment.