4#include <boost/math/special_functions.hpp>
5#include "dg/algorithm.h"
28template<
class UnaryOp>
31 return [f](
const auto& T)
34 unsigned iter = T.O.size();
35 thrust::host_vector<value_type> evals = T.O, plus = T.P;
36 thrust::host_vector<value_type> work (2*iter-2);
39 lapack::stev(
'V', evals, plus, EHt.
data(), work);
52 catch(boost::exception& e)
82template<
class value_type>
85 return [=](
const auto& T)
87 unsigned size = T.O.size();
88 thrust::host_vector<value_type> e1H(size, 0.), yH(e1H);
92 auto wTinv = [&w = cauchysqrtH.
w(), &T = T](
const auto&
y,
auto&
x)
97 cauchysqrtH(T, wTinv, e1H, yH, EVs, stepsCauchy, exp);
122template<
class value_type>
131 return [=](
const auto& T)
133 unsigned size = T.O.size();
154template<
class value_type>
158 return [=, &num = number](
const auto& T)
160 unsigned size = T.O.size();
161 HVec e1H(size, 0), yH(e1H);
165 tableau, rtol, atol, num);
184 return [= ](
const auto& T)
186 unsigned size = T.O.size();
187 HVec e1H(size, 0), yH(e1H);
const std::vector< value_type > & data() const
SquareMatrix transpose() const
void pointwiseDot(value_type alpha, const ContainerType1 &x1, const ContainerType2 &x2, value_type1 beta, ContainerType &y)
void transform(const ContainerType1 &x, ContainerType &y, UnaryOp op)
void apply(get_value_type< ContainerType1 > alpha, MatrixType &&M, const ContainerType1 &x, get_value_type< ContainerType1 > beta, ContainerType2 &y)
void symv(MatrixType &&M, const ContainerType1 &x, ContainerType2 &y)
auto 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
Definition sqrt_ode.h:38
void compute_Tinv_y(const dg::TriDiagonal< thrust::host_vector< value_type > > &T, thrust::host_vector< value_type > &x, const thrust::host_vector< value_type > &y, value_type a=1., value_type d=0.)
Computes the value of via Thomas algorithm.
Definition tridiaginv.h:188
auto make_FuncEigen_Te1(UnaryOp f)
Create a functor that uses Eigenvalue decomposition to compute for symmetric tridiagonal T.
Definition matrixfunction.h:29
auto make_SqrtCauchy_Te1(int exp, std::array< value_type, 2 > EVs, unsigned stepsCauchy)
Create a functor that computes using SqrtCauchyInt.
Definition matrixfunction.h:83
auto make_Linear_Te1(int exp)
Create a functor that computes directly.
Definition matrixfunction.h:182
auto make_SqrtODE_Te1(int exp, std::string tableau, value_type rtol, value_type atol, unsigned &number)
Create a functor that computes using ODE solve.
Definition matrixfunction.h:155
auto make_SqrtCauchyEigen_Te1(int exp, std::array< value_type, 2 > EVs, unsigned stepsCauchy)
Create a functor that computes using either Eigen or SqrtCauchy solve based on whichever is fastest ...
Definition matrixfunction.h:123
thrust::host_vector< double > HVec
InvSqrtODE< Container > make_inv_sqrtodeTri(const Matrix &TH, const Container ©able)
Definition sqrt_ode.h:167
Functions for optimizing Contours.
Cauchy integral
Definition sqrt_cauchy.h:37
const double & w() const
The in .
Definition sqrt_cauchy.h:60
double value_type
Definition tridiaginv_b.cpp:6