Peano
Loading...
Searching...
No Matches
fv-static-amr Namespace Reference

Variables

 parser = exahype2.ArgumentParser("ExaHyPE 2 - Finite Volumes Static AMR Testing Script")
list available_precisions = ["float", "double"]
 default
 help
 min_depth
 amr_levels
 degrees_of_freedom
 end_time
 number_of_snapshots
 args = parser.parse_args()
float max_h = 1.1 / 3.0**args.min_depth
float min_h = max_h * 3.0 ** (-args.amr_levels)
str initial_conditions
str boundary_conditions
str refinement_criterion
str compute_primitive_variables
str max_eigenvalue
str flux
 fv_solver
 storage_precision
 precision
 compute_precision
 project
float time_in_between_plots = 0.0
 dimensions
 size
 offset
 min_end_time
 max_end_time
 first_plot_time_stamp
 periodic_BC
 mode
 make
 True
 make_clean_first
 throw_away_data_after_build

Variable Documentation

◆ amr_levels

fv-static-amr.amr_levels

Definition at line 13 of file fv-static-amr.py.

◆ args

fv-static-amr.args = parser.parse_args()

Definition at line 18 of file fv-static-amr.py.

◆ available_precisions

list fv-static-amr.available_precisions = ["float", "double"]

Definition at line 7 of file fv-static-amr.py.

◆ boundary_conditions

fv-static-amr.boundary_conditions
Initial value:
1= """
2 // Reflective boundary conditions
3 Qoutside[Shortcuts::rho] = Qinside[Shortcuts::rho];
4 Qoutside[Shortcuts::rhoU + 0] = -Qinside[Shortcuts::rhoU + 0];
5 Qoutside[Shortcuts::rhoU + 1] = -Qinside[Shortcuts::rhoU + 1];
6#if DIMENSIONS == 3
7 Qoutside[Shortcuts::rhoU + 2] = -Qinside[Shortcuts::rhoU + 2];
8#endif
9 Qoutside[Shortcuts::rhoE] = Qinside[Shortcuts::rhoE];
10"""

Definition at line 35 of file fv-static-amr.py.

◆ compute_precision

fv-static-amr.compute_precision

Definition at line 133 of file fv-static-amr.py.

◆ compute_primitive_variables

str fv-static-amr.compute_primitive_variables
Initial value:
1= r"""
2 const auto irho = 1.0 / Q[Shortcuts::rho];
3 const auto u0 = Q[Shortcuts::rhoU + 0] * irho;
4 const auto u1 = Q[Shortcuts::rhoU + 1] * irho;
5#if DIMENSIONS == 3
6 const auto u2 = Q[Shortcuts::rhoU + 2] * irho;
7#endif
8
9#if DIMENSIONS == 3
10 const auto uSq = u0 * u0 + u1 * u1 + u2 * u2;
11 const auto u_n = (normal == 0) ? u0 : (normal == 1) ? u1 : u2;
12#else
13 const auto uSq = u0 * u0 + u1 * u1;
14 const auto u_n = (normal == 0) ? u0 : u1;
15#endif
16
17 const auto internalE = Q[Shortcuts::rhoE] - 0.5 * Q[Shortcuts::rho] * uSq;
18 const auto p = (GAMMA - 1.0) * internalE;
19"""

Definition at line 64 of file fv-static-amr.py.

◆ default

fv-static-amr.default

Definition at line 9 of file fv-static-amr.py.

◆ degrees_of_freedom

fv-static-amr.degrees_of_freedom

Definition at line 14 of file fv-static-amr.py.

◆ dimensions

fv-static-amr.dimensions

Definition at line 151 of file fv-static-amr.py.

◆ end_time

fv-static-amr.end_time

Definition at line 15 of file fv-static-amr.py.

◆ first_plot_time_stamp

fv-static-amr.first_plot_time_stamp

Definition at line 156 of file fv-static-amr.py.

◆ flux

fv-static-amr.flux
Initial value:
1= r"""
2 {compute_primitive_variables}
3
4 F[Shortcuts::rho] = Q[Shortcuts::rhoU + normal];
5
6 F[Shortcuts::rhoU + 0] = Q[Shortcuts::rhoU + 0] * u_n;
7 F[Shortcuts::rhoU + 1] = Q[Shortcuts::rhoU + 1] * u_n;
8#if DIMENSIONS == 3
9 F[Shortcuts::rhoU + 2] = Q[Shortcuts::rhoU + 2] * u_n;
10#endif
11
12 F[Shortcuts::rhoU + normal] += p;
13
14 F[Shortcuts::rhoE] = (Q[Shortcuts::rhoE] + p) * u_n;
15""".format(
16 compute_primitive_variables=compute_primitive_variables
17)

Definition at line 94 of file fv-static-amr.py.

◆ fv_solver

