5import exahype2.solvers.aderdg
6from exahype2.solvers.aderdg.GlobalAdaptiveTimeStep
import (
7 GlobalAdaptiveTimeStep,
9from exahype2.solvers.aderdg.ADERDG
import Polynomials
11project = exahype2.Project([
"exahype2",
"elastic"],
"pml", executable=
"LOH1")
14unknowns = {
"v": 3,
"sigma": 6,
"pml": 27}
15auxiliary_variables = {
16 "rho": 1,
"cp": 1,
"cs": 1,
17 "dmp_pml": 3,
"jacobian": 1,
18 "metric_derivative": 9,
22offset = [-2.28662, 0.0, -2.28662]
23size = [16.3333, 16.3333, 16.3333]
28max_h = 1.1 * min(size) / (3.0**min_level)
29min_h = max_h / (3.0**max_depth)
32theSolver = GlobalAdaptiveTimeStep(
36 auxiliary_variables=auxiliary_variables,
39 time_step_relaxation=0.9,
40 refinement_criterion=exahype2.solvers.PDETerms.User_Defined_Implementation,
41 flux=exahype2.solvers.PDETerms.User_Defined_Implementation,
42 ncp=exahype2.solvers.PDETerms.User_Defined_Implementation,
43 source_term=exahype2.solvers.PDETerms.User_Defined_Implementation,
44 material_parameters=exahype2.solvers.PDETerms.User_Defined_Implementation,
48theSolver.add_kernel_optimisations(
50 architecture=
"noarch",
51 polynomials=Polynomials.Gauss_Lobatto,
52 initialise_patches=
True,
53 riemann_solver_implementation=exahype2.solvers.PDETerms.User_Defined_Implementation,
56project.add_solver(theSolver)
59tracer_particles = project.add_tracer(name=
"Tracer", attribute_count=55)
61project.add_action_set_to_initialisation(
62 exahype2.tracer.InsertParticlesByCoordinates(
63 particle_set=tracer_particles,
65 [0.000, 0., 0.693], [0.000, 0., 5.543], [0.000, 0., 10.392],
66 [0.490, 0., 0.490], [3.919, 0., 3.919], [7.348, 0., 7.3480],
67 [0.577, 0., 0.384], [4.612, 0., 3.075], [8.647, 0., 5.7640]
72project.add_action_set_to_timestepping(
76project.add_action_set_to_timestepping(
77 exahype2.tracer.DiscontinuousGalerkinTracing(
78 tracer_particles, theSolver,
79 project_on_tracer_properties_kernel=
"::exahype2::dg::projectAllValuesOntoParticle"
83project.add_action_set_to_timestepping(
84 exahype2.tracer.DumpTracerIntoDatabase(
85 particle_set=tracer_particles, solver=theSolver,
86 filename=
"tracer-PML-d-"+str(min_level)+
"-o-"+str(order),
87 data_delta_between_two_snapsots=1e16, time_delta_between_two_snapsots=0.000001,
88 output_precision=10, clear_database_after_flush=
False
92project.set_global_simulation_parameters(
96 min_end_time=end_time,
97 max_end_time=end_time,
98 first_plot_time_stamp=0.0,
99 time_in_between_plots=0.000,
100 periodic_BC=[
False,
False,
False],
108project.set_load_balancing(
"toolbox::loadbalancing::strategies::SpreadOutOnceGridStagnates",
"new ::exahype2::LoadBalancingConfiguration()" )
109project.set_Peano4_installation(
"../../../../", peano4.api.output.CompileMode.RELEASE )
110peano4_project = project.generate_Peano4_project(
"False")
112peano4_project.output.makefile.set_CXX_compiler(
"mpicxx")
113peano4_project.output.makefile.add_CXX_flag(
"-fopenmp -DUSE_ASAGI")
114peano4_project.output.makefile.add_library(
115 "-fopenmp -lcurvi -leasi -lyaml-cpp -limpalajit -lasagi -lnetcdf -lnuma -lmpi -DUSE_ASAGI"
118peano4_project.build(make_clean_first=
True, number_of_parallel_builds=32)
Update the parallel state of particles and keep stats of them.