dune-localfunctions  2.2.0
Public Types | Static Public Member Functions | Static Public Attributes
Dune::BasisInterfaceSwitch< Basis, Dummy > Struct Template Reference

Switch for uniform treatment of local and global basis classes. More...

#include <dune/localfunctions/common/interfaceswitch.hh>

List of all members.

Public Types

typedef Basis::Traits::DomainField DomainField
 export field types of the coordinates
typedef Basis::Traits::DomainLocal DomainLocal
 export vector type of the local coordinates
typedef Basis::Traits::RangeField RangeField
 export field type of the values
typedef Basis::Traits::Range Range
 export vector type of the values

Static Public Member Functions

template<typename Geometry >
static void gradient (const Basis &basis, const Geometry &geometry, const DomainLocal &xl, std::vector< FieldMatrix< RangeField, 1, Geometry::coorddimension > > &grad)
 Compute global gradient for scalar valued bases.

Static Public Attributes

static const std::size_t dimDomainLocal = Basis::Traits::dimDomainLocal
 export dimension of local coordinates
static const std::size_t dimRange = Basis::Traits::dimRange
 export dimension of the values
static const std::size_t diffOrder = Basis::Traits::diffOrder
 export number of supported differentiations

Detailed Description

template<class Basis, class Dummy = void>
struct Dune::BasisInterfaceSwitch< Basis, Dummy >

Switch for uniform treatment of local and global basis classes.

Template Parameters:
BasisType of the basis to handle.
DummyDummy parameter for enable_if. This must be left at the default value of void.

We don't provide any uniform access to the types and constants pertaining to the global domain. Providing this would require the Geometry as template parameter as well, and the user code can build them itself if it needs them with the help of the geometry. The omitted types are DomainGlobal and Jacobian, the omitted constant is dimDomainGlobal.

Note:
The local interface is assumed if the constant Basis::Traits::dimDomain exists and has a value greater than 0.

Member Typedef Documentation

template<class Basis , class Dummy = void>
typedef Basis::Traits::DomainField Dune::BasisInterfaceSwitch< Basis, Dummy >::DomainField

export field types of the coordinates

template<class Basis , class Dummy = void>
typedef Basis::Traits::DomainLocal Dune::BasisInterfaceSwitch< Basis, Dummy >::DomainLocal

export vector type of the local coordinates

template<class Basis , class Dummy = void>
typedef Basis::Traits::Range Dune::BasisInterfaceSwitch< Basis, Dummy >::Range

export vector type of the values

template<class Basis , class Dummy = void>
typedef Basis::Traits::RangeField Dune::BasisInterfaceSwitch< Basis, Dummy >::RangeField

export field type of the values


Member Function Documentation

template<class Basis , class Dummy = void>
template<typename Geometry >
static void Dune::BasisInterfaceSwitch< Basis, Dummy >::gradient ( const Basis &  basis,
const Geometry &  geometry,
const DomainLocal xl,
std::vector< FieldMatrix< RangeField, 1, Geometry::coorddimension > > &  grad 
) [inline, static]

Compute global gradient for scalar valued bases.

Parameters:
basisThe basis to get the derivatives from.
geometryThe geometry to use to transform the derivatives (for a local basis, unused in the case of a global basis).
xlThe local coordinates where to evaluate the gradient.
gradThe result (will be resized to the appropriate number of entries.
Note:
This make sense only for a scalar valued basis.

Member Data Documentation

template<class Basis , class Dummy = void>
const std::size_t Dune::BasisInterfaceSwitch< Basis, Dummy >::diffOrder = Basis::Traits::diffOrder [static]

export number of supported differentiations

template<class Basis , class Dummy = void>
const std::size_t Dune::BasisInterfaceSwitch< Basis, Dummy >::dimDomainLocal = Basis::Traits::dimDomainLocal [static]

export dimension of local coordinates

template<class Basis , class Dummy = void>
const std::size_t Dune::BasisInterfaceSwitch< Basis, Dummy >::dimRange = Basis::Traits::dimRange [static]

export dimension of the values


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