fv-static-amr.fv_solver
Initial value:
1= exahype2.solvers.fv.godunov.GlobalAdaptiveTimeStep(
2 name="FVSolver",
3 patch_size=args.degrees_of_freedom,
4 unknowns={"rho": 1, "rhoU": args.dimensions, "rhoE": 1},
5 auxiliary_variables=0,
6 min_volume_h=min_h,
7 max_volume_h=max_h,
8 time_step_relaxation=0.5,
9 use_enclave_tasking=args.enclave_tasking,
10 number_of_enclave_tasks=args.ntasks,
11)

Definition at line 112 of file fv-static-amr.py.

◆ help

fv-static-amr.help

Definition at line 9 of file fv-static-amr.py.

◆ initial_conditions

fv-static-amr.initial_conditions
Initial value:
1= """
2 Q[Shortcuts::rho] = 1.0;
3 Q[Shortcuts::rhoU + 0] = 0.0;
4 Q[Shortcuts::rhoU + 1] = 0.0;
5#if DIMENSIONS == 2
6 Q[Shortcuts::rhoE] = ((std::sqrt(std::pow(0.5 - x(0), 2) + std::pow(0.5 - x(1), 2)) < 0.2) ? (1.0) : (1.01));
7#else
8 Q[Shortcuts::rhoU + 2] = 0.0;
9 Q[Shortcuts::rhoE] = ((std::sqrt(std::pow(0.5 - x(0), 2) + std::pow(0.5 - x(1), 2) + std::pow(0.5 - x(2), 2)) < 0.2) ? (1.0) : (1.01));
10#endif
11"""

Definition at line 23 of file fv-static-amr.py.

◆ make

fv-static-amr.make

Definition at line 173 of file fv-static-amr.py.

◆ make_clean_first

fv-static-amr.make_clean_first

Definition at line 173 of file fv-static-amr.py.

◆ max_eigenvalue

fv-static-amr.max_eigenvalue
Initial value:
1= r"""
2 {compute_primitive_variables}
3 const auto speedOfSound = std::sqrt(GAMMA * p * irho);
4 auto result = std::fmax(0.0, std::fabs(u_n - speedOfSound));
5 result = std::fmax(result, std::fabs(u_n + speedOfSound));
6 return result;
7""".format(
8 compute_primitive_variables=compute_primitive_variables
9)

Definition at line 84 of file fv-static-amr.py.

◆ max_end_time

fv-static-amr.max_end_time

Definition at line 155 of file fv-static-amr.py.

◆ max_h

float fv-static-amr.max_h = 1.1 / 3.0**args.min_depth

Definition at line 20 of file fv-static-amr.py.

◆ min_depth

fv-static-amr.min_depth

Definition at line 12 of file fv-static-amr.py.

◆ min_end_time

fv-static-amr.min_end_time

Definition at line 154 of file fv-static-amr.py.

◆ min_h

float fv-static-amr.min_h = max_h * 3.0 ** (-args.amr_levels)

Definition at line 21 of file fv-static-amr.py.

◆ mode

fv-static-amr.mode

Definition at line 167 of file fv-static-amr.py.

◆ number_of_snapshots

fv-static-amr.number_of_snapshots

Definition at line 16 of file fv-static-amr.py.

◆ offset

fv-static-amr.offset

Definition at line 153 of file fv-static-amr.py.

◆ parser

fv-static-amr.parser = exahype2.ArgumentParser("ExaHyPE 2 - Finite Volumes Static AMR Testing Script")

Definition at line 6 of file fv-static-amr.py.

◆ periodic_BC

fv-static-amr.periodic_BC

Definition at line 158 of file fv-static-amr.py.

◆ precision

fv-static-amr.precision

Definition at line 133 of file fv-static-amr.py.

◆ project

fv-static-amr.project
Initial value:
1= exahype2.Project(
2 namespace=["tests", "exahype2", "fv"],
3 project_name=".",
4 directory=".",
5 executable="ExaHyPE",
6)

Definition at line 136 of file fv-static-amr.py.

◆ refinement_criterion

fv-static-amr.refinement_criterion
Initial value:
1= """
2 auto result = ::exahype2::RefinementCommand::Keep;
3
4#if DIMENSIONS == 3
5 tarch::la::Vector<DIMENSIONS, double> circleCentre = {0.5, 0.5, 0.5};
6#else
7 tarch::la::Vector<DIMENSIONS, double> circleCentre = {0.5, 0.5};
8#endif
9
10 if (tarch::la::equals(t, 0.0)) {
11 if (tarch::la::norm2(x - circleCentre) < 0.1) {
12 result = ::exahype2::RefinementCommand::Refine;
13 }
14 }
15
16 return result;
17"""

Definition at line 46 of file fv-static-amr.py.

◆ size

fv-static-amr.size

Definition at line 152 of file fv-static-amr.py.

◆ storage_precision

fv-static-amr.storage_precision

Definition at line 133 of file fv-static-amr.py.

◆ throw_away_data_after_build

fv-static-amr.throw_away_data_after_build

Definition at line 173 of file fv-static-amr.py.

◆ time_in_between_plots

fv-static-amr.time_in_between_plots = 0.0

Definition at line 145 of file fv-static-amr.py.

◆ True

fv-static-amr.True

Definition at line 173 of file fv-static-amr.py.