1import os, sys, peano4, exahype2
3from exahype2.solvers.aderdg.ADERDG
import Polynomials
5sys.path.insert(0, os.path.abspath(
"../pml"))
8import DynamicRuptureElastic
13sys.path.insert(0, os.path.abspath(
"../ExaSeis_core"))
17available_scenarios = {
30scenario_string = scenario.lower()
31my_scenario = available_scenarios[scenario]
33unknowns = {
"v": 3,
"sigma": 6,
"u": 3}
34auxiliary_variables = {
35 "rho": 1,
"cp": 1,
"cs": 1,
"jacobian": 1,
36 "metric_derivative": 9,
40offset = my_scenario.domain_offset
41size = my_scenario.domain_size
44end_time = my_scenario.end_time
49max_h = 1.1 * min(size) / (3.0**min_level)
50min_h = max_h / (3.0**max_depth)
54my_scenario.generate_required_files(order)
56theSolver = exahype2.solvers.aderdg.GlobalAdaptiveTimeStep(
60 auxiliary_variables=auxiliary_variables,
63 time_step_relaxation=0.9
66theSolver.add_kernel_optimisations(
68 polynomials=Polynomials.Gauss_Lobatto,
69 initialise_patches=
True,
73theSolver.set_implementation(
90filename=scenario+
"_l_"+str(min_level)+
"_o_"+str(order)+
"_pr_"+str(precision)
91project = exahype2.Project([
"applications",
"exahype2",
"exaseis"],
"dynamicRupture", executable=filename)
92project.add_solver(theSolver)
94project.add_action_set_to_timestepping(
95 exahype2.tracer.CurviTracer(
96 coordinates= my_scenario.tracer_coordinates,
97 fault_coordinates=my_scenario.fault_coordinates,
100 data_delta_between_two_snapshots=1e16, time_delta_between_two_snapshots=0.01,
101 output_precision=10, clear_database_after_flush=
False,
102 number_of_entries_between_two_db_flushes=100
106 project.set_output_path(
"solutions"+filename)
108 theSolver.set_face_plotter(peano4.plotter.HDF5FaceNodalPlotter,
"""
109 ((marker.getSelectedFaceNumber() % DIMENSIONS) == 2-repositories::""" + theSolver.get_name_of_global_instance() +
""".context->fault_normal) and
110 std::abs(marker.getX()[2-repositories::""" + theSolver.get_name_of_global_instance() +
""".context->fault_normal]-repositories::""" \
111 + theSolver.get_name_of_global_instance() +
""".context->fault_position)< 0.5*marker.getH()[2-repositories::""" \
112 + theSolver.get_name_of_global_instance() +
""".context->fault_normal]
115project.set_global_simulation_parameters(
119 min_end_time=end_time,
120 max_end_time=end_time,
121 first_plot_time_stamp=0.0,
122 time_in_between_plots = plot_dt,
123 periodic_BC=[
False,
False,
False]
126project.set_load_balancer(
"new ::exahype2::LoadBalancingConfiguration")
127project.set_build_mode(peano4.output.CompileMode.Release)
128peano4_project = project.generate_Peano4_project(verbose=
False)
129peano4_project.build(make_clean_first=
True)
Simulates an earthquake in the north Iceland region, around the Húsavı́k-Flatey fault.
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)
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)
init_grid_step_implementation(scenario_string)
initial(pointwise_initial_conditions)
abstractUserDefinitions()
multiplyMaterialParameterMatrix()