Vulpes  0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
Loading...
Searching...
No Matches
vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType > Class Template Reference

Runge-Kutta solver for M du/dt + L u + N(u) = F(t). L is implicit when the Butcher table has an implicit part, N is always explicit. Default linear solver: PrecondOnly + LU (see getSolver()). More...

#include <imex.hpp>

Collaboration diagram for vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >:
[legend]

Public Types

using real_t = PetscScalar
using NonlinearPartFunc
using ForceFunc = std::function<void(real_t, la::Vector&)>

Public Member Functions

 TimeIntegratorDIRKIMEX (real_t initial_time, real_t final_time, real_t step_size, const la::Vector &initial_condition, const la::SparseMatrix &mass_matrix, const la::SparseMatrix &linear_op, const NonlinearPartFunc &non_linear_op, const ForceFunc &force_func)
 TimeIntegratorDIRKIMEX (real_t initial_time, real_t final_time, real_t step_size, const la::Vector &initial_condition, const la::SparseMatrix &mass_matrix, const la::SparseMatrix &linear_op, const ForceFunc &force_func)
void step ()
auto & getSolver ()
const auto & getSolver () const
const la::Vector & getSolution () const
real_t getTime () const

Protected Member Functions

void initialize ()
std::size_t prepareFSAL ()

Protected Attributes

real_t m_initial_time
real_t m_final_time
real_t m_step_size
real_t m_time
std::size_t m_step = 0
la::Vector m_solution
const la::SparseMatrix & m_mass_matrix
const la::SparseMatrix & m_linear_op
const NonlinearPartFunc m_non_linear_op
const ForceFunc m_force_func
la::LinearSolver m_solver
std::vector< la::Vector > m_internal_stages_ex
std::vector< la::Vector > m_internal_stages_im
la::Vector m_force_eval
la::Vector m_stage_sol
la::Vector m_stage_rhs_ex
la::Vector m_stage_rhs_im
la::Vector m_tmp
la::SparseMatrix m_stage_operator

Static Protected Attributes

static constexpr auto & A_ex = ButcherTableType::A_ex
static constexpr auto & b_ex = ButcherTableType::b_ex
static constexpr auto & A_im = ButcherTableType::A_im
static constexpr auto & b_im = ButcherTableType::b_im
static constexpr auto & c = ButcherTableType::c

Static Private Attributes

static constexpr std::size_t n_stages = ButcherTableType::n_stages
static constexpr bool FSAL

Detailed Description

template<typename ButcherTableType>
class vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >

Runge-Kutta solver for M du/dt + L u + N(u) = F(t). L is implicit when the Butcher table has an implicit part, N is always explicit. Default linear solver: PrecondOnly + LU (see getSolver()).

Member Typedef Documentation

◆ ForceFunc

template<typename ButcherTableType>
using vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::ForceFunc = std::function<void(real_t, la::Vector&)>

◆ NonlinearPartFunc

template<typename ButcherTableType>
using vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::NonlinearPartFunc
Initial value:
std::function<void(const la::Vector&, real_t, la::Vector&)>
A wrapper around PETSc Vec for distributed vectors.
Definition vector.hpp:54
PetscScalar real_t
Definition imex.hpp:51

◆ real_t

template<typename ButcherTableType>
using vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::real_t = PetscScalar

Constructor & Destructor Documentation

◆ TimeIntegratorDIRKIMEX() [1/2]

template<typename ButcherTableType>
vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::TimeIntegratorDIRKIMEX ( real_t initial_time,
real_t final_time,
real_t step_size,
const la::Vector & initial_condition,
const la::SparseMatrix & mass_matrix,
const la::SparseMatrix & linear_op,
const NonlinearPartFunc & non_linear_op,
const ForceFunc & force_func )
inline

◆ TimeIntegratorDIRKIMEX() [2/2]

template<typename ButcherTableType>
vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::TimeIntegratorDIRKIMEX ( real_t initial_time,
real_t final_time,
real_t step_size,
const la::Vector & initial_condition,
const la::SparseMatrix & mass_matrix,
const la::SparseMatrix & linear_op,
const ForceFunc & force_func )
inline

Member Function Documentation

◆ getSolution()

template<typename ButcherTableType>
const la::Vector & vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::getSolution ( ) const
inline

◆ getSolver() [1/2]

template<typename ButcherTableType>
auto & vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::getSolver ( )
inline

◆ getSolver() [2/2]

template<typename ButcherTableType>
const auto & vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::getSolver ( ) const
inline

◆ getTime()

template<typename ButcherTableType>
real_t vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::getTime ( ) const
inline

◆ initialize()

template<typename ButcherTableType>
void vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::initialize ( )
inlineprotected

◆ prepareFSAL()

template<typename ButcherTableType>
std::size_t vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::prepareFSAL ( )
inlineprotected

◆ step()

template<typename ButcherTableType>
void vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::step ( )
inline

Member Data Documentation

◆ A_ex

template<typename ButcherTableType>
auto& vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::A_ex = ButcherTableType::A_ex
staticconstexprprotected

◆ A_im

template<typename ButcherTableType>
auto& vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::A_im = ButcherTableType::A_im
staticconstexprprotected

◆ b_ex

template<typename ButcherTableType>
auto& vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::b_ex = ButcherTableType::b_ex
staticconstexprprotected

◆ b_im

template<typename ButcherTableType>
auto& vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::b_im = ButcherTableType::b_im
staticconstexprprotected

◆ c

template<typename ButcherTableType>
auto& vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::c = ButcherTableType::c
staticconstexprprotected

◆ FSAL

template<typename ButcherTableType>
bool vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::FSAL
staticconstexprprivate
Initial value:
=
(ButcherTableType::c.back() == 1.0) &&
(ButcherTableType::A_ex.back() == ButcherTableType::b_ex) &&
(ButcherTableType::A_im.back() == ButcherTableType::b_im)

◆ m_final_time

template<typename ButcherTableType>
real_t vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_final_time
protected

◆ m_force_eval

template<typename ButcherTableType>
la::Vector vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_force_eval
protected

◆ m_force_func

template<typename ButcherTableType>
const ForceFunc vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_force_func
protected

◆ m_initial_time

template<typename ButcherTableType>
real_t vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_initial_time
protected

◆ m_internal_stages_ex

template<typename ButcherTableType>
std::vector<la::Vector> vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_internal_stages_ex
protected

◆ m_internal_stages_im

template<typename ButcherTableType>
std::vector<la::Vector> vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_internal_stages_im
protected

◆ m_linear_op

template<typename ButcherTableType>
const la::SparseMatrix& vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_linear_op
protected

◆ m_mass_matrix

template<typename ButcherTableType>
const la::SparseMatrix& vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_mass_matrix
protected

◆ m_non_linear_op

template<typename ButcherTableType>
const NonlinearPartFunc vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_non_linear_op
protected

◆ m_solution

template<typename ButcherTableType>
la::Vector vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_solution
protected

◆ m_solver

template<typename ButcherTableType>
la::LinearSolver vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_solver
protected

◆ m_stage_operator

template<typename ButcherTableType>
la::SparseMatrix vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_stage_operator
protected

◆ m_stage_rhs_ex

template<typename ButcherTableType>
la::Vector vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_stage_rhs_ex
protected

◆ m_stage_rhs_im

template<typename ButcherTableType>
la::Vector vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_stage_rhs_im
protected

◆ m_stage_sol

template<typename ButcherTableType>
la::Vector vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_stage_sol
protected

◆ m_step

template<typename ButcherTableType>
std::size_t vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_step = 0
protected

◆ m_step_size

template<typename ButcherTableType>
real_t vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_step_size
protected

◆ m_time

template<typename ButcherTableType>
real_t vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_time
protected

◆ m_tmp

template<typename ButcherTableType>
la::Vector vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::m_tmp
protected

◆ n_stages

template<typename ButcherTableType>
std::size_t vulpes::timeintegration::TimeIntegratorDIRKIMEX< ButcherTableType >::n_stages = ButcherTableType::n_stages
inlinestaticconstexprprivate

The documentation for this class was generated from the following file:
  • /__w/vulpes/vulpes/vulpes/timeintegration/dae/imex.hpp