riccaticpp
Loading...
Searching...
No Matches
riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator > Class Template Reference

#include <solver.hpp>

Public Types

using Scalar = Scalar_
 
using Integral = Integral_
 
using complex_t = std::complex<Scalar>
 
using matrixd_t = matrix_t<Scalar>
 
using vectorc_t = vector_t<complex_t>
 
using vectord_t = vector_t<Scalar>
 
using funtype = std::decay_t<OmegaFun>
 

Public Member Functions

template<typename OmegaFun_ , typename GammaFun_ , typename Allocator_ >
 SolverInfo (OmegaFun_ &&omega_fun, GammaFun_ &&gamma_fun, Allocator_ &&alloc, Integral nini, Integral nmax, Integral n, Integral p)
 Construct a new Solver Info object.
 
template<typename OmegaFun_ , typename GammaFun_ >
 SolverInfo (OmegaFun_ &&omega_fun, GammaFun_ &&gamma_fun, Integral nini, Integral nmax, Integral n, Integral p)
 
void mem_info ()
 
RICCATI_ALWAYS_INLINE const auto & Dn () const noexcept
 
RICCATI_ALWAYS_INLINE const auto & Dn (std::size_t idx) const noexcept
 
RICCATI_ALWAYS_INLINE const auto & xn () const noexcept
 
RICCATI_ALWAYS_INLINE const auto & xp () const noexcept
 
RICCATI_ALWAYS_INLINE const auto & xp_interp () const noexcept
 
RICCATI_ALWAYS_INLINE const auto & L () const noexcept
 

Public Attributes

OmegaFun omega_fun_
 
GammaFun gamma_fun_
 
Allocator alloc_
 
Integral n_nodes_ {0}
 
std::vector< std::tuple< Integral, matrixd_t, vectord_t > > chebyshev_
 
Integral n_idx_
 
Integral p_idx_
 
vectord_t xp_interp_
 
matrixd_t L_
 
vectord_t quadwts_
 
matrixd_t integration_matrix_
 
Integral nini_
 
Integral nmax_
 
Integral n_
 
Integral p_
 

Detailed Description

template<typename OmegaFun, typename GammaFun, typename Scalar_, typename Integral_, typename Allocator = arena_allocator<Scalar_, arena_alloc>>
class riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >

Definition at line 41 of file solver.hpp.

Member Typedef Documentation

◆ complex_t

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
using riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::complex_t = std::complex<Scalar>

Definition at line 45 of file solver.hpp.

◆ funtype

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
using riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::funtype = std::decay_t<OmegaFun>

Definition at line 49 of file solver.hpp.

◆ Integral

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
using riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::Integral = Integral_

Definition at line 44 of file solver.hpp.

◆ matrixd_t

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
using riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::matrixd_t = matrix_t<Scalar>

Definition at line 46 of file solver.hpp.

◆ Scalar

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
using riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::Scalar = Scalar_

Definition at line 43 of file solver.hpp.

◆ vectorc_t

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
using riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::vectorc_t = vector_t<complex_t>

Definition at line 47 of file solver.hpp.

◆ vectord_t

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
using riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::vectord_t = vector_t<Scalar>

Definition at line 48 of file solver.hpp.

Constructor & Destructor Documentation

◆ SolverInfo() [1/2]

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
template<typename OmegaFun_ , typename GammaFun_ , typename Allocator_ >
riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::SolverInfo ( OmegaFun_ && omega_fun,
GammaFun_ && gamma_fun,
Allocator_ && alloc,
Integral nini,
Integral nmax,
Integral n,
Integral p )
inline

Construct a new Solver Info object.

Template Parameters
OmegaFun_Type of the frequency function. Must be able to take in and return scalars and vectors.
GammaFun_Type of the friction function. Must be able to take in and return scalars and vectors.
Parameters
omega_funFrequency function
gamma_funFriction function
niniMinimum number of Chebyshev nodes to use inside Chebyshev collocation steps.
nmaxMaximum number of Chebyshev nodes to use inside Chebyshev collocation steps.
n(Number of Chebyshev nodes - 1) to use inside Chebyshev collocation steps.
p(Number of Chebyshev nodes - 1) to use for computing Riccati steps.

Definition at line 143 of file solver.hpp.

◆ SolverInfo() [2/2]

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
template<typename OmegaFun_ , typename GammaFun_ >
riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::SolverInfo ( OmegaFun_ && omega_fun,
GammaFun_ && gamma_fun,
Integral nini,
Integral nmax,
Integral n,
Integral p )
inline

Definition at line 173 of file solver.hpp.

Member Function Documentation

◆ Dn() [1/2]

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
RICCATI_ALWAYS_INLINE const auto & riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::Dn ( ) const
inlinenoexcept

◆ Dn() [2/2]

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
RICCATI_ALWAYS_INLINE const auto & riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::Dn ( std::size_t idx) const
inlinenoexcept

◆ L()

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
RICCATI_ALWAYS_INLINE const auto & riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::L ( ) const
inlinenoexcept

Interpolation matrix of size (p+1, p), used for interpolating function between the nodes xp and xpinterp (for computing Riccati stepsizes).

Definition at line 250 of file solver.hpp.

References riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::L_.

◆ mem_info()

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
void riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::mem_info ( )
inline

◆ xn()

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
RICCATI_ALWAYS_INLINE const auto & riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::xn ( ) const
inlinenoexcept

Values of the independent variable evaluated at (n + 1) Chebyshev nodes over the interval [x, x + h], where x is the value of the independent variable at the start of the current step and h is the current stepsize.

Definition at line 227 of file solver.hpp.

References riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::chebyshev_, and riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::n_idx_.

◆ xp()

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
RICCATI_ALWAYS_INLINE const auto & riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::xp ( ) const
inlinenoexcept

Values of the independent variable evaluated at (p + 1) Chebyshev nodes over the interval [x, x + h], where x is the value of the independent variable at the start of the current step and h is the current stepsize.

Definition at line 237 of file solver.hpp.

References riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::chebyshev_, and riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::p_idx_.

◆ xp_interp()

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
RICCATI_ALWAYS_INLINE const auto & riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::xp_interp ( ) const
inlinenoexcept

Member Data Documentation

◆ alloc_

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
Allocator riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::alloc_

Definition at line 55 of file solver.hpp.

◆ chebyshev_

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
std::vector<std::tuple<Integral, matrixd_t, vectord_t> > riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::chebyshev_

Definition at line 59 of file solver.hpp.

◆ gamma_fun_

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
GammaFun riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::gamma_fun_

Definition at line 53 of file solver.hpp.

◆ integration_matrix_

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
matrixd_t riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::integration_matrix_

Definition at line 81 of file solver.hpp.

◆ L_

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
matrixd_t riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::L_

Definition at line 77 of file solver.hpp.

◆ n_

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
Integral riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::n_

Definition at line 92 of file solver.hpp.

◆ n_idx_

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
Integral riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::n_idx_

Definition at line 61 of file solver.hpp.

◆ n_nodes_

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
Integral riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::n_nodes_ {0}

Definition at line 57 of file solver.hpp.

◆ nini_

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
Integral riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::nini_

Minimum and maximum (number of Chebyshev nodes - 1) to use inside Chebyshev collocation steps. The step will use nmax nodes or the minimum number of nodes necessary to achieve the required local error, whichever is smaller. If nmax > 2nini, collocation steps will be attempted with :math:2^i nini nodes at the ith iteration.

Definition at line 89 of file solver.hpp.

◆ nmax_

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
Integral riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::nmax_

Definition at line 90 of file solver.hpp.

◆ omega_fun_

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
OmegaFun riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::omega_fun_

Definition at line 51 of file solver.hpp.

◆ p_

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
Integral riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::p_

Definition at line 94 of file solver.hpp.

◆ p_idx_

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
Integral riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::p_idx_

Definition at line 62 of file solver.hpp.

◆ quadwts_

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
vectord_t riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::quadwts_

Definition at line 79 of file solver.hpp.

◆ xp_interp_

template<typename OmegaFun , typename GammaFun , typename Scalar_ , typename Integral_ , typename Allocator = arena_allocator<Scalar_, arena_alloc>>
vectord_t riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::xp_interp_

Values of the independent variable evaluated at p points over the interval [x, x + h] lying in between Chebyshev nodes, where x is the value of the independent variable at the start of the current step and h is the current stepsize. The in-between points :math:\\tilde{x}_p are defined by

\[ \\tilde{x}_p = \cos\left( \\frac{(2k + 1)\pi}{2p} \\right), \quad k = 0, 1, \ldots p-1. \]

Definition at line 75 of file solver.hpp.


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