Peano
Loading...
Searching...
No Matches
smooth-convergence-test.py
Go to the documentation of this file.
1import os, sys
2import peano4.api
3import exahype2
4
5
6create_release_build = False
7if (create_release_build):
8 build_mode = peano4.api.output.CompileMode.RELEASE
9 volume_size = 0.0001
10 end_time = 0.001
11 time_in_between_plots = 0.001
12 verbosity = peano4.api.LoggerVerbosity.TEXT
13else:
14 build_mode = peano4.api.output.CompileMode.DEBUG
15 volume_size = 0.001
16 end_time = 0.01
17 time_in_between_plots = 0.001
18 verbosity = peano4.api.LoggerVerbosity.VISUALISATION
19
20
22 namespace=["benchmarks", "exahype2", "euler", "smooth_convergence_test"],
23 project_name="smooth-convergence-test",
24 directory=".",
25 executable="smooth-convergence-test",
26)
27
28solver_name = "EulerFVSmooth"
29unknowns = 4
30auxiliary_variables = 0
31patch_size = 9
32dimensions = 2
33
35 solver_name,
36 unknowns,
37 auxiliary_variables,
38)
39
40thesolver.add_pde_term( exahype2.api.Flux(stateless=False,))
41thesolver.add_pde_term(exahype2.api.MaxEigenvalue(stateless=False,))
42thesolver.add_pde_term(exahype2.api.InitPointWisely(stateless=False,))
43thesolver.add_pde_term(exahype2.api.DirichletBoundaryConditions(stateless=False,))
44
45thesolver.numerical_scheme = exahype2.api.fv.RusanovWithOptimisticExplicitEuler(thesolver, patch_size)
47 thesolver, volume_size=volume_size
48)
50 thesolver, first_plot_time_stamp=0.0, time_in_between_plots=time_in_between_plots
51)
52project.add_solver(thesolver)
53
54
55
56#project.compiler = peano4.api.taskgraph.compiler.Sequential.translate
57#project.compiler = peano4.api.taskgraph.compiler.CellTaskProducerConsumer.translate_with_sequential
58project.compiler = peano4.api.taskgraph.compiler.CellTaskProducerConsumer.translate_with_fusion
59
60
61project.set_global_simulation_parameters(
62 dimensions=dimensions,
63 offset=[-0.1, -0.1],
64 size=[0.2, 0.2],
65 min_end_time=end_time,
66 max_end_time=end_time,
67 periodic_BC=[False, False, False],
68# periodic_BC=[True, True, True],
69)
70
71project.set_load_balancing("toolbox::loadbalancing::strategies::SpreadOutOnceGridStagnates", "new ::exahype2::LoadBalancingConfiguration()")
72project.set_Peano4_installation("../../../../", build_mode)
73peano4_project = project.generate_Peano4_project(verbosity=verbosity)
74peano4_project.generate()
75peano4_project.build(make_clean_first=True)
The conservative flux F(Q) of a hyperbolic PDE.
Definition Flux.py:8
Point-wise initial condition: given the physical position of a single degree of freedom,...
The maximum absolute eigenvalue of the flux Jacobian in a given direction, i.e.
ExaHyPE 2 project.
Definition Project.py:15
Abstract base class for all ExaHyPE 2 solvers.
Definition Solver.py:17
Plotting counterpart to RusanovWithExplicitEuler: maps the patch data of a Finite Volume scheme with ...
Finite Volumes with a Rusanov Riemann solver and optimistic explicit Euler time stepping,...
Setup phase counterpart to RusanovWithExplicitEuler: sets the initial condition for a Finite Volume s...