16template <
class Geometry,
class Matrix,
class Container>
54 m_gamma(-0.5, {g, bcx, bcy, dir, jfactor})
56 m_ell.construct(g, bcx, bcy, dir, jfactor );
61 m_tempx = m_tempx2 = m_tempy = m_tempy2 = m_temp;
68 m_temp = m_tempx = m_tempy = m_inv_weights;
75 template<
class ...Params>
79 *
this =
PolChargeN( std::forward<Params>( ps)...);
82 template<
class ContainerType0>
87 template<
class ContainerType0>
92 template<
class ContainerType0>
97 template<
class ContainerType0>
109 return m_ell.weights();
119 return m_ell.precond();
129 template<
class ContainerType0,
class ContainerType1>
130 void operator()(
const ContainerType0& x, ContainerType1& y){
142 template<
class ContainerType0,
class ContainerType1>
143 void symv(
const ContainerType0& x, ContainerType1& y){
156 template<
class ContainerType0,
class ContainerType1>
212 Container m_phi, m_dxphi,m_dyphi, m_lapphi, m_temp, m_tempx, m_tempx2, m_tempy, m_tempy2;
215 Container m_sigma, m_vol;
216 Container m_weights, m_inv_weights, m_precond, m_weights_wo_vol;
218 Matrix m_rightx, m_righty;
224template<
class G,
class M,
class V>
EXPERIMENTAL polarization solver class for N.
Definition: polarization_init.h:18
void set_phi(const ContainerType0 &phi)
Definition: polarization_init.h:83
Geometry geometry_type
Definition: polarization_init.h:20
void set_dyphi(const ContainerType0 &dyphi)
Definition: polarization_init.h:93
void operator()(const ContainerType0 &x, ContainerType1 &y)
Compute elliptic term and store in output.
Definition: polarization_init.h:130
Container container_type
Definition: polarization_init.h:22
void symv(value_type alpha, const ContainerType0 &x, value_type beta, ContainerType1 &y)
Compute elliptic term and add to output.
Definition: polarization_init.h:157
void set_dxphi(const ContainerType0 &dxphi)
Definition: polarization_init.h:88
const Container & weights() const
Return the vector making the matrix symmetric.
Definition: polarization_init.h:108
Matrix matrix_type
Definition: polarization_init.h:21
PolChargeN()
empty object ( no memory allocation)
Definition: polarization_init.h:25
get_value_type< Container > value_type
Definition: polarization_init.h:23
void symv(const ContainerType0 &x, ContainerType1 &y)
Compute elliptic term and store in output.
Definition: polarization_init.h:143
const Container & precond() const
Return the default preconditioner to use in conjugate gradient.
Definition: polarization_init.h:118
void set_lapphi(const ContainerType0 &lapphi)
Definition: polarization_init.h:98
void construct(Params &&...ps)
Perfect forward parameters to one of the constructors.
Definition: polarization_init.h:76
PolChargeN(const Geometry &g, bc bcx, bc bcy, direction dir=forward, value_type jfactor=1.)
Construct from grid and boundary conditions.
Definition: polarization_init.h:51
PolChargeN(const Geometry &g, direction dir=forward, value_type jfactor=1.)
Construct from Grid.
Definition: polarization_init.h:35
void assign(const from_ContainerType &from, ContainerType &to, Params &&... ps)
static DG_DEVICE double one(double x)
static DG_DEVICE double zero(double x)
void copy(const ContainerTypeIn &source, ContainerTypeOut &target)
void plus(ContainerType &x, get_value_type< ContainerType > alpha)
void axpbypgz(get_value_type< ContainerType > alpha, const ContainerType1 &x, get_value_type< ContainerType > beta, const ContainerType2 &y, get_value_type< ContainerType > gamma, ContainerType &z)
void scal(ContainerType &x, get_value_type< ContainerType > alpha)
void pointwiseDot(get_value_type< ContainerType > alpha, const ContainerType1 &x1, const ContainerType2 &x2, get_value_type< ContainerType > beta, ContainerType &y)
void gemv(get_value_type< ContainerType1 > alpha, MatrixType &&M, const ContainerType1 &x, get_value_type< ContainerType1 > beta, ContainerType2 &y)
void transfer(const MatrixType &x, AnotherMatrixType &y)
EllSparseBlockMat< real_type > dx(const aRealTopology2d< real_type > &g, bc bcx, direction dir=centered)
EllSparseBlockMat< real_type > dy(const aRealTopology2d< real_type > &g, bc bcy, direction dir=centered)
thrust::host_vector< real_type > evaluate(UnaryOp f, const RealGrid1d< real_type > &g)
MPI_Vector< thrust::host_vector< real_type > > weights(const aRealMPITopology2d< real_type > &g)
MPI_Vector< thrust::host_vector< real_type > > inv_weights(const aRealMPITopology2d< real_type > &g)
get_host_vector< Geometry > volume(const Geometry &g)
get_host_vector< Geometry > inv_volume(const Geometry &g)
void scalar_product2d(get_value_type< ContainerType0 > alpha, const ContainerTypeL &lambda, const ContainerType0 &v0, const ContainerType1 &v1, const SparseTensor< ContainerType2 > &t, const ContainerTypeM &mu, const ContainerType3 &w0, const ContainerType4 &w1, get_value_type< ContainerType0 > beta, ContainerType5 &y)
ContainerType volume(const SparseTensor< ContainerType > &t)
typename TensorTraits< std::decay_t< Vector > >::value_type get_value_type
Classes for Krylov space approximations of a Matrix-Vector product.
get_value_type< V > value_type
Definition: polarization_init.h:227