32template<
class Matrix,
class Container>
54 template<
class ...Params>
62 const Container&
weights()
const {
return m_matrix.weights();}
64 const Container&
precond()
const {
return m_matrix.precond();}
73 template<
class ContainerType0,
class ContainerType1>
74 void symv(
const ContainerType0& x, ContainerType1& y)
108 template<
class ContainerType0>
116 const Container&
chi()
const{
return m_chi;}
126template<
class Geometry,
class Matrix,
class Container>
131template<
class Geometry,
class Matrix,
class Container>
136template<
class Geometry,
class Matrix,
class Container>
141template<
class Geometry,
class Matrix,
class Container>
158template<
class Geometry,
class Matrix,
class Container>
198 m_laplaceM.construct( g, bcx, bcy, dir, jfactor);
217 void symv(
const Container& x, Container& y)
230 const Container&
weights()
const {
return m_laplaceM.weights();}
236 const Container&
precond()
const {
return m_laplaceM.precond();}
258 const Container&
chi()
const {
return chi_;}
261 Container temp1_, temp2_;
266template<
class M,
class V>
267struct TensorTraits< GeneralHelmholtz<M, V> >
272template<
class G,
class M,
class V>
273struct TensorTraits< Helmholtz2<G, M, V> >
A 2d negative elliptic differential operator .
Definition: elliptic.h:231
General negative elliptic operators.
void assign(const from_ContainerType &from, ContainerType &to, Params &&... ps)
Generic way to assign the contents of a from_ContainerType object to a ContainerType object optionall...
Definition: blas1.h:665
static DG_DEVICE double one(double x)
Definition: functions.h:20
void copy(const ContainerTypeIn &source, ContainerTypeOut &target)
Definition: blas1.h:164
void axpby(get_value_type< ContainerType > alpha, const ContainerType1 &x, get_value_type< ContainerType > beta, ContainerType &y)
Definition: blas1.h:231
void pointwiseDivide(get_value_type< ContainerType > alpha, const ContainerType1 &x1, const ContainerType2 &x2, get_value_type< ContainerType > beta, ContainerType &y)
Definition: blas1.h:428
void pointwiseDot(get_value_type< ContainerType > alpha, const ContainerType1 &x1, const ContainerType2 &x2, get_value_type< ContainerType > beta, ContainerType &y)
Definition: blas1.h:336
void symv(MatrixType &&M, const ContainerType1 &x, ContainerType2 &y)
Definition: blas2.h:287
bc
Switch between boundary conditions.
Definition: enums.h:15
direction
Direction of a discrete derivative.
Definition: enums.h:97
@ forward
forward derivative (cell to the right and current cell)
Definition: enums.h:98
thrust::host_vector< real_type > evaluate(UnaryOp f, const RealGrid1d< real_type > &g)
Evaluate a 1d function on grid coordinates.
Definition: evaluation.h:67
typename TensorTraits< std::decay_t< Vector > >::value_type get_value_type
Definition: tensor_traits.h:38
This is the namespace for all functions and classes defined and used by the discontinuous Galerkin li...
A general Helmholtz-type operator .
Definition: helmholtz.h:34
Matrix matrix_type
Definition: helmholtz.h:35
value_type & alpha()
Change alpha.
Definition: helmholtz.h:95
GeneralHelmholtz()=default
empty object ( no memory allocation)
const Container & chi() const
Access chi.
Definition: helmholtz.h:116
void symv(const ContainerType0 &x, ContainerType1 &y)
Compute.
Definition: helmholtz.h:74
get_value_type< Container > value_type
Definition: helmholtz.h:37
void set_chi(const ContainerType0 &chi)
Set Chi in the above formula.
Definition: helmholtz.h:109
const Matrix & matrix() const
Read access to Matrix object.
Definition: helmholtz.h:87
value_type alpha() const
Access alpha.
Definition: helmholtz.h:101
Matrix & matrix()
Write access to Matrix object.
Definition: helmholtz.h:83
const Container & weights() const
Call weights() of Matrix class.
Definition: helmholtz.h:62
Container container_type
Definition: helmholtz.h:36
void construct(Params &&...ps)
Perfect forward parameters to one of the constructors.
Definition: helmholtz.h:55
const Container & precond() const
Call precond() of Matrix class.
Definition: helmholtz.h:64
GeneralHelmholtz(value_type alpha, Matrix matrix)
Construct from given Matrix object.
Definition: helmholtz.h:47
DEPRECATED, Matrix class that represents a more general Helmholtz-type operator.
Definition: helmholtz.h:160
get_value_type< Container > value_type
Definition: helmholtz.h:164
Helmholtz2(const Geometry &g, bc bcx, bc bcy, value_type alpha=1., direction dir=dg::forward, value_type jfactor=1.)
Construct Helmholtz2 operator.
Definition: helmholtz.h:191
void construct(const Geometry &g, bc bcx, bc bcy, value_type alpha=1, direction dir=dg::forward, value_type jfactor=1.)
Construct Helmholtz2 operator.
Definition: helmholtz.h:196
void set_chi(const Container &chi)
Set Chi in the above formula.
Definition: helmholtz.h:252
Geometry geometry_type
Definition: helmholtz.h:162
void construct(const Geometry &g, value_type alpha=1, direction dir=dg::forward, value_type jfactor=1.)
Construct Helmholtz2 operator.
Definition: helmholtz.h:204
const Container & precond() const
Preconditioner to use in conjugate gradient solvers.
Definition: helmholtz.h:236
Container container_type
Definition: helmholtz.h:161
const Container & weights() const
Return the weights making the operator self-adjoint.
Definition: helmholtz.h:230
void symv(const Container &x, Container &y)
apply operator
Definition: helmholtz.h:217
const Container & chi() const
Access chi.
Definition: helmholtz.h:258
Helmholtz2(const Geometry &g, value_type alpha=1., direction dir=dg::forward, value_type jfactor=1.)
Construct Helmholtz2 operator.
Definition: helmholtz.h:176
value_type alpha() const
Access alpha.
Definition: helmholtz.h:246
value_type & alpha()
Change alpha.
Definition: helmholtz.h:241
Matrix matrix_type
Definition: helmholtz.h:163
Helmholtz2()
empty object ( no memory allocation)
Definition: helmholtz.h:166
NotATensorTag tensor_category
Definition: tensor_traits.h:33
void value_type
Definition: tensor_traits.h:32