Discontinuous Galerkin Library
#include "dg/algorithm.h"
dg::RefinedElliptic< Geometry, IMatrix, Matrix, Container > Class Template Reference

The refined version of Elliptic. More...

Public Types

using geometry_type = Geometry
 
using matrix_type = Matrix
 
using container_type = Container
 
using value_type = get_value_type< Container >
 

Public Member Functions

 RefinedElliptic (const Geometry &g_coarse, const Geometry &g_fine, direction dir=forward)
 Construct from a coarse and a fine grid. More...
 
 RefinedElliptic (const Geometry &g_coarse, const Geometry &g_fine, bc bcx, bc bcy, direction dir=forward)
 Construct from grid and boundary conditions. More...
 
template<class ContainerType0 >
void set_chi (const ContainerType0 &chi)
 Change Chi. More...
 
const Container & weights () const
 
const Container & precond () const
 Returns the preconditioner to use in conjugate gradient. More...
 
template<class ContainerType0 , class ContainerType1 >
void symv (const ContainerType0 &x, ContainerType1 &y)
 Computes the polarisation term. More...
 

Detailed Description

template<class Geometry, class IMatrix, class Matrix, class Container>
class dg::RefinedElliptic< Geometry, IMatrix, Matrix, Container >

The refined version of Elliptic.

Holds an Elliptic object on the fine grid and brackets every call to symv with interpolation and projection matrices

Template Parameters
GeometryA type that is or derives from one of the abstract geometry base classes ( aGeometry2d, aGeometry3d, aMPIGeometry2d, ...). Geometry determines which Matrix and Container types can be used:
MatrixA class for which the dg::blas2::symv functions are callable in connection with the Container class and to which the return type of dg::create::dx() can be converted using dg::blas2::transfer. The Matrix type can be one of:
ContainerA data container class for which the blas1 functionality is overloaded and to which the return type of blas1::subroutine() can be converted using dg::assign. We assume that Container is copyable/assignable and has a swap member function. In connection with Geometry this is one of
Attention
This class is still under construction!

Member Typedef Documentation

◆ container_type

template<class Geometry , class IMatrix , class Matrix , class Container >
using dg::RefinedElliptic< Geometry, IMatrix, Matrix, Container >::container_type = Container

◆ geometry_type

template<class Geometry , class IMatrix , class Matrix , class Container >
using dg::RefinedElliptic< Geometry, IMatrix, Matrix, Container >::geometry_type = Geometry

◆ matrix_type

template<class Geometry , class IMatrix , class Matrix , class Container >
using dg::RefinedElliptic< Geometry, IMatrix, Matrix, Container >::matrix_type = Matrix

◆ value_type

template<class Geometry , class IMatrix , class Matrix , class Container >
using dg::RefinedElliptic< Geometry, IMatrix, Matrix, Container >::value_type = get_value_type<Container>

Constructor & Destructor Documentation

◆ RefinedElliptic() [1/2]

template<class Geometry , class IMatrix , class Matrix , class Container >
dg::RefinedElliptic< Geometry, IMatrix, Matrix, Container >::RefinedElliptic ( const Geometry &  g_coarse,
const Geometry &  g_fine,
direction  dir = forward 
)
inline

Construct from a coarse and a fine grid.

Parameters
g_coarseThe coarse Grid
g_fineThe fine Grid, boundary conditions are taken from here
dirDirection of the right first derivative

◆ RefinedElliptic() [2/2]

template<class Geometry , class IMatrix , class Matrix , class Container >
dg::RefinedElliptic< Geometry, IMatrix, Matrix, Container >::RefinedElliptic ( const Geometry &  g_coarse,
const Geometry &  g_fine,
bc  bcx,
bc  bcy,
direction  dir = forward 
)
inline

Construct from grid and boundary conditions.

Parameters
g_coarseThe coarse Grid
g_fineThe fine Grid
bcxboundary condition in x
bcyboundary contition in y
dirDirection of the right first derivative (i.e. forward, backward or centered)

Member Function Documentation

◆ precond()

template<class Geometry , class IMatrix , class Matrix , class Container >
const Container & dg::RefinedElliptic< Geometry, IMatrix, Matrix, Container >::precond ( ) const
inline

Returns the preconditioner to use in conjugate gradient.

Returns
inverse weights

◆ set_chi()

template<class Geometry , class IMatrix , class Matrix , class Container >
template<class ContainerType0 >
void dg::RefinedElliptic< Geometry, IMatrix, Matrix, Container >::set_chi ( const ContainerType0 &  chi)
inline

Change Chi.

Parameters
chiThe new chi
Template Parameters
ContainerTypesmust be usable with Container in The dg dispatch system

◆ symv()

template<class Geometry , class IMatrix , class Matrix , class Container >
template<class ContainerType0 , class ContainerType1 >
void dg::RefinedElliptic< Geometry, IMatrix, Matrix, Container >::symv ( const ContainerType0 &  x,
ContainerType1 &  y 
)
inline

Computes the polarisation term.

Parameters
xleft-hand-side
yresult
Template Parameters
ContainerTypesmust be usable with Container in The dg dispatch system

◆ weights()

template<class Geometry , class IMatrix , class Matrix , class Container >
const Container & dg::RefinedElliptic< Geometry, IMatrix, Matrix, Container >::weights ( ) const
inline

The documentation for this class was generated from the following file: