Skip to content

Reaction-Diffusion Scenarios in Difficulty Mode¤

apebench.scenarios.difficulty.FisherKPP ¤

Bases: Nonlinear

Source code in apebench/scenarios/difficulty/_nonlinear.py
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
class FisherKPP(Nonlinear):
    quadratic_delta: float = -0.02
    drag_gamma: float = 0.02
    diffusion_gamma: float = 0.2

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

    def __post_init__(self):
        self.gammas = (self.drag_gamma, 0.0, self.diffusion_gamma)
        self.deltas = (self.quadratic_delta, 0.0, 0.0)

        super().__post_init__()

    def get_scenario_name(self) -> str:
        return f"{self.num_spatial_dims}d_diff_fisher"
quadratic_delta class-attribute instance-attribute ¤
quadratic_delta: float = -0.02
drag_gamma class-attribute instance-attribute ¤
drag_gamma: float = 0.02
diffusion_gamma class-attribute instance-attribute ¤
diffusion_gamma: float = 0.2
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/difficulty/_nonlinear.py
124
125
126
127
128
def __post_init__(self):
    self.gammas = (self.drag_gamma, 0.0, self.diffusion_gamma)
    self.deltas = (self.quadratic_delta, 0.0, 0.0)

    super().__post_init__()
get_scenario_name ¤
get_scenario_name() -> str
Source code in apebench/scenarios/difficulty/_nonlinear.py
130
131
def get_scenario_name(self) -> str:
    return f"{self.num_spatial_dims}d_diff_fisher"