3.6-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
Dumux::Projector< ScalarType > Class Template Reference

Does an L2-projection from one discrete function space into another. The convenience functions makeProjectorPair or makeProjector can be used to create such a projection. More...

#include <dumux/discretization/projection/projector.hh>

Description

template<class ScalarType>
class Dumux::Projector< ScalarType >

Does an L2-projection from one discrete function space into another. The convenience functions makeProjectorPair or makeProjector can be used to create such a projection.

Classes

struct  Params
 Parameters that can be passed to project() More...
 

Public Types

using Scalar = ScalarType
 Export the scalar type. More...
 
using Matrix = Dune::BCRSMatrix< MatrixBlockType >
 Export the type of the projection matrices. More...
 

Public Member Functions

 Projector ()=delete
 delete default constructor More...
 
 Projector (Matrix &&massMatrix, Matrix &&projectionMatrix)
 Constructor. Receives the mass and projection matrix that define the linear system describing the L2-projection from a function space into another. More...
 
 Projector (Matrix &&massMatrix, Matrix &&projectionMatrix, std::vector< std::size_t > &&indexMap, std::size_t numDofsTarget)
 Constructor for projection into a target space that occupies a larger geometric region than the domain space. In this case, the mass matrix can be chosen such that is is solved for only those dofs which will be populated with values from the projection. This requires an additional index map that maps the entries of the projected solution into the solution vector for the target space. Furthermore, the number of degrees of freedom must be specified to set up the coefficient vector with correct size for the target space. More...
 
template<class BlockType , std::enable_if_t< std::is_convertible< BlockType, ScalarType >::value, int > = 0>
Dune::BlockVector< BlockType > project (const Dune::BlockVector< BlockType > &u, const Params &params=Params{}) const
 Project a solution u into up. More...
 
template<class BlockType , std::enable_if_t<!std::is_convertible< BlockType, ScalarType >::value, int > = 0>
Dune::BlockVector< BlockType > project (const Dune::BlockVector< BlockType > &u, const Params &params=Params{}) const
 Project a solution u into up. More...
 

Static Public Member Functions

static Params defaultParams ()
 Returns the default parameters. More...
 

Member Typedef Documentation

◆ Matrix

template<class ScalarType >
using Dumux::Projector< ScalarType >::Matrix = Dune::BCRSMatrix< MatrixBlockType >

Export the type of the projection matrices.

◆ Scalar

template<class ScalarType >
using Dumux::Projector< ScalarType >::Scalar = ScalarType

Export the scalar type.

Constructor & Destructor Documentation

◆ Projector() [1/3]

template<class ScalarType >
Dumux::Projector< ScalarType >::Projector ( )
delete

delete default constructor

◆ Projector() [2/3]

template<class ScalarType >
Dumux::Projector< ScalarType >::Projector ( Matrix &&  massMatrix,
Matrix &&  projectionMatrix 
)
inline

Constructor. Receives the mass and projection matrix that define the linear system describing the L2-projection from a function space into another.

◆ Projector() [3/3]

template<class ScalarType >
Dumux::Projector< ScalarType >::Projector ( Matrix &&  massMatrix,
Matrix &&  projectionMatrix,
std::vector< std::size_t > &&  indexMap,
std::size_t  numDofsTarget 
)
inline

Constructor for projection into a target space that occupies a larger geometric region than the domain space. In this case, the mass matrix can be chosen such that is is solved for only those dofs which will be populated with values from the projection. This requires an additional index map that maps the entries of the projected solution into the solution vector for the target space. Furthermore, the number of degrees of freedom must be specified to set up the coefficient vector with correct size for the target space.

Member Function Documentation

◆ defaultParams()

template<class ScalarType >
static Params Dumux::Projector< ScalarType >::defaultParams ( )
inlinestatic

Returns the default parameters.

◆ project() [1/2]

template<class ScalarType >
template<class BlockType , std::enable_if_t< std::is_convertible< BlockType, ScalarType >::value, int > = 0>
Dune::BlockVector< BlockType > Dumux::Projector< ScalarType >::project ( const Dune::BlockVector< BlockType > &  u,
const Params params = Params{} 
) const
inline

Project a solution u into up.

Parameters
uThe solution living on the domain space
paramsOptional parameters for mass matrix solve
Returns
The projection of u into the target space

◆ project() [2/2]

template<class ScalarType >
template<class BlockType , std::enable_if_t<!std::is_convertible< BlockType, ScalarType >::value, int > = 0>
Dune::BlockVector< BlockType > Dumux::Projector< ScalarType >::project ( const Dune::BlockVector< BlockType > &  u,
const Params params = Params{} 
) const
inline

Project a solution u into up.

Parameters
uThe solution living on the domain space
paramsOptional parameters for mass matrix solve
Returns
The projection of u into the target space

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