3 //This term is not present in the Zenodo repository at https://zenodo.org/records/6386282
4 //however it is present in Leo's "phd" tag at https://gitlab.lrz.de/ExaHyPE-Seismic/ExaSeis/-/blob/leo/phd/Applications/DynamicRupture/PMLSlipWeakening/PMLSlipWeakening.cpp?ref_type=tags#L468
5 // We are working on the assumption that it should be in there.
15 context->riemannSolver(
29 #define _CUSTOM_COORDINATES
33 #include "../ExaSeis_core/Curvilinear/ContextDynamicRupture.h"
34 #include "../ExaSeis_core/Numerics/riemannsolverPMLDynamicRupture.h"
39 ContextDynamicRupture<{{NAMESPACE | join("::")}}::VariableShortcuts{{SOLVER_NAME}},
40 {{NAMESPACE | join("::")}}::{{CLASSNAME}}::Order + 1,
41 {{NAMESPACE | join("::")}}::{{CLASSNAME}}::NumberOfUnknowns,
42 {{NAMESPACE | join("::")}}::{{CLASSNAME}}::NumberOfAuxiliaryVariables,
43 {{SOLUTION_STORAGE_PRECISION}}>* {{NAMESPACE | join("::")}}::{{CLASSNAME}}::context;
49 double QuadraturePoints1d[Order+1];
52 static ContextDynamicRupture<VariableShortcutsElasticSolver, Order + 1, NumberOfUnknowns, NumberOfAuxiliaryVariables, {{SOLUTION_STORAGE_PRECISION}}>* context;
54 static constexpr int pml_cell_width = 1;
55 static constexpr double pml_alpha_const = 1.5;
56 static constexpr double pml_alpha_scalar = 0.0;
57 static constexpr double pml_rel_error = 0.001;
58 static constexpr int pml_power = 1;
64 kernels::{{SOLVER_NAME}}::Quadrature<{{SOLUTION_STORAGE_PRECISION}}>::nodes,
69 std::string topography_string = \"""" + scenario_string +
""".yaml";
71 //setting coarsestMeshLevel and maxAdaptiveMeshLevel
72 double maxDSize = std::numeric_limits<double>::min();
73 double minDSize = std::numeric_limits<double>::max();
74 tarch::la::Vector<DIMENSIONS, double> sizes = DomainSize;
76 for(int i=0; i<DIMENSIONS; i++){
77 if(sizes[i]>maxDSize){
80 if(sizes[i]<minDSize){
87 //finding coarsest possible Mesh level
88 while(maxDSize>MaxAdmissibleCellH){
93 double realCoarsestMeshSize = maxDSize;
94 double coarsestMeshLevel = depth;
97 while(minDSize>MinAdmissibleCellH){
102 logTraceOutWith1Argument("Freesurface set at ", std::to_string(_TOP * 2));
104 context = new ContextDynamicRupture<VariableShortcutsElasticSolver, Order + 1, NumberOfUnknowns, NumberOfAuxiliaryVariables, {{SOLUTION_STORAGE_PRECISION}}>(
107 realCoarsestMeshSize,
109 DomainOffset, DomainSize,
110 kernels::ElasticSolver::Quadrature<{{SOLUTION_STORAGE_PRECISION}}>::nodes,
111 kernels::ElasticSolver::DGMatrices<{{SOLUTION_STORAGE_PRECISION}}>::dudx
114 std::cout << "PML is using " << pml_cell_width << " elements" << std::endl;
115 std::cout << "Freesurface set at " << _TOP * 2 << std::endl;
120 if (_solverState==SolverState::GridInitialisation) {
121 std::string filename_rupture_model = \"""" + scenario_string +
"""_fault.yaml";
122 context->initRuptureModel(filename_rupture_model);
def abstractDeclarations()
def init_grid_step_implementation(scenario_string)
def finish_time_step_implementation(scenario_string)
def abstractUserDefinitions()