/home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/timestepping/rk.hh Source File#

DiFfRG: /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/timestepping/rk.hh Source File
DiFfRG
Discretization Framework for functional Renormalization Group flows
rk.hh
Go to the documentation of this file.
1#pragma once
2
3// DiFfRG
11
12namespace DiFfRG
13{
14 template <typename VectorType, typename SparseMatrixType = dealii::SparseMatrix<get_type::NumberType<VectorType>>,
15 uint dim = 0>
16 class TimeStepperRK_impl : public AbstractTimestepper<VectorType, SparseMatrixType, dim>
17 {
19
20 public:
21 using NumberType = typename Base::NumberType;
23
30 : Base(config, assembler, data_out, /*implicit=*/false, /*explicit=*/true)
31 {
32 }
35 : Base(config, assembler, data_out, adaptor, /*implicit=*/false, /*explicit=*/true)
36 {
37 }
39
40 virtual void run(AbstractFlowingVariables<NumberType, VectorType> &initial_condition, const double t_start,
41 const double t_stop) override;
42
43 void set_method(const uint method);
44
45 private:
46 void run(VectorType &initial_data, const double t_start, const double t_stop);
47 void run(BlockVectorType &initial_data, const double t_start, const double t_stop);
48 void run_vars(VectorType &initial_data, const double t_start, const double t_stop);
49
51 };
52
53 // ##############################################################################
54 // Application-facing spelling
55 // ##############################################################################
56 //
57 // The class above takes the linear algebra spelled out because it is compiled out of line: the
58 // set of valid arguments is closed by the explicit instantiations in src/, and keying it on the
59 // assembler would explode that set into one instantiation per model. Applications name the
60 // assembler instead and let these aliases project it onto that fixed parameter list.
61 //
62 // The argument is anything exposing VectorType, SparseMatrixType and dim -- an Assembler, or a
63 // Discretization where the assembler type is not a single type (e.g. a test that runs one
64 // discretization against several models).
65 template <typename Assembler>
68} // namespace DiFfRG
Implement a simple interface to do all adaptivity tasks, i.e. solution transfer, reinit of dofHandler...
Definition abstract_adaptor.hh:11
This is the general assembler interface for any kind of discretization. An assembler is responsible f...
Definition abstract_assembler.hh:54
A class to set up initial data for whatever discretization we have chosen. Also used to switch/manage...
Definition abstract_data.hh:21
The abstract base class for all timestepping algorithms. It provides a standard constructor which pop...
Definition abstract_timestepper.hh:155
struct DiFfRG::AbstractTimestepper::ExplicitParameters expl
typename get_type::BlockVectorType< VectorType > BlockVectorType
Definition abstract_timestepper.hh:169
AbstractAssembler< VectorType, SparseMatrixType, dim > & assembler
Definition abstract_timestepper.hh:309
OutputSession_impl< dim, VectorType > & data_out
Definition abstract_timestepper.hh:310
AbstractAdaptor< VectorType > & adaptor
Definition abstract_timestepper.hh:311
typename get_type::NumberType< VectorType > NumberType
Definition abstract_timestepper.hh:159
const ConfigTree config
Definition abstract_timestepper.hh:307
struct DiFfRG::AbstractTimestepper::ImplicitParameters impl
double output_dt
Definition abstract_timestepper.hh:318
A hierarchical configuration tree, readable from JSON and TOML files.
Definition config_tree.hh:32
Definition output_session.hh:176
Definition rk.hh:17
void run(VectorType &initial_data, const double t_start, const double t_stop)
TimeStepperRK_impl(const ConfigTree &config, AbstractAssembler< VectorType, SparseMatrixType, dim > &assembler, OutputSession_impl< dim, VectorType > &data_out, AbstractAdaptor< VectorType > &adaptor)
Definition rk.hh:33
void set_method(const uint method)
uint method
Definition rk.hh:50
void run_vars(VectorType &initial_data, const double t_start, const double t_stop)
virtual void run(AbstractFlowingVariables< NumberType, VectorType > &initial_condition, const double t_start, const double t_stop) override
typename Base::BlockVectorType BlockVectorType
Definition rk.hh:22
void run(BlockVectorType &initial_data, const double t_start, const double t_stop)
typename Base::NumberType NumberType
Definition rk.hh:21
TimeStepperRK_impl(const ConfigTree &config, AbstractAssembler< VectorType, SparseMatrixType, dim > &assembler, OutputSession_impl< dim, VectorType > &data_out)
Definition rk.hh:28
All compile-time knowledge about which linear algebra types DiFfRG uses.
Definition complex_math.hh:10
@ config
/discretization/threads.
unsigned int uint
Definition utils.hh:24