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

DiFfRG: /home/runner/work/DiFfRG_current/DiFfRG_current/DiFfRG/include/DiFfRG/timestepping/sundials_ida_boost_rk.hh Source File
DiFfRG
Discretization Framework for functional Renormalization Group flows
sundials_ida_boost_rk.hh
Go to the documentation of this file.
1#pragma once
2
3// DiFfRG
13
14namespace DiFfRG
15{
25 template <typename VectorType, typename SparseMatrixType, uint dim,
26 template <typename...> typename LinearSolver, int prec>
27 class TimeStepperSUNDIALS_IDA_BoostRK_impl : public AbstractTimestepper<VectorType, SparseMatrixType, dim>
28 {
30
31 public:
32 using NumberType = typename Base::NumberType;
34
50
52
53 virtual void run(AbstractFlowingVariables<NumberType, VectorType> &initial_condition, const double t_start,
54 const double t_stop) override;
55
56 private:
57 void run(BlockVectorType &initial_data, const double t_start, const double t_stop);
58 void update_variables(VectorType &variable_y, const VectorType &spatial_y, const double t);
59 };
60
61 // ##############################################################################
62 // Application-facing spelling
63 // ##############################################################################
64 //
65 // The class above takes the linear algebra spelled out because it is compiled out of line: the
66 // set of valid arguments is closed by the explicit instantiations in src/. Applications name the
67 // assembler instead and let these aliases project it onto that fixed parameter list.
68 //
69 // The argument is anything exposing VectorType, SparseMatrixType and dim -- an Assembler, or a
70 // Discretization where the assembler type is not a single type (e.g. a test that runs one
71 // discretization against several models).
72
73 template <typename Assembler, template <typename...> typename LinearSolver, int prec>
75 TimeStepperSUNDIALS_IDA_BoostRK_impl<typename Assembler::VectorType, typename Assembler::SparseMatrixType,
76 Assembler::dim, LinearSolver, prec>;
77
83 template <typename Assembler, template <typename...> typename LinearSolver = DefaultLinearSolver>
85
89 template <typename Assembler, template <typename...> typename LinearSolver = DefaultLinearSolver>
91} // 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
VectorType VectorType
Definition abstract_timestepper.hh:158
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
A class to perform time stepping using the adaptive Boost Runge-Kutta method for the explicit part an...
Definition sundials_ida_boost_rk.hh:28
typename stepperChoice< prec >::value error_stepper_type
Definition sundials_ida_boost_rk.hh:51
TimeStepperSUNDIALS_IDA_BoostRK_impl(const ConfigTree &config, AbstractAssembler< VectorType, SparseMatrixType, dim > &assembler, OutputSession_impl< dim, VectorType > &data_out, AbstractAdaptor< VectorType > &adaptor)
Definition sundials_ida_boost_rk.hh:44
typename Base::NumberType NumberType
Definition sundials_ida_boost_rk.hh:32
virtual void run(AbstractFlowingVariables< NumberType, VectorType > &initial_condition, const double t_start, const double t_stop) override
Any derived class must implement this method to run the timestepping algorithm.
typename Base::BlockVectorType BlockVectorType
Definition sundials_ida_boost_rk.hh:33
void run(BlockVectorType &initial_data, const double t_start, const double t_stop)
void update_variables(VectorType &variable_y, const VectorType &spatial_y, const double t)
TimeStepperSUNDIALS_IDA_BoostRK_impl(const ConfigTree &config, AbstractAssembler< VectorType, SparseMatrixType, dim > &assembler, OutputSession_impl< dim, VectorType > &data_out)
Definition sundials_ida_boost_rk.hh:39
The linear solver a timestepper uses when the application does not name one.
Definition complex_math.hh:10
typename internal::_default_solver< SparseMatrixType, VectorType >::type DefaultLinearSolver
The build-configuration-dependent default linear solver.
Definition default_linear_solver.hh:66
unsigned int uint
Definition utils.hh:24
std::conditional_t< prec==0, error_stepper_type_0, error_stepper_type_1 > value
Definition boost_rk.hh:24