Peano
Loading...
Searching...
No Matches
point-explosion.py
Go to the documentation of this file.
1import os
2import sys
3
4sys.path.insert(0, os.path.abspath(".."))
5
6from Elastic import Elastic
7
8if __name__ == "__main__":
9 elastic = Elastic()
10
11 my_parser = elastic.setup_parser()
12 my_parser.set_defaults(
13 solver="RusanovGlobalAdaptiveADERDG",
14 dimensions=2,
15 end_time=3.0,
16 width=[20.0, 20.0, 20.0],
17 offset=[-5.0, 0.0, 0.0],
18 min_depth=4,
19 amr_levels=0,
20 patch_size=16,
21 rk_order = 2,
22 dg_order = 3,
23 number_of_snapshots = 20,
24 peano_dir="../../../../",
25 )
26 my_args = my_parser.parse_args()
27
28 my_solver = elastic.setup_solver(my_args)
29 my_solver.add_user_solver_includes(
30 """
31#include "../Elastic.h"
32"""
33 )
34
35 my_project = elastic.setup_project(my_args, my_solver)
36
37 my_project.constants.define_value("RHO", str(2.7))
38 my_project.constants.define_value("P_WAVE_SPEED", str(6.0))
39 my_project.constants.define_value("S_WAVE_SPEED", str(3.464))
40
41 my_project.output.makefile.add_cpp_file("Elastic.cpp")
42
43 elastic.build(my_args, my_project)
44
45 print(my_args)
46 print(my_solver)
47 print(my_project)
Superclass for all elastic solvers.
Definition Elastic.py:9