dune-fem  2.4.1-rc
Public Types | Public Member Functions | Protected Member Functions | List of all members
Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 > Class Template Reference

Default implementation of the DGDiscreteModelInterface where methods for the fluxes and the source term do nothing, so that the user needn't implement them if not needed. More...

#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/pass/localdg/discretemodel.hh>

Inheritance diagram for Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >:
Inheritance graph

Public Types

typedef Dune::Fem::Selector< N1, N2, N3, N4, N5, N6, N7, N8, N9 >::Type Selector
 
typedef BaseType::EntityType EntityType
 
typedef BaseType::IntersectionType IntersectionType
 
typedef BaseType::LocalCoordinateType LocalCoordinateType
 
typedef BaseType::RangeType RangeType
 
typedef BaseType::JacobianRangeType JacobianRangeType
 
typedef BaseType::MassFactorType MassFactorType
 
enum  { dimRange = DiscreteFunctionSpaceType::dimRange }
 dimRange More...
 
typedef DGDiscreteModelTraits Traits
 Traits class defined by the user. More...
 
typedef Traits::DGDiscreteModelType DGDiscreteModelType
 Implementation type for Barton-Nackman trick. More...
 
typedef Traits::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
 Discrete function space. More...
 
typedef DiscreteFunctionSpaceType::FunctionSpaceType FunctionSpaceType
 Function space type. More...
 
typedef FunctionSpaceType::DomainType DomainType
 Coordinate type (world coordinates) More...
 
typedef FunctionSpaceType::RangeFieldType RangeFieldType
 Vector type of the function space's range field type. More...
 
typedef DiscreteFunctionSpaceType::GridPartType GridPartType
 Type of GridPart. More...
 

Public Member Functions

bool hasFlux () const
 
bool hasSource () const
 
bool hasMass () const
 
template<class ArgumentTuple , class FaceDomainType >
double numericalFlux (const IntersectionType &it, const double time, const FaceDomainType &x, const ArgumentTuple &uLeft, const ArgumentTuple &uRight, RangeType &gLeft, RangeType &gRight)
 Empty implementation that fails if problem claims to have a flux contribution. More...
 
template<class ArgumentTuple , class FaceDomainType >
double boundaryFlux (const IntersectionType &intersection, const double time, const FaceDomainType &x, const ArgumentTuple &uLeft, RangeType &gLeft)
 Empty implementation that fails if problem claims to have a flux contribution. More...
 
template<class ArgumentTuple >
void analyticalFlux (const EntityType &entity, const double time, const LocalCoordinateType &x, const ArgumentTuple &u, JacobianRangeType &f)
 Empty implementation that fails if problem claims to have a flux contribution. More...
 
template<class ArgumentTuple , class JacobianTuple >
double source (const EntityType &en, const double time, const LocalCoordinateType &x, const ArgumentTuple &u, const JacobianTuple &jac, RangeType &s)
 Empty implementation that fails if problem claims to have a source term. More...
 
template<class ArgumentTuple >
void mass (const EntityType &en, const double time, const LocalCoordinateType &x, const ArgumentTuple &u, MassFactorType &m)
 empty implementation for mass factor default implementation sets this factor to 1.0 More...
 
void setEntity (const EntityType &en)
 empty implementation More...
 
void setNeighbor (const EntityType &nb)
 empty implementation More...
 
void setEntity (EntityType &en)
 Passes the active entity to the model. This can be used, to set local functions required as data function in the model. More...
 
void setNeighbor (EntityType &nb)
 Passes the active neigbor entity to the model. This can be used, to set local functions required as data functions in the model. More...
 

Protected Member Functions

DGDiscreteModelTypeasImp ()
 
const DGDiscreteModelTypeasImp () const
 

Detailed Description

template<class DGDiscreteModelTraits, int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
class Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >

Default implementation of the DGDiscreteModelInterface where methods for the fluxes and the source term do nothing, so that the user needn't implement them if not needed.

Note
N1, ..., N9 are passIds on which model depends

Member Typedef Documentation

template<class DGDiscreteModelTraits >
typedef Traits::DGDiscreteModelType Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::DGDiscreteModelType
inherited

Implementation type for Barton-Nackman trick.

template<class DGDiscreteModelTraits >
typedef Traits::DiscreteFunctionSpaceType Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::DiscreteFunctionSpaceType
inherited

Discrete function space.

template<class DGDiscreteModelTraits >
typedef FunctionSpaceType::DomainType Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::DomainType
inherited

Coordinate type (world coordinates)

template<class DGDiscreteModelTraits , int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
typedef BaseType::EntityType Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >::EntityType
template<class DGDiscreteModelTraits >
typedef DiscreteFunctionSpaceType::FunctionSpaceType Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::FunctionSpaceType
inherited

Function space type.

template<class DGDiscreteModelTraits >
typedef DiscreteFunctionSpaceType::GridPartType Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::GridPartType
inherited

Type of GridPart.

template<class DGDiscreteModelTraits , int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
typedef BaseType::IntersectionType Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >::IntersectionType
template<class DGDiscreteModelTraits , int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
typedef BaseType::JacobianRangeType Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >::JacobianRangeType
template<class DGDiscreteModelTraits , int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
typedef BaseType::LocalCoordinateType Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >::LocalCoordinateType
template<class DGDiscreteModelTraits , int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
typedef BaseType::MassFactorType Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >::MassFactorType
template<class DGDiscreteModelTraits >
typedef FunctionSpaceType::RangeFieldType Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::RangeFieldType
inherited

