Skip to content

Reaction-Diffusion Scenarios in normalized Mode¤

apebench.scenarios.normalized.FisherKPP ¤

Bases: Nonlinear

Source code in apebench/scenarios/normalized/_nonlinear.py
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
class FisherKPP(Nonlinear):
    quadratic_beta: float = -0.02
    drag_alpha: float = 0.02
    diffusion_alpha: float = 4e-6

    ic_config: str = "clamp;0.0;1.0;fourier;5;false;false"  # Overwrite

    def __post_init__(self):
        self.alphas = (self.drag_alpha, 0.0, self.diffusion_alpha, 0.0, 0.0)
        self.betas = (self.quadratic_beta, 0.0, 0.0)

        super().__post_init__()

    def get_scenario_name(self) -> str:
        return f"{self.num_spatial_dims}d_norm_fisher"
quadratic_beta class-attribute instance-attribute ¤
quadratic_beta: float = -0.02
drag_alpha class-attribute instance-attribute ¤
drag_alpha: float = 0.02
diffusion_alpha class-attribute instance-attribute ¤
diffusion_alpha: float = 4e-06
ic_config class-attribute instance-attribute ¤
ic_config: str = 'clamp;0.0;1.0;fourier;5;false;false'
__post_init__ ¤
__post_init__()
Source code in apebench/scenarios/normalized/_nonlinear.py
118
119
120
121
122
def __post_init__(self):
    self.alphas = (self.drag_alpha, 0.0, self.diffusion_alpha, 0.0, 0.0)
    self.betas = (self.quadratic_beta, 0.0, 0.0)

    super().__post_init__()
get_scenario_name ¤
get_scenario_name() -> str
Source code in apebench/scenarios/normalized/_nonlinear.py
124
125
def get_scenario_name(self) -> str:
    return f"{self.num_spatial_dims}d_norm_fisher"