Peano
Loading...
Searching...
No Matches
LocalTimeSteppingCodeSnippets.py
Go to the documentation of this file.
1
# This file is part of the ExaHyPE2 project. For conditions of distribution and
2
# use, please see the copyright notice at www.peano-framework.org
3
import
exahype2.solvers.LocalTimeSteppingCodeSnippets
4
5
6
class
LocalTimeSteppingCodeSnippets
(
exahype2.solvers.LocalTimeSteppingCodeSnippets
):
7
"""
8
9
Code snippet generator for fixed time stepping in the Runge-Kutta schemes
10
11
"""
12
def
__init__
(self, time_step_relaxation, use_enclave_tasking):
13
self.
_time_step_relaxation
= time_step_relaxation
14
self.
_use_enclave_tasking
= use_enclave_tasking
15
16
17
def
create_start_time_step_implementation
(self):
18
return
create_start_time_step_implementation_for_adaptive_time_stepping_with_subcycling(use_enclave_tasking)
19
20
21
def
create_finish_time_step_implementation
(self):
22
"""
23
24
This routine is inserted after we have reduced all global quantities. These
25
are the quantities with the postfix ThisTimeStep.
26
27
"""
28
return
"""
29
#ifdef Parallel
30
double newMaxEigenvalue = _maxEigenvalue;
31
tarch::mpi::Rank::getInstance().allReduce(
32
&newMaxEigenvalue,
33
&_maxEigenvalue,
34
1,
35
MPI_DOUBLE,
36
MPI_MAX,
37
[&]() -> void { tarch::services::ServiceRepository::getInstance().receiveDanglingMessages(); }
38
);
39
#endif
40
41
if ( _solverState == SolverState::Secondary ) {
42
_maxEigenvalueOfPreviousSweep = _maxEigenvalue;
43
}
44
"""
45
exahype2.solvers.LocalTimeSteppingCodeSnippets.LocalTimeSteppingCodeSnippets
Code snippet generator for all subcycling solvers.
Definition
LocalTimeSteppingCodeSnippets.py:6
exahype2.solvers.fv.LocalTimeSteppingCodeSnippets.LocalTimeSteppingCodeSnippets
Code snippet generator for fixed time stepping in the Runge-Kutta schemes.
Definition
LocalTimeSteppingCodeSnippets.py:6
exahype2.solvers.fv.LocalTimeSteppingCodeSnippets.LocalTimeSteppingCodeSnippets.create_start_time_step_implementation
create_start_time_step_implementation(self)
Definition
LocalTimeSteppingCodeSnippets.py:17
exahype2.solvers.fv.LocalTimeSteppingCodeSnippets.LocalTimeSteppingCodeSnippets._use_enclave_tasking
_use_enclave_tasking
Definition
LocalTimeSteppingCodeSnippets.py:14
exahype2.solvers.fv.LocalTimeSteppingCodeSnippets.LocalTimeSteppingCodeSnippets.create_finish_time_step_implementation
create_finish_time_step_implementation(self)
This routine is inserted after we have reduced all global quantities.
Definition
LocalTimeSteppingCodeSnippets.py:21
exahype2.solvers.fv.LocalTimeSteppingCodeSnippets.LocalTimeSteppingCodeSnippets._time_step_relaxation
_time_step_relaxation
Definition
LocalTimeSteppingCodeSnippets.py:13
exahype2.solvers.fv.LocalTimeSteppingCodeSnippets.LocalTimeSteppingCodeSnippets.__init__
__init__(self, time_step_relaxation, use_enclave_tasking)
Definition
LocalTimeSteppingCodeSnippets.py:12
python
exahype2
solvers
fv
LocalTimeSteppingCodeSnippets.py
Generated on Tue Mar 18 2025 20:03:05 for Peano by
1.10.0