1 import peano4, exahype2
3 project = exahype2.Project([
"exahype2",
"elastic"],
"pml", executable=
"TPV5_2D")
5 unknowns = {
"v": 2,
"sigma": 3,
"u": 2}
6 auxiliary_variables = {
7 "rho": 1,
"cp": 1,
"cs": 1,
8 "jacobian": 1,
"metric_derivative": 4,
18 max_h = 1.1 *
min(size) / (3.0**min_level)
19 min_h = max_h / (3.0**max_depth)
22 theSolver = exahype2.solvers.aderdg.GlobalAdaptiveTimeStep(
26 auxiliary_variables=auxiliary_variables,
29 time_step_relaxation=0.9,
30 refinement_criterion=exahype2.solvers.PDETerms.User_Defined_Implementation,
31 flux=exahype2.solvers.PDETerms.User_Defined_Implementation,
32 ncp=exahype2.solvers.PDETerms.User_Defined_Implementation,
33 source_term=exahype2.solvers.PDETerms.User_Defined_Implementation,
34 material_parameters=exahype2.solvers.PDETerms.User_Defined_Implementation,
38 theSolver.add_kernel_optimisations(
41 riemann_solver_implementation=exahype2.solvers.PDETerms.User_Defined_Implementation
44 project.add_solver(theSolver)
45 project.set_output_path(
"solutions")
47 tracer_particles = project.add_tracer(name=
"Tracer", attribute_count=17)
49 project.add_action_set_to_initialisation(
50 exahype2.tracer.InsertParticlesByCoordinates(
51 particle_set=tracer_particles,
66 project.add_action_set_to_timestepping(
67 peano4.toolbox.particles.api.UpdateParallelState(particle_set=tracer_particles)
70 project.add_action_set_to_timestepping(
71 exahype2.tracer.DiscontinuousGalerkinTracing(
72 tracer_particles, theSolver,
73 project_on_tracer_properties_kernel=
"::exahype2::dg::projectAllValuesOntoParticle"
77 project.add_action_set_to_timestepping(
78 exahype2.tracer.DumpTracerIntoDatabase(
79 particle_set=tracer_particles, solver=theSolver,
80 filename=
"tracer-TPV5-"+
str(min_level)+
"-o-"+
str(order),
81 data_delta_between_two_snapsots=1e16, time_delta_between_two_snapsots=0.01,
82 output_precision=10, clear_database_after_flush=
False
86 project.set_global_simulation_parameters(
90 min_end_time=end_time,
91 max_end_time=end_time,
92 first_plot_time_stamp=0.0,
93 time_in_between_plots=0.1,
94 periodic_BC=[
False,
False,
False],
97 project.set_load_balancer(
"new ::exahype2::LoadBalancingConfiguration()")
98 project.set_Peano4_installation(
"../../../../", peano4.output.CompileMode.Release )
99 peano4_project = project.generate_Peano4_project(verbose=
False)
100 peano4_project.build(make_clean_first=
True, number_of_parallel_builds=32)
static double min(double const x, double const y)