Extension: Matrix functions
#include "dg/matrix/matrix.h"
|
\( x \approx f(A)b \) More...
Classes | |
class | dg::mat::UniversalLanczos< ContainerType > |
Tridiagonalize \(A\) and approximate \(f(A)b \approx |b|_W V f(T) e_1\) via Lanczos algorithm. A is self-adjoint in the weights \( W\). More... | |
struct | dg::mat::MatrixSqrt< ContainerType > |
Fast computation of \( \vec x = A^{\pm 1/2}\vec b\) for self-adjoint positive definite \(A\). More... | |
struct | dg::mat::MatrixFunction< ContainerType > |
Computation of \( \vec x = f(A)\vec b\) for self-adjoint positive definite \( A\). More... | |
class | dg::mat::MCG< ContainerType > |
EXPERIMENTAL Tridiagonalize \(A\) and approximate \(f(A)b \approx R f(\tilde T) e_1\) via CG algorithm. A is self-adjoint in the weights \( W\). More... | |
class | dg::mat::MCGFuncEigen< Container > |
EXPERIMENTAL Shortcut for \(x \approx f(A) b \) solve via exploiting first a Krylov projection achieved by the M-CG method and a matrix function computation via Eigen-decomposition. More... | |
struct | dg::mat::SqrtCauchyInt< Container > |
Cauchy integral \( \sqrt{A} b= A\frac{ 2 K' \sqrt{m}}{\pi N} \sum_{j=1}^{N} ( w_j^2 I + A)^{-1} c_j d_j b \) More... | |
struct | dg::mat::DirectSqrtCauchy< Container > |
Shortcut for \(b \approx \sqrt{A} x \) solve directly via sqrt Cauchy combined with PCG inversions. More... | |
struct | dg::mat::InvSqrtODE< Container > |
Right hand side of the square root ODE. More... | |
Functions | |
template<class value_type , class ExplicitRHS > | |
auto | dg::mat::make_directODESolve (ExplicitRHS &&ode, std::string tableau, value_type epsTimerel, value_type epsTimeabs, unsigned &number, value_type t0=0., value_type t1=1.) |
Operator that integrates an ODE from 0 to 1 with an adaptive ERK class as timestepper More... | |
template<class Matrix , class Preconditioner , class Container > | |
InvSqrtODE< Container > | dg::mat::make_inv_sqrtodeCG (Matrix &A, const Preconditioner &P, const Container &weights, dg::get_value_type< Container > epsCG) |
Right hand side of the square root ODE. More... | |
template<class MatrixType > | |
auto | dg::mat::make_expode (MatrixType &A) |
Right hand side of the exponential ODE. More... | |
template<class MatrixType > | |
auto | dg::mat::make_besselI0ode (MatrixType &A) |
Right hand side of the (zeroth order) modified Bessel function ODE, rewritten as a system of coupled first order ODEs: More... | |
\( x \approx f(A)b \)
approximation
auto dg::mat::make_besselI0ode | ( | MatrixType & | A | ) |
Right hand side of the (zeroth order) modified Bessel function ODE, rewritten as a system of coupled first order ODEs:
\[ \dot{z_0}= z_1 \]
\[ \dot{z_1}= A^2 z_0 - t^{-1} z_1 \]
where \( A\) is the matrix and
\[z=(y,\dot{y})\]
auto dg::mat::make_directODESolve | ( | ExplicitRHS && | ode, |
std::string | tableau, | ||
value_type | epsTimerel, | ||
value_type | epsTimeabs, | ||
unsigned & | number, | ||
value_type | t0 = 0. , |
||
value_type | t1 = 1. |
||
) |
Operator that integrates an ODE from 0 to 1 with an adaptive ERK class as timestepper
The intended use is to integrate Matrix equations
The call \( b = f(x) \) corresponds to integrating \( \dot y = F(y)\) with \( y(0 ) = x\) to \( b = y(1)\)
ode | The differential equation to integrate (forwarded to dg::Adaptive<dg::ERKStep> ) |
tableau | The tableau for dg::ERKStep |
epsTimerel | relative accuracy of adaptive ODE solver |
epsTimeabs | absolute accuracy of adaptive ODE solver |
number | Is linked to the lambda. Contains the number of steps the adaptive timestepper used to completion |
t0 | Change starting time to t0 |
t1 | Change end time to t1 |
dg::make_sqrtode
dg::make_expode
, dg::make_besselI0ode
auto dg::mat::make_expode | ( | MatrixType & | A | ) |
Right hand side of the exponential ODE.
\[ \dot{y}= A y \]
where \( A\) is the matrix
InvSqrtODE< Container > dg::mat::make_inv_sqrtodeCG | ( | Matrix & | A, |
const Preconditioner & | P, | ||
const Container & | weights, | ||
dg::get_value_type< Container > | epsCG | ||
) |
Right hand side of the square root ODE.
\[ \dot{y}= \left[tI + (1-t) A\right]^{-1} (I - A)/2 y \]
where \( A\) is the matrix and the inverse is computed via a dg::PCG
solver
This class is based on the approach of the paper Numerical approximation of the product of the square root of a matrix with a vector by E. J. Allen et al