Vector type of the function space's range field type.

template<class DGDiscreteModelTraits , int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
typedef BaseType::RangeType Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >::RangeType
template<class DGDiscreteModelTraits , int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
typedef Dune::Fem::Selector< N1 , N2 , N3 , N4 , N5 , N6 , N7 , N8 , N9 >::Type Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >::Selector

Selector for data tuple to use as arguments for all methods; this fixes the template type ArgumentTuple. If this discrete model is used for a pass n+1, i.e., following passes p0,p1,..,pn then the return type of pass i (i=0,..,n) can be used by adding the integer number i in the Selector. Assume the following: $ u_{n+1} = p_{n+1}(u_n,u_{n-1},..,u_1,u_0) $ where $u_0=u$ is the global argument of the combined passes. If $ p_{n+1} $ only depends on $ u_0,u_2,u_n $ then the following selector can be used: Selector<0,n-1,1>. Then ArgumentTuple is now filled with the values of these three functions and can be accessed by... Other way of filling the ArgumentTuple with corresponding pass results is when one uses passIds. In this case if $ u_{n+1} $ depends on the passes with following passIds: firstPassId , passId2 , passId5 then the desired Selector is Selector< firstPassId , passId2 , passId5 > ... If there's no SelectorType in user-implemented DGDiscreteModel then this Selector is used. Therefore it's good to pass passIds to this class and avoid writing SelectorType in user-implemented DGDiscreteModel. The point where a user specifies what's going to be in the Selector is in the template declaration of the DGDiscreteModel where one names passIds necessary for this DGDiscreteModel

template<class DGDiscreteModelTraits >
typedef DGDiscreteModelTraits Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::Traits
inherited

Traits class defined by the user.

Member Enumeration Documentation

template<class DGDiscreteModelTraits >
anonymous enum
inherited

dimRange

Enumerator
dimRange 

Member Function Documentation

template<class DGDiscreteModelTraits , int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
template<class ArgumentTuple >
void Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >::analyticalFlux ( const EntityType entity,
const double  time,
const LocalCoordinateType x,
const ArgumentTuple &  u,
JacobianRangeType f 
)
inline

Empty implementation that fails if problem claims to have a flux contribution.

References Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::asImp(), and Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::hasFlux().

template<class DGDiscreteModelTraits >
DGDiscreteModelType& Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::asImp ( )
inlineprotectedinherited
template<class DGDiscreteModelTraits >
const DGDiscreteModelType& Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::asImp ( ) const
inlineprotectedinherited
template<class DGDiscreteModelTraits , int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
template<class ArgumentTuple , class FaceDomainType >
double Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >::boundaryFlux ( const IntersectionType intersection,
const double  time,
const FaceDomainType &  x,
const ArgumentTuple &  uLeft,
RangeType gLeft 
)
inline

Empty implementation that fails if problem claims to have a flux contribution.

References Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::asImp(), and Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::hasFlux().

template<class DGDiscreteModelTraits , int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
bool Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >::hasFlux ( ) const
inline

The default implementation always returns false

template<class DGDiscreteModelTraits , int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
bool Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >::hasMass ( ) const
inline

The default implementation always returns false

template<class DGDiscreteModelTraits , int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
bool Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >::hasSource ( ) const
inline

The default implementation always returns false

template<class DGDiscreteModelTraits , int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
template<class ArgumentTuple >
void Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >::mass ( const EntityType en,
const double  time,
const LocalCoordinateType x,
const ArgumentTuple &  u,
MassFactorType m 
)
inline

empty implementation for mass factor default implementation sets this factor to 1.0

template<class DGDiscreteModelTraits , int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
template<class ArgumentTuple , class FaceDomainType >
double Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >::numericalFlux ( const IntersectionType it,
const double  time,
const FaceDomainType &  x,
const ArgumentTuple &  uLeft,
const ArgumentTuple &  uRight,
RangeType gLeft,
RangeType gRight 
)
inline

Empty implementation that fails if problem claims to have a flux contribution.

References Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::asImp(), and Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::hasFlux().

template<class DGDiscreteModelTraits >
void Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::setEntity ( EntityType en)
inlineinherited

Passes the active entity to the model. This can be used, to set local functions required as data function in the model.

Parameters
enactive Entity

References Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::asImp().

template<class DGDiscreteModelTraits , int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
void Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >::setEntity ( const EntityType en)
inline

empty implementation

template<class DGDiscreteModelTraits >
void Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::setNeighbor ( EntityType nb)
inlineinherited

Passes the active neigbor entity to the model. This can be used, to set local functions required as data functions in the model.

Parameters
nbactive neighbor Entity

References Dune::Fem::DGDiscreteModelInterface< DGDiscreteModelTraits >::asImp().

template<class DGDiscreteModelTraits , int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
void Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >::setNeighbor ( const EntityType nb)
inline

empty implementation

template<class DGDiscreteModelTraits , int N1 = -1, int N2 = -1, int N3 = -1, int N4 = -1, int N5 = -1, int N6 = -1, int N7 = -1, int N8 = -1, int N9 = -1>
template<class ArgumentTuple , class JacobianTuple >
double Dune::Fem::DGDiscreteModelDefault< DGDiscreteModelTraits, N1, N2, N3, N4, N5, N6, N7, N8, N9 >::source ( const EntityType en,
const double  time,
const LocalCoordinateType x,
const ArgumentTuple &  u,
const JacobianTuple &  jac,
RangeType s 
)
inline

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