25template <
class Geometry,
class IMatrix,
class Matrix,
class Container>
52 elliptic_( g_fine, bcx, bcy, dir)
54 construct( g_coarse, g_fine, bcx, bcy, dir);
63 template<
class ContainerType0>
68 elliptic_.set_chi( chi);
71 const Container&
weights()
const {
return weights_;}
76 const Container&
precond()
const {
return precond_;}
85 template<
class ContainerType0,
class ContainerType1>
86 void symv(
const ContainerType0& x, ContainerType1& y)
89 elliptic_.symv( temp1_, temp2_);
95 void construct(
const Geometry& g_coarse,
const Geometry& g_fine,
bc bcx,
bc bcy,
direction dir)
108 Elliptic<Geometry, Matrix, Container> elliptic_;
109 Container temp1_, temp2_;
110 Container weights_, precond_;
116template<
class G,
class IM,
class M,
class V>
117struct TensorTraits< RefinedElliptic<G, IM, M, V> >
The refined version of Elliptic.
Definition: refined_elliptic.h:27
const Container & weights() const
Definition: refined_elliptic.h:71
Geometry geometry_type
Definition: refined_elliptic.h:29
get_value_type< Container > value_type
Definition: refined_elliptic.h:32
const Container & precond() const
Returns the preconditioner to use in conjugate gradient.
Definition: refined_elliptic.h:76
Container container_type
Definition: refined_elliptic.h:31
RefinedElliptic(const Geometry &g_coarse, const Geometry &g_fine, direction dir=forward)
Construct from a coarse and a fine grid.
Definition: refined_elliptic.h:40
Matrix matrix_type
Definition: refined_elliptic.h:30
void symv(const ContainerType0 &x, ContainerType1 &y)
Computes the polarisation term.
Definition: refined_elliptic.h:86
RefinedElliptic(const Geometry &g_coarse, const Geometry &g_fine, bc bcx, bc bcy, direction dir=forward)
Construct from grid and boundary conditions.
Definition: refined_elliptic.h:51
void set_chi(const ContainerType0 &chi)
Change Chi.
Definition: refined_elliptic.h:64
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 gemv(get_value_type< ContainerType1 > alpha, MatrixType &&M, const ContainerType1 &x, get_value_type< ContainerType1 > beta, ContainerType2 &y)
; (alias for symv)
Definition: blas2.h:299
void transfer(const MatrixType &x, AnotherMatrixType &y)
; Generic way to copy and/or convert a Matrix type to a different Matrix type
Definition: blas2.h:443
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
MPI_Vector< thrust::host_vector< real_type > > weights(const aRealMPITopology2d< real_type > &g)
Nodal weight coefficients.
Definition: mpi_weights.h:22
cusp::coo_matrix< int, real_type, cusp::host_memory > interpolation(const thrust::host_vector< real_type > &x, const RealGrid1d< real_type > &g, dg::bc bcx=dg::NEU, std::string method="dg")
Create interpolation matrix.
Definition: interpolation.h:254
dg::MIHMatrix_t< real_type > projection(const aRealMPITopology2d< real_type > &g_new, const aRealMPITopology2d< real_type > &g_old, std::string method="dg")
Create a projection between two grids.
Definition: mpi_projection.h:247
ContainerType volume(const SparseTensor< ContainerType > &t)
Definition: multiply.h:406
typename TensorTraits< std::decay_t< Vector > >::value_type get_value_type
Definition: tensor_traits.h:38
1D, 2D and 3D interpolation matrix creation functions
Useful MPI typedefs and overloads of interpolation and projection.
This is the namespace for all functions and classes defined and used by the discontinuous Galerkin li...
Creation of projection matrices.
NotATensorTag tensor_category
Definition: tensor_traits.h:33
void value_type
Definition: tensor_traits.h:32