AbstractTimestepper< VectorType_, SparseMatrixType_, dim_ > Class Template Reference#
|
DiFfRG
Discretization Framework for functional Renormalization Group flows
|
The abstract base class for all timestepping algorithms. It provides a standard constructor which populates typical timestepping parameters from a given ConfigTree object, such as the timestep sizes, tolerances, verbosity, etc. that are used in the timestepping algorithms. More...
#include <abstract_timestepper.hh>
Classes | |
| struct | ExplicitParameters |
| struct | ImplicitParameters |
Public Member Functions | |
| AbstractTimestepper (const ConfigTree &config, AbstractAssembler< VectorType, SparseMatrixType, dim > &assembler, OutputSession_impl< dim, VectorType > &data_out, const bool implicit_stepper, const bool explicit_stepper) | |
| Construct a new Abstract Timestepper object. | |
| AbstractTimestepper (const ConfigTree &config, AbstractAssembler< VectorType, SparseMatrixType, dim > &assembler, OutputSession_impl< dim, VectorType > &data_out, AbstractAdaptor< VectorType > &adaptor, const bool implicit_stepper, const bool explicit_stepper) | |
Protected Types | |
| using | VectorType = VectorType_ |
| using | NumberType = typename get_type::NumberType<VectorType> |
| using | SparseMatrixType = SparseMatrixType_ |
| using | BlockVectorType = typename get_type::BlockVectorType<VectorType> |
Protected Member Functions | |
| void | drain_output () |
| template<typename EmitFinalFrame > | |
| void | finalize_output_after_failure (EmitFinalFrame &&emit_final_frame) |
| Best-effort output cleanup while a timestepping failure is being reported. | |
| virtual void | run (AbstractFlowingVariables< NumberType, VectorType > &initial_condition, const double t_start, const double t_stop)=0 |
| Any derived class must implement this method to run the timestepping algorithm. | |
| bool | is_implicit () const |
| bool | is_explicit () const |
Protected Attributes | |
| const ConfigTree | config |
| NoAdaptivity< VectorType > | adaptor_default |
| AbstractAssembler< VectorType, SparseMatrixType, dim > & | assembler |
| OutputSession_impl< dim, VectorType > & | data_out |
| AbstractAdaptor< VectorType > & | adaptor |
| ReportPort | log |
| const bool | m_is_implicit |
| const bool | m_is_explicit |
| double | output_dt |
| struct DiFfRG::AbstractTimestepper::ImplicitParameters | impl |
| struct DiFfRG::AbstractTimestepper::ExplicitParameters | expl |
| std::size_t | next_jacobian_build_id = 0 |
| TimestepperJacobianDiagnosticsState | jacobian_diagnostics_state |
Static Protected Attributes | |
| static constexpr uint | dim = dim_ |
Private Member Functions | |
| void | read_parameters () |
Detailed Description
class DiFfRG::AbstractTimestepper< VectorType_, SparseMatrixType_, dim_ >
The abstract base class for all timestepping algorithms. It provides a standard constructor which populates typical timestepping parameters from a given ConfigTree object, such as the timestep sizes, tolerances, verbosity, etc. that are used in the timestepping algorithms.
In the ConfigTree object, a /timestepping/ section must be present with the following parameters:
- /timestepping/output_dt: The output timestep size.
- /timestepping/implicit/dt: The timestep size for an implicit timestepping algorithm.
- /timestepping/implicit/minimal_dt: The minimal timestep size for an implicit timestepping algorithm.
- /timestepping/implicit/maximal_dt: The maximal timestep size for an implicit timestepping algorithm.
- /timestepping/implicit/abs_tol: The absolute tolerance for an implicit timestepping algorithm.
- /timestepping/implicit/rel_tol: The relative tolerance for an implicit timestepping algorithm.
- /timestepping/implicit/max_steps: The maximal number of internal SUNDIALS steps between outputs.
- /timestepping/implicit/max_non_linear_iterations: The maximal number of nonlinear IDA iterations.
- /timestepping/implicit/jacobian_diagnostics: Whether the Jacobian diagnostics tables are written (default false).
- /timestepping/explicit/dt: The timestep size for an explicit timestepping algorithm.
- /timestepping/explicit/minimal_dt: The minimal timestep size for an explicit timestepping algorithm.
- /timestepping/explicit/maximal_dt: The maximal timestep size for an explicit timestepping algorithm.
- /timestepping/explicit/abs_tol: The absolute tolerance for an explicit timestepping algorithm.
- /timestepping/explicit/rel_tol: The relative tolerance for an explicit timestepping algorithm.
- /timestepping/explicit/detect_stuck: Whether repeated-time callback detection is enabled.
Additionally, the following parameters are being used:
- /output/verbosity: At 0 no progress is printed; 1 reports residual work; 2 adds Jacobian, linear-solver, and solver diagnostics; 3 adds factorization and output work. Levels 1–4 are aggregated by the run reporter. Level 5 prints every progress event and is intended only for debugging.
Output settings, including the optional RG scale, are obtained from the typed ReportPort owned by the OutputSession. Timesteppers submit ProgressEvents directly; they never write to a stream.
- Template Parameters
-
VectorType_ The type of the vector used in the timestepping algorithm. Must satisfy SupportedVectorType: dealii::Vector<double> and dealii::BlockVector<double>, plus the PETSc MPI vectors in an MPI build. SparseMatrixType_ The type of the sparse matrix used in the timestepping algorithm. This depends on the assembler used in the computation. dim_ The dimensionality of the spatial discretization.
Member Typedef Documentation
◆ BlockVectorType
|
protected |
◆ NumberType
|
protected |
◆ SparseMatrixType
|
protected |
◆ VectorType
|
protected |
Constructor & Destructor Documentation
◆ AbstractTimestepper() [1/2]
|
inline |
Construct a new Abstract Timestepper object.
- Parameters
-
config The ConfigTree object must contain a /timestepping/ section with all necessary parameters. assembler The assembler object is used to assemble the system matrices and vectors for the timestepping algorithm. data_out The data output object is used to write the output data to disk. adaptor The adaptor object is used to adapt the mesh and the solution vector to the new mesh. The overload without it uses NoAdaptivity, i.e. no mesh adaptation. implicit_stepper,explicit_stepper which /timestepping/ sections this stepper reads.
◆ AbstractTimestepper() [2/2]
|
inline |
Member Function Documentation
◆ drain_output()
|
inlineprotected |
◆ finalize_output_after_failure()
|
inlineprotected |
Best-effort output cleanup while a timestepping failure is being reported.
Writes one final frame for the state that failed, then pushes everything pending to disk. Both steps are swallowed on error: a readout that cannot cope with a diverged solution must not replace the failure the caller is actually trying to report, and a drain error is latched anyway and resurfaces at finish().
Callers rethrow the original exception afterwards.
◆ is_explicit()
|
inlineprotected |
◆ is_implicit()
|
inlineprotected |
◆ read_parameters()
|
inlineprivate |
◆ run()
|
protectedpure virtual |
Any derived class must implement this method to run the timestepping algorithm.
- Parameters
-
initial_condition The flowing variables object that contains the initial condition. t_start The start time of the simulation. t_stop The run method will evolve the system from t_start to t_stop.
Implemented in DiFfRG::TimeStepperBoostRK_impl< VectorType, SparseMatrixType, dim, prec >, DiFfRG::TimeStepperImplicitEuler_impl< VectorType, SparseMatrixType, dim, LinearSolver >, DiFfRG::TimeStepperSUNDIALS_IDA_BoostABM_impl< VectorType, SparseMatrixType, dim, LinearSolver >, DiFfRG::TimeStepperSUNDIALS_IDA_BoostRK_impl< VectorType, SparseMatrixType, dim, LinearSolver, prec >, DiFfRG::TimeStepperSUNDIALS_IDA_impl< VectorType, SparseMatrixType, dim, LinearSolver >, and DiFfRG::TimeStepperTRBDF2_impl< VectorType, SparseMatrixType, dim, LinearSolver >.
Member Data Documentation
◆ adaptor
|
protected |
◆ adaptor_default
|
protected |
◆ assembler
|
protected |
◆ config
|
protected |
◆ data_out
|
protected |
◆ dim
|
staticconstexprprotected |
◆ expl
|
protected |
◆ impl
|
protected |
◆ jacobian_diagnostics_state
|
protected |
◆ log
|
protected |
◆ m_is_explicit
|
protected |
◆ m_is_implicit
|
protected |
◆ next_jacobian_build_id
|
protected |
◆ output_dt
|
protected |
The documentation for this class was generated from the following file:
- /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/timestepping/abstract_timestepper.hh
Generated by