ExplicitRungeKuttaChebyshevIntegrator< number > Class Template Reference

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

#include <explicit_runge_kutta_chebyshev_integrator.hpp>

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

Classes

struct  RecurrenceWeights
 Stage-dependent weights of the three-term recurrence of the RKC scheme. More...
 
struct  Registers
 Registers for intermediate solution storage. More...
 

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

 ExplicitRungeKuttaChebyshevIntegrator (const TimeIntegratorData< number > &time_integrator_data, const RhsFunctionType &compute_rhs)
 
unsigned int required_solution_history_size () const override
 
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

unsigned int n_stages
 Number of stages of the RKC scheme.
 
RecurrenceWeights weights
 
Registers registers
 
RhsFunctionType compute_rhs
 

Additional Inherited Members

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

Member Typedef Documentation

◆ RhsFunctionType

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

◆ VectorType

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

Constructor & Destructor Documentation

◆ ExplicitRungeKuttaChebyshevIntegrator()

template<typename number >
MeltPoolDG::TimeIntegration::ExplicitRungeKuttaChebyshevIntegrator< number >::ExplicitRungeKuttaChebyshevIntegrator ( const TimeIntegratorData< number > &  time_integrator_data,
const RhsFunctionType &  compute_rhs 
)
explicit

Constructor. Set the coefficients for the Runge-Kutta Chebyshev scheme and store the function which computes the right-hand side of the ODE system internally.

Parameters
time_integrator_dataTime integrator data struct setting the scheme of the integrator.
compute_rhsFunction to compute the right-hand side of the ODE.

Member Function Documentation

◆ perform_time_step()

template<typename number >
void MeltPoolDG::TimeIntegration::ExplicitRungeKuttaChebyshevIntegrator< 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 explicit Runge-Kutta Chebyshev 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 Chebyshev stage. Four variables are passed to the function: the current time, the current time step, 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 Chebyshev stage. Four variables are passed to the function: the current time after perfoming the stage, the current time step, the vector which is later used in the subsequent computations, and the solution of the Runge-Kutta Chebyshev stage.

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

◆ reinit() [1/2]

template<typename number >
void MeltPoolDG::TimeIntegration::ExplicitRungeKuttaChebyshevIntegrator< 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::ExplicitRungeKuttaChebyshevIntegrator< 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::ExplicitRungeKuttaChebyshevIntegrator< 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

◆ compute_rhs

template<typename number >
RhsFunctionType MeltPoolDG::TimeIntegration::ExplicitRungeKuttaChebyshevIntegrator< 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_runge_kutta_chebyshev_integrator.hpp:31

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::ExplicitRungeKuttaChebyshevIntegrator< number >::n_stages
private

Number of stages of the RKC scheme.

◆ registers

template<typename number >
Registers MeltPoolDG::TimeIntegration::ExplicitRungeKuttaChebyshevIntegrator< number >::registers
private

◆ weights

template<typename number >
RecurrenceWeights MeltPoolDG::TimeIntegration::ExplicitRungeKuttaChebyshevIntegrator< number >::weights
private

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