8available_precisions = {
"bf16",
"fp16",
"fp32",
"fp64"}
10available_scenarios = {
24parser = exahype2.ArgumentParser(
"ExaHyPE 2 - ADER-DG Testing Script")
25parser.add_argument(
"-pr",
"--precision", default=
"fp64", help=
"|".join(available_precisions))
26parser.add_argument(
"-s",
"--scenario", default=
None, help=
"|".join(available_scenarios.keys()))
31args = parser.parse_args()
33if args.scenario
is None:
37 "Which of the following scenarios would you like to test?\n"
38 +
" - ".join(available_scenarios.keys())
41 scenario = available_scenarios[s]
48 scenario = available_scenarios[args.scenario]
50order = args.degrees_of_freedom - 1
51max_h = 1.1 * scenario._domain_size / (3.0**args.min_depth)
52min_h = max_h * 3.0 ** (-args.amr_levels)
54polynomials = exahype2.solvers.aderdg.Polynomials.Gauss_Legendre
56project = exahype2.Project(
57 namespace=[
"tests",
"exahype2",
"aderdg"],
58 project_name=scenario.__class__.__name__,
63solver = exahype2.solvers.aderdg.GlobalAdaptiveTimeStep(
68 time_step_relaxation=0.9,
69 unknowns=scenario._equation.num_unknowns,
70 auxiliary_variables=scenario._equation.num_auxiliary_variables,
73solver.add_kernel_optimisations(
74 polynomials=polynomials,
75 is_linear=scenario._equation.is_linear,
76 precision=args.precision
79solver.set_implementation(
80 initial_conditions=scenario.initial_conditions(),
81 boundary_conditions=scenario.boundary_conditions(),
82 max_eigenvalue=scenario._equation.eigenvalues(),
83 flux=scenario._equation.flux(),
84 use_diffusive_flux=scenario._equation.use_diffusive_flux,
85 ncp=scenario._equation.ncp(),
86 source_term=scenario._equation.source(),
87 riemann_solver=scenario._equation.riemann_solver(),
90if scenario.analytical_solution() != exahype2.solvers.PDETerms.None_Implementation:
91 exahype2.solvers.aderdg.ErrorMeasurement(
93 error_measurement_implementation=scenario.analytical_solution(),
94 output_file_name=
"Error_" + scenario.__class__.__name__,
97project.add_solver(solver)
98project.set_output_path(
"solutions")
99scenario.set_global_simulation_parameters(project)
100project.set_load_balancer(
"new ::exahype2::LoadBalancingConfiguration")
101project.set_build_mode(mode=peano4.output.string_to_mode(args.build_mode))
102project = project.generate_Peano4_project(verbose=
False)
103project.build(make_clean_first=
True)
Scenario reproduced from Dumbser & Käser, https://doi.org/10.1111/j.1365-246X.2006....
Very simple scenario in which the initial value of x is shifted in each spatial dimension.
Scenario reproduced from Dumbser & Käser, https://doi.org/10.1111/j.1365-246X.2006....
Scenario reproduced from Ioratti, Dumbser & Loubère, https://doi.org/10.1007/s10915-020-01209-w (p.
Scenario reproduced from Ioratti, Dumbser & Loubère, https://doi.org/10.1007/s10915-020-01209-w (p.
Arnold-Beltrami-Childress flow, described e.g.
Here we simulate a homogeneous domain containing a single spherical bubble of higher temperature.
Here we simulate a homogeneous domain containing two bubbles, one of higher temperature beneath the o...
Originally described in doi.org/10.1098/rspa.1937.0036, the Taylor-Green Vortex is a scenario for the...
Classic radial dam break SWE equations, with constant initial water height but a bump in the bathymet...
Resting lake scenario for the shallow water equations.