Computation of \( \vec x = f(A)\vec b\) for self-adjoint positive definite \( A\).
More...
|
| MatrixFunction ()=default |
| Construct empty. More...
|
|
template<class MatrixType > |
| MatrixFunction (MatrixType &A, const ContainerType &weights, value_type eps_rel, value_type nrmb_correction=1., unsigned max_iter=500, std::function< value_type(value_type)> f_inner=[](value_type x){return x;}) |
| Construct from matrix. More...
|
|
template<class ... Params> |
void | construct (Params &&...ps) |
| Perfect forward parameters to one of the constructors. More...
|
|
unsigned | get_iter () const |
| Get the number of Lanczos iterations in latest call to operator() More...
|
|
void | set_benchmark (bool benchmark, std::string message="Function") |
| Set or unset performance timings during iterations. More...
|
|
template<class UnaryOp , class ContainerType0 , class ContainerType1 > |
void | operator() (UnaryOp f_outer, const ContainerType0 b, ContainerType1 &x) |
| Apply matrix function. More...
|
|
template<class ContainerType>
struct dg::mat::MatrixFunction< ContainerType >
Computation of \( \vec x = f(A)\vec b\) for self-adjoint positive definite \( A\).
where \( f(x) = f_{outer}(f_{inner}(x))\) is composed of an inner pre-factor function \(f_{inner}(x)\) and an outer \( f_{outer}(x)\) function. The rational for this design choice is maintain flexibility when using this class in one of our exponential integrators where the outer function is set by the time integrator itself while \( f_{inner}\) can be set by the user. Outside the exponential time integrator \( f_{inner}\) has no use and left as the default identity.
The class is a convenience wrapper that uses dg::mat::UniversalLanczos
combined with dg::mat::make_FuncEigen_Te1( f)
in its "universal" stopping criterion
- Attention
- Just as in the Lanczos or PCG methods the matrix \( A\) needs to be positive-definite (i.e. it won't work for negative definite)