LowStorageExplicitRungeKuttaIntegrator< number > Class Template Reference

Developer Documentation: MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number > Class Template Reference
Developer Documentation
MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number > Class Template Referencefinal

#include <explicit_low_storage_runge_kutta_integrator.hpp>

Inheritance diagram for MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number >:
[legend]
Collaboration diagram for MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number >:
[legend]

Public Types

using VectorType = dealii::LinearAlgebra::distributed::Vector< number >
 
using RhsFunctionType = std::function< void(number, number, VectorType &, const VectorType &, std::function< void(unsigned, unsigned)>)>
 

Public Member Functions

 LowStorageExplicitRungeKuttaIntegrator (const TimeIntegratorData< number > &time_integrator_data)
 
unsigned int required_solution_history_size () const override
 
void configure_rhs (const RhsFunctionType &compute_rhs_in)
 Configure the function used to compute the right-hand side of the ODE.
 
void reinit (const VectorType &vector_template) override
 
void reinit (const SolutionHistory< VectorType > &solution_history) override
 
void perform_time_step (const number current_time, const number time_step, SolutionHistory< VectorType > &solution_history, const std::function< void(number, number, VectorType &, const VectorType &)> &stage_pre_processing, const std::function< void(number, number, VectorType &, const VectorType &)> &stage_post_processing) override
 
- Public Member Functions inherited from MeltPoolDG::TimeIntegration::TimeIntegratorBase< number >
 TimeIntegratorBase (const TimeIntegratorData< number > &time_integrator_data_in)
 
virtual ~TimeIntegratorBase ()=default
 
TimeIntegratorSchemes get_integrator_type () const
 
void set_monitoring_vector (VectorType &monitoring_vector_in)
 
void reset_monitoring_vector ()
 

Private Attributes

std::vector< number > bi
 Runge-Kutta final update weights.
 
std::vector< number > ai
 Runge-Kutta stage weight coefficients.
 
std::vector< number > ci
 Runge-Kutta stage time coefficients.
 
unsigned int n_stages
 Number of stages of the Runge-Kutta scheme.
 
dealii::LinearAlgebra::distributed::Vector< number > rk_register_ri
 Intermediate storage for the Runge-Kutta stage derivatives.
 
dealii::LinearAlgebra::distributed::Vector< number > rk_register_ki
 Intermediate storage for the Runge-Kutta stage solutions.
 
RhsFunctionType compute_rhs
 

Additional Inherited Members

- Protected Attributes inherited from MeltPoolDG::TimeIntegration::TimeIntegratorBase< number >
const TimeIntegratorData< number > time_integrator_data
 
VectorTypemonitoring_vector = nullptr
 

Member Typedef Documentation

◆ RhsFunctionType

template<typename number >
using MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number >::RhsFunctionType = std::function<void(number, number, VectorType &, const VectorType &, std::function<void(unsigned, unsigned)>)>

◆ VectorType

template<typename number >
using MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number >::VectorType = dealii::LinearAlgebra::distributed::Vector<number>

Constructor & Destructor Documentation

◆ LowStorageExplicitRungeKuttaIntegrator()

template<typename number >
MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number >::LowStorageExplicitRungeKuttaIntegrator ( const TimeIntegratorData< number > &  time_integrator_data)
explicit

Constructor. Set the coefficients for the low storage explicit Runge-Kutta scheme.

Parameters
time_integrator_dataTime integrator data struct setting the scheme of the integrator.

Member Function Documentation

◆ configure_rhs()

template<typename number >
void MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number >::configure_rhs ( const RhsFunctionType compute_rhs_in)

Configure the function used to compute the right-hand side of the ODE.

Sets the class member compute_rhs to the provided function. For details on the expected function signature and behavior, see the documentation of the corresponding class member.

Parameters
compute_rhs_inFunction to compute the right-hand side of the ODE.

◆ perform_time_step()

template<typename number >
void MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number >::perform_time_step ( const number  current_time,
const number  time_step,
SolutionHistory< VectorType > &  solution_history,
const std::function< void(number, number, VectorType &, const VectorType &)> &  stage_pre_processing,
const std::function< void(number, number, VectorType &, const VectorType &)> &  stage_post_processing 
)
overridevirtual

Perform the actual time integration for a single time step using the low storage explicit Runge-Kutta scheme.

Parameters
current_timeCurrent time.
time_stepCurrent time step size.
solution_historySolution history object providing the current and all required previous solutions.
stage_pre_processingFunction which is executed at the beginning of each Runge-Kutta stage. Three variables are passed to the function: the current time, the vector which is later used in the stage computation, and the current stage solution.
stage_post_processingFunction which is executed at the end of each Runge-Kutta stage. Three variables are passed to the function: the current time after perfoming the stage, the vector which is later used in the subsequent computations, and the solution of the Runge-Kutta stage.

Implements MeltPoolDG::TimeIntegration::TimeIntegratorBase< number >.

◆ reinit() [1/2]

template<typename number >
void MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number >::reinit ( const SolutionHistory< VectorType > &  solution_history)
overridevirtual

Sets up the necessary internal data structures by internally calling reinit(solution_history.get_current_solution()).

Reimplemented from MeltPoolDG::TimeIntegration::TimeIntegratorBase< number >.

◆ reinit() [2/2]

template<typename number >
void MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number >::reinit ( const VectorType vector_template)
overridevirtual

Allocate memory for the required vectors used during the integration. This function needs to be called once before the function perform_time_step() can be called.

Parameters
vector_templateReference vector used to define the partitioning for all internal vectors.

Implements MeltPoolDG::TimeIntegration::TimeIntegratorBase< number >.

◆ required_solution_history_size()

template<typename number >
unsigned MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number >::required_solution_history_size ( ) const
overridevirtual

Returns the number of previous solutions, that is solutions at time step n - x, where x >= 0, required by the time integrator.

Implements MeltPoolDG::TimeIntegration::TimeIntegratorBase< number >.

Member Data Documentation

◆ ai

template<typename number >
std::vector<number> MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number >::ai
private

Runge-Kutta stage weight coefficients.

◆ bi

template<typename number >
std::vector<number> MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number >::bi
private

Runge-Kutta final update weights.

◆ ci

template<typename number >
std::vector<number> MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number >::ci
private

Runge-Kutta stage time coefficients.

◆ compute_rhs

template<typename number >
RhsFunctionType MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number >::compute_rhs
private

Given an ODE system of the form

\[ y' = F(y), \]

this function computes the right-hand side \(F(y)\).

Function Signature:

void f(number time,
number time_step,
VectorType &dst,
const VectorType &src,
std::function<void(unsigned, unsigned)> post);
dealii::LinearAlgebra::distributed::Vector< number > VectorType
Definition explicit_low_storage_runge_kutta_integrator.hpp:35

Parameters:

  • time : Current simulation time at \(t^n\).
  • time_step : Current step size \(\Delta t\).
  • dst : Destination vector for the RHS result.
  • src : Source solution vector \(y^n\).
  • post : Post-processing function applied after computing the RHS. Receives a range of global indices [begin, end) to process, ensuring all indices are handled. Designed for efficient integration with deal.II’s matrix-free framework.

◆ n_stages

template<typename number >
unsigned int MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number >::n_stages
private

Number of stages of the Runge-Kutta scheme.

◆ rk_register_ki

template<typename number >
dealii::LinearAlgebra::distributed::Vector<number> MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number >::rk_register_ki
private

Intermediate storage for the Runge-Kutta stage solutions.

◆ rk_register_ri

template<typename number >
dealii::LinearAlgebra::distributed::Vector<number> MeltPoolDG::TimeIntegration::LowStorageExplicitRungeKuttaIntegrator< number >::rk_register_ri
private

Intermediate storage for the Runge-Kutta stage derivatives.


The documentation for this class was generated from the following files: