23template<
class Geometry,
class Matrix,
class Container>
57 m_laplaceM_chi.construct( g, bcx, bcy, dir, jfactor);
58 m_laplaceM_iota.construct( g, bcx, bcy, dir, jfactor);
67 m_tempx = m_tempy = m_tempxy = m_tempyx = m_iota = m_helper = m_temp;
76 template<
class ...Params>
84 const Container&
weights()
const {
return m_laplaceM_chi.weights();}
90 const Container&
precond()
const {
return m_laplaceM_chi.precond();}
96 template<
class ContainerType0>
97 void set_chi(
const ContainerType0& chi) {m_laplaceM_chi.set_chi(chi); }
103 template<
class ContainerType0>
104 void set_iota(
const ContainerType0& iota) {m_iota=iota; }
142 template<
class ContainerType0,
class ContainerType1>
143 void operator()(
const ContainerType0& x, ContainerType1& y){
147 template<
class ContainerType0,
class ContainerType1>
148 void symv(
const ContainerType0& x, ContainerType1& y){
164 template<
class ContainerType0,
class ContainerType1>
211 bc inverse(
bc bound)
213 if( bound ==
DIR)
return NEU;
214 if( bound ==
NEU)
return DIR;
226 Matrix m_leftx, m_lefty, m_rightx, m_righty, m_jumpX, m_jumpY;
227 Container m_temp, m_tempx, m_tempy, m_tempxy, m_tempyx, m_iota, m_helper;
228 SparseTensor<Container> m_chi;
229 SparseTensor<Container> m_metric;
230 Container m_sigma, m_vol;
237template<
class G,
class M,
class V>
238struct TensorTraits< mat::TensorElliptic<G, M, V> >
void assign(const from_ContainerType &from, ContainerType &to, Params &&... ps)
static DG_DEVICE double one(double x)
void axpby(get_value_type< ContainerType > alpha, const ContainerType1 &x, get_value_type< ContainerType > beta, ContainerType &y)
void pointwiseDivide(get_value_type< ContainerType > alpha, const ContainerType1 &x1, const ContainerType2 &x2, get_value_type< ContainerType > beta, ContainerType &y)
void pointwiseDot(get_value_type< ContainerType > alpha, const ContainerType1 &x1, const ContainerType2 &x2, get_value_type< ContainerType > beta, ContainerType &y)
void transfer(const MatrixType &x, AnotherMatrixType &y)
void symv(MatrixType &&M, const ContainerType1 &x, ContainerType2 &y)
EllSparseBlockMat< real_type > dx(const aRealTopology2d< real_type > &g, bc bcx, direction dir=centered)
EllSparseBlockMat< real_type > jumpX(const aRealTopology2d< real_type > &g, bc bcx)
EllSparseBlockMat< real_type > dy(const aRealTopology2d< real_type > &g, bc bcy, direction dir=centered)
EllSparseBlockMat< real_type > jumpY(const aRealTopology2d< real_type > &g, bc bcy)
thrust::host_vector< real_type > evaluate(UnaryOp f, const RealGrid1d< real_type > &g)
Elliptic2d< Geometry, Matrix, Container > Elliptic
void multiply2d(const ContainerTypeL &lambda, const SparseTensor< ContainerType0 > &t, const ContainerType1 &in0, const ContainerType2 &in1, const ContainerTypeM &mu, ContainerType3 &out0, ContainerType4 &out1)
ContainerType volume(const SparseTensor< ContainerType > &t)
void scal(SparseTensor< ContainerType0 > &t, const ContainerType1 &mu)
typename TensorTraits< std::decay_t< Vector > >::value_type get_value_type
Classes for Krylov space approximations of a Matrix-Vector product.
NotATensorTag tensor_category
Matrix class that represents the arbitrary polarization operator.
Definition: tensorelliptic.h:25
void symv(value_type alpha, const ContainerType0 &x, value_type beta, ContainerType1 &y)
apply operator
Definition: tensorelliptic.h:165
const Container & weights() const
Definition: tensorelliptic.h:84
Container container_type
Definition: tensorelliptic.h:26
TensorElliptic(const Geometry &g, direction dir=dg::centered, value_type jfactor=1.)
Construct TensorElliptic operator.
Definition: tensorelliptic.h:40
Geometry geometry_type
Definition: tensorelliptic.h:27
void set_iota(const ContainerType0 &iota)
Set Iota in the above formula.
Definition: tensorelliptic.h:104
void construct(Params &&...ps)
Perfect forward parameters to one of the constructors.
Definition: tensorelliptic.h:77
TensorElliptic()
empty object ( no memory allocation)
Definition: tensorelliptic.h:31
const Container & precond() const
Preconditioner to use in conjugate gradient solvers.
Definition: tensorelliptic.h:90
TensorElliptic(const Geometry &g, bc bcx, bc bcy, direction dir=dg::centered, value_type jfactor=1.)
Construct TensorElliptic operator.
Definition: tensorelliptic.h:54
void operator()(const ContainerType0 &x, ContainerType1 &y)
Definition: tensorelliptic.h:143
void set_chi(const ContainerType0 &chi)
Set Chi in the above formula.
Definition: tensorelliptic.h:97
void variation(const Container &phi, const value_type &alpha, const Container &chi, Container &varphi)
compute the variational of the operator (psi_2 in gf theory):
Definition: tensorelliptic.h:113
get_value_type< Container > value_type
Definition: tensorelliptic.h:29
void symv(const ContainerType0 &x, ContainerType1 &y)
Definition: tensorelliptic.h:148
Matrix matrix_type
Definition: tensorelliptic.h:28