numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
num_collect::ode::avf::avf2_formula< Problem > Class Template Reference

Class of 2nd order average vector field (AVF) method [21]. More...

#include <num_collect/ode/avf/avf2_formula.h>

+ Collaboration diagram for num_collect::ode::avf::avf2_formula< Problem >:

Public Types

using problem_type = Problem
 Type of problem.
 
using scalar_type = typename problem_type::scalar_type
 Type of scalars.
 
using variable_type = typename problem_type::variable_type
 Type of variables.
 

Public Member Functions

 avf2_formula (const problem_type &problem=problem_type())
 Constructor.
 
auto problem () -> problem_type &
 Get the problem.
 
auto problem () const -> const problem_type &
 Get the problem.
 
void step (scalar_type time, scalar_type step_size, const variable_type &current, variable_type &estimate)
 Compute the next variable.
 
void tol_residual_norm (scalar_type val)
 Set tolerance of residual norm.
 

Static Public Attributes

static constexpr auto log_tag
 Log tag.
 
static constexpr index_type order = 2
 Order of this formula.
 
static constexpr index_type stages = 1
 Number of stages of this formula.
 

Private Attributes

impl::avf_integrand< problem_typeintegrand_
 Integrand.
 
integration::gauss_legendre_integrator< variable_type(scalar_type)> integrator_ {integrator_degree}
 Integrator.
 
scalar_type tol_residual_norm_ {default_tol_residual_norm}
 Tolerance of residual norm.
 

Static Private Attributes

static constexpr auto default_tol_residual_norm
 Default tolerance of residual norm.
 
static constexpr index_type integrator_degree = 5
 Degree of integrator.
 

Detailed Description

template<concepts::problem Problem>
class num_collect::ode::avf::avf2_formula< Problem >

Class of 2nd order average vector field (AVF) method [21].

Template Parameters
ProblemType of problem.

Definition at line 46 of file avf2_formula.h.

Member Typedef Documentation

◆ problem_type

template<concepts::problem Problem>
using num_collect::ode::avf::avf2_formula< Problem >::problem_type = Problem

Type of problem.

Definition at line 49 of file avf2_formula.h.

◆ scalar_type

template<concepts::problem Problem>
using num_collect::ode::avf::avf2_formula< Problem >::scalar_type = typename problem_type::scalar_type

Type of scalars.

Definition at line 55 of file avf2_formula.h.

◆ variable_type

template<concepts::problem Problem>
using num_collect::ode::avf::avf2_formula< Problem >::variable_type = typename problem_type::variable_type

Type of variables.

Definition at line 52 of file avf2_formula.h.

Constructor & Destructor Documentation

◆ avf2_formula()

template<concepts::problem Problem>
num_collect::ode::avf::avf2_formula< Problem >::avf2_formula ( const problem_type & problem = problem_type())
inlineexplicit

Constructor.

Parameters
[in]problemProblem.

Definition at line 72 of file avf2_formula.h.

Member Function Documentation

◆ problem() [1/2]

template<concepts::problem Problem>
auto num_collect::ode::avf::avf2_formula< Problem >::problem ( ) -> problem_type&
inlinenodiscard

Get the problem.

Returns
Problem.

Definition at line 111 of file avf2_formula.h.

◆ problem() [2/2]

template<concepts::problem Problem>
auto num_collect::ode::avf::avf2_formula< Problem >::problem ( ) const -> const problem_type&
inlinenodiscard

Get the problem.

Returns
Problem.

Definition at line 120 of file avf2_formula.h.

◆ step()

template<concepts::problem Problem>
void num_collect::ode::avf::avf2_formula< Problem >::step ( scalar_type time,
scalar_type step_size,
const variable_type & current,
variable_type & estimate )
inline

Compute the next variable.

Parameters
[in]timeCurrent time.
[in]step_sizeStep size.
[in]currentCurrent variable.
[out]estimateEstimate of the next variable.

Definition at line 83 of file avf2_formula.h.

◆ tol_residual_norm()

template<concepts::problem Problem>
void num_collect::ode::avf::avf2_formula< Problem >::tol_residual_norm ( scalar_type val)
inline

Set tolerance of residual norm.

Parameters
[in]valValue.

Definition at line 129 of file avf2_formula.h.

Member Data Documentation

◆ default_tol_residual_norm

template<concepts::problem Problem>
auto num_collect::ode::avf::avf2_formula< Problem >::default_tol_residual_norm
staticconstexprprivate
Initial value:
=
static_cast<scalar_type>(1e-8)
typename problem_type::scalar_type scalar_type
Type of scalars.

Default tolerance of residual norm.

Definition at line 147 of file avf2_formula.h.

◆ integrand_

template<concepts::problem Problem>
impl::avf_integrand<problem_type> num_collect::ode::avf::avf2_formula< Problem >::integrand_
private

Integrand.

Definition at line 137 of file avf2_formula.h.

◆ integrator_

template<concepts::problem Problem>
integration::gauss_legendre_integrator<variable_type(scalar_type)> num_collect::ode::avf::avf2_formula< Problem >::integrator_ {integrator_degree}
private

Integrator.

Definition at line 144 of file avf2_formula.h.

◆ integrator_degree

template<concepts::problem Problem>
index_type num_collect::ode::avf::avf2_formula< Problem >::integrator_degree = 5
staticconstexprprivate

Degree of integrator.

Definition at line 140 of file avf2_formula.h.

◆ log_tag

template<concepts::problem Problem>
auto num_collect::ode::avf::avf2_formula< Problem >::log_tag
staticconstexpr
Initial value:
=
logging::log_tag_view("num_collect::ode::avf::avf2_formula")

Log tag.

Definition at line 64 of file avf2_formula.h.

◆ order

template<concepts::problem Problem>
index_type num_collect::ode::avf::avf2_formula< Problem >::order = 2
staticconstexpr

Order of this formula.

Definition at line 61 of file avf2_formula.h.

◆ stages

template<concepts::problem Problem>
index_type num_collect::ode::avf::avf2_formula< Problem >::stages = 1
staticconstexpr

Number of stages of this formula.

Definition at line 58 of file avf2_formula.h.

◆ tol_residual_norm_

template<concepts::problem Problem>
scalar_type num_collect::ode::avf::avf2_formula< Problem >::tol_residual_norm_ {default_tol_residual_norm}
private

Tolerance of residual norm.

Definition at line 151 of file avf2_formula.h.


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