Skip to content

Linear Scenarios in physical Mode¤

apebench.scenarios.physical.Advection ¤

Bases: Linear

Source code in apebench/scenarios/physical/_linear.py
47
48
49
50
51
52
53
54
class Advection(Linear):
    advection_coef: float = -0.25

    def __post_init__(self):
        self.a_coefs = (0.0, self.advection_coef, 0.0, 0.0, 0.0)

    def get_scenario_name(self) -> str:
        return f"{self.num_spatial_dims}d_phy_adv"
advection_coef class-attribute instance-attribute ¤
advection_coef: float = -0.25
__post_init__ ¤
__post_init__()
Source code in apebench/scenarios/physical/_linear.py
50
51
def __post_init__(self):
    self.a_coefs = (0.0, self.advection_coef, 0.0, 0.0, 0.0)
get_scenario_name ¤
get_scenario_name() -> str
Source code in apebench/scenarios/physical/_linear.py
53
54
def get_scenario_name(self) -> str:
    return f"{self.num_spatial_dims}d_phy_adv"

apebench.scenarios.physical.Diffusion ¤

Bases: Linear

Source code in apebench/scenarios/physical/_linear.py
57
58
59
60
61
62
63
64
class Diffusion(Linear):
    diffusion_coef: float = 0.008

    def __post_init__(self):
        self.a_coefs = (0.0, 0.0, self.diffusion_coef, 0.0, 0.0)

    def get_scenario_name(self) -> str:
        return f"{self.num_spatial_dims}d_phy_diff"
diffusion_coef class-attribute instance-attribute ¤
diffusion_coef: float = 0.008
__post_init__ ¤
__post_init__()
Source code in apebench/scenarios/physical/_linear.py
60
61
def __post_init__(self):
    self.a_coefs = (0.0, 0.0, self.diffusion_coef, 0.0, 0.0)
get_scenario_name ¤
get_scenario_name() -> str
Source code in apebench/scenarios/physical/_linear.py
63
64
def get_scenario_name(self) -> str:
    return f"{self.num_spatial_dims}d_phy_diff"

apebench.scenarios.physical.AdvectionDiffusion ¤

Bases: Linear

Source code in apebench/scenarios/physical/_linear.py
67
68
69
70
71
72
73
74
75
class AdvectionDiffusion(Linear):
    advection_coef: float = -0.25
    diffusion_coef: float = 0.008

    def __post_init__(self):
        self.a_coefs = (0.0, self.advection_coef, self.diffusion_coef, 0.0, 0.0)

    def get_scenario_name(self) -> str:
        return f"{self.num_spatial_dims}d_phy_adv_diff"
advection_coef class-attribute instance-attribute ¤
advection_coef: float = -0.25
diffusion_coef class-attribute instance-attribute ¤
diffusion_coef: float = 0.008
__post_init__ ¤
__post_init__()
Source code in apebench/scenarios/physical/_linear.py
71
72
def __post_init__(self):
    self.a_coefs = (0.0, self.advection_coef, self.diffusion_coef, 0.0, 0.0)
get_scenario_name ¤
get_scenario_name() -> str
Source code in apebench/scenarios/physical/_linear.py
74
75
def get_scenario_name(self) -> str:
    return f"{self.num_spatial_dims}d_phy_adv_diff"

apebench.scenarios.physical.Dispersion ¤

Bases: Linear

Source code in apebench/scenarios/physical/_linear.py
78
79
80
81
82
83
84
85
86
class Dispersion(Linear):
    dipersion_coef: float = 0.00025
    dt: float = 0.001  # Overwrite

    def __post_init__(self):
        self.a_coefs = (0.0, 0.0, 0.0, self.dipersion_coef, 0.0)

    def get_scenario_name(self) -> str:
        return f"{self.num_spatial_dims}d_phy_disp"
__post_init__ ¤
__post_init__()
Source code in apebench/scenarios/physical/_linear.py
82
83
def __post_init__(self):
    self.a_coefs = (0.0, 0.0, 0.0, self.dipersion_coef, 0.0)
get_scenario_name ¤
get_scenario_name() -> str
Source code in apebench/scenarios/physical/_linear.py
85
86
def get_scenario_name(self) -> str:
    return f"{self.num_spatial_dims}d_phy_disp"

apebench.scenarios.physical.HyperDiffusion ¤

Bases: Linear

Source code in apebench/scenarios/physical/_linear.py
89
90
91
92
93
94
95
96
97
class HyperDiffusion(Linear):
    hyper_diffusion_coef: float = -0.000075
    dt: float = 0.00001  # Overwrite

    def __post_init__(self):
        self.a_coefs = (0.0, 0.0, 0.0, 0.0, self.hyper_diffusion_coef)

    def get_scenario_name(self) -> str:
        return f"{self.num_spatial_dims}d_phy_hyp_diff"
__post_init__ ¤
__post_init__()
Source code in apebench/scenarios/physical/_linear.py
93
94
def __post_init__(self):
    self.a_coefs = (0.0, 0.0, 0.0, 0.0, self.hyper_diffusion_coef)
get_scenario_name ¤
get_scenario_name() -> str
Source code in apebench/scenarios/physical/_linear.py
96
97
def get_scenario_name(self) -> str:
    return f"{self.num_spatial_dims}d_phy_hyp_diff"