1 import os, sys, peano4, exahype2
3 from exahype2.solvers.aderdg.ADERDG
import Polynomials
5 sys.path.insert(0, os.path.abspath(
"../pml"))
8 import PMLDynamicRuptureElastic
13 sys.path.insert(0, os.path.abspath(
"../ExaSeis_core"))
17 available_scenarios = {
25 scenario_string = scenario.lower()
26 my_scenario = available_scenarios[scenario]
28 unknowns = {
"v": 3,
"sigma": 6,
"u": 3,
"pml": 27}
29 auxiliary_variables = {
30 "rho": 1,
"cp": 1,
"cs": 1,
31 "dmp_pml": 3,
"jacobian": 1,
32 "metric_derivative": 9,
36 offset = my_scenario.domain_offset
37 size = my_scenario.domain_size
38 end_time = my_scenario.end_time
43 max_h = 1.1 *
min(size) / (3.0**min_level)
44 min_h = max_h / (3.0**max_depth)
48 my_scenario.generate_required_files(order)
50 theSolver = exahype2.solvers.aderdg.GlobalAdaptiveTimeStep(
54 auxiliary_variables=auxiliary_variables,
57 time_step_relaxation=0.9
60 theSolver.add_kernel_optimisations(
62 polynomials=Polynomials.Gauss_Lobatto,
63 initialise_patches=
True,
67 theSolver.set_implementation(
85 project = exahype2.Project([
"exahype2",
"elastic"],
"pml", executable=scenario)
87 project.add_solver(theSolver)
89 filename = scenario+
"_l_"+
str(min_level)+
"_o_"+
str(order)+
"_pr_"+
str(precision)
91 project.add_action_set_to_timestepping(
92 exahype2.tracer.NewDGTracer(
93 coordinates= my_scenario.tracer_coordinates,
96 data_delta_between_two_snapshots=1e16, time_delta_between_two_snapshots=0.01,
97 output_precision=10, clear_database_after_flush=
False,
102 project.set_output_path(
"solutions"+filename)
104 project.set_global_simulation_parameters(
108 min_end_time=end_time,
109 max_end_time=end_time,
110 first_plot_time_stamp=0.0,
111 time_in_between_plots=plot_dt,
112 periodic_BC=[
False,
False,
False],
115 project.set_load_balancer(
"new ::exahype2::LoadBalancingConfiguration()")
116 project.set_Peano4_installation(
"../../../../", peano4.output.CompileMode.Release )
117 peano4_project = project.generate_Peano4_project(verbose=
False)
118 peano4_project.build(make_clean_first=
True)
Part of a series of benchmarks by the Statewide California Earthquake Center (SCEC)
Part of a series of benchmarks by the Statewide California Earthquake Center (SCEC)
Part of a series of benchmarks by the Statewide California Earthquake Center (SCEC)
Part of a series of benchmarks by the Statewide California Earthquake Center (SCEC)
def abstractDeclarations()
def init_grid_step_implementation(scenario_string)
def finish_time_step_implementation(scenario_string)
def abstractUserDefinitions()
def initial(pointwise_initial_conditions)
def multiplyMaterialParameterMatrix()
static double min(double const x, double const y)