Skip to content

Commit

Permalink
Change interface to difficulty steppers
Browse files Browse the repository at this point in the history
  • Loading branch information
Ceyron committed Mar 27, 2024
1 parent 11287f5 commit 932c86f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions exponax/normalized/_convection.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ class DifficultyConvectionStepper(NormalizedConvectionStepper):

def __init__(
self,
num_spatial_dims: int = 1,
num_points: int = 48,
*,
linear_difficulties: tuple[float, ...] = (0.0, 0.0, 4.5),
convection_difficulty: float = 5.0,
num_spatial_dims: int = 1,
num_points: int = 48,
maximum_absolute: float = 1.0,
order: int = 2,
dealiasing_fraction: float = 2 / 3,
Expand Down
8 changes: 4 additions & 4 deletions exponax/normalized/_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ class DifficultyLinearStepper(NormalizedLinearStepper):

def __init__(
self,
*,
difficulties: tuple[float, ...] = (0.0, -2.0),
num_spatial_dims: int = 1,
num_points: int = 48,
*,
difficulties: tuple[float, ...] = (0.0, -2.0),
):
"""
By default: Advection equation with CFL number 2 on 48 points resolution
Expand All @@ -84,11 +84,11 @@ def __init__(
class DiffultyLinearStepperSimple(DifficultyLinearStepper):
def __init__(
self,
num_spatial_dims: int = 1,
num_points: int = 48,
*,
difficulty: float = -2.0,
order: int = 1,
num_spatial_dims: int = 1,
num_points: int = 48,
):
difficulties = (0.0,) * (order - 1) + (difficulty,)
super().__init__(
Expand Down

0 comments on commit 932c86f

Please sign in to comment.