riccaticpp
|
#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_ |
Definition at line 41 of file solver.hpp.
using riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::complex_t = std::complex<Scalar> |
Definition at line 45 of file solver.hpp.
using riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::funtype = std::decay_t<OmegaFun> |
Definition at line 49 of file solver.hpp.
using riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::Integral = Integral_ |
Definition at line 44 of file solver.hpp.
using riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::matrixd_t = matrix_t<Scalar> |
Definition at line 46 of file solver.hpp.
using riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::Scalar = Scalar_ |
Definition at line 43 of file solver.hpp.
using riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::vectorc_t = vector_t<complex_t> |
Definition at line 47 of file solver.hpp.
using riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::vectord_t = vector_t<Scalar> |
Definition at line 48 of file solver.hpp.
|
inline |
Construct a new Solver Info object.
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. |
omega_fun | Frequency function |
gamma_fun | Friction function |
nini | Minimum number of Chebyshev nodes to use inside Chebyshev collocation steps. |
nmax | Maximum 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.
|
inline |
Definition at line 173 of file solver.hpp.
|
inlinenoexcept |
Definition at line 214 of file solver.hpp.
References riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::chebyshev_, and riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::n_idx_.
|
inlinenoexcept |
Definition at line 217 of file solver.hpp.
References riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::chebyshev_.
|
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_.
|
inline |
Definition at line 202 of file solver.hpp.
References riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::alloc_.
|
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_.
|
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_.
|
inlinenoexcept |
Definition at line 241 of file solver.hpp.
References riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::xp_interp_.
Allocator riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::alloc_ |
Definition at line 55 of file solver.hpp.
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.
GammaFun riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::gamma_fun_ |
Definition at line 53 of file solver.hpp.
matrixd_t riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::integration_matrix_ |
Definition at line 81 of file solver.hpp.
matrixd_t riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::L_ |
Definition at line 77 of file solver.hpp.
Integral riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::n_ |
Definition at line 92 of file solver.hpp.
Integral riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::n_idx_ |
Definition at line 61 of file solver.hpp.
Integral riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::n_nodes_ {0} |
Definition at line 57 of file solver.hpp.
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.
Integral riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::nmax_ |
Definition at line 90 of file solver.hpp.
OmegaFun riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::omega_fun_ |
Definition at line 51 of file solver.hpp.
Integral riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::p_ |
Definition at line 94 of file solver.hpp.
Integral riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::p_idx_ |
Definition at line 62 of file solver.hpp.
vectord_t riccati::SolverInfo< OmegaFun, GammaFun, Scalar_, Integral_, Allocator >::quadwts_ |
Definition at line 79 of file solver.hpp.
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.