Basis implementation where local and global values are equal. More...
#include <dune/localfunctions/common/simplebasis.hh>
Public Types | |
typedef BasisTraits < C1SimpleBasis< LB, Geo > > | Traits |
Export type traits. | |
Public Member Functions | |
C1SimpleBasis (const LB &lb_, const Geo &geo_) | |
construct a C1SimpleBasis from a localbasis | |
unsigned int | size () const |
void | evaluateFunction (const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const |
unsigned int | order () const |
void | evaluateJacobian (const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const |
void | evaluateJacobianCoeffs (const typename Traits::DomainType &in, const std::vector< C > &coeffs) const |
Evaluate jacobian with given coefficients at given position. | |
template<typename C > | |
Traits::RangeType | evaluateCoeffs (const typename Traits::DomainType &in, const std::vector< C > &coeffs) const |
Evaluate basis with coefficients at given position. |
Basis implementation where local and global values are equal.
It simply takes a localbasis and returns whatever that returns. This is most appropriate for single component functions. For multicomponent functions there is typically some transformation needed. Which transformation to use depends very much on the particular base function.
LB | Type of the local basis. | |
Geo | Type of the geometry. Its interface should conform to that of Dune::Geometry. |
typedef BasisTraits<C1SimpleBasis<LB, Geo> > Dune::C1SimpleBasis< LB, Geo >::Traits |
Export type traits.
Reimplemented from Dune::C1BasisInterface< C1SimpleBasis< LB, Geo > >.
Dune::C1SimpleBasis< LB, Geo >::C1SimpleBasis | ( | const LB & | lb_, | |
const Geo & | geo_ | |||
) | [inline] |
construct a C1SimpleBasis from a localbasis
[in] | lb_ | The localbasis to wrap. A reference to this object is stored, that means, the object must live at least as long as this simple basis is used for evaluation. |
Traits::RangeType Dune::C0BasisInterface< Imp, T >::evaluateCoeffs | ( | const typename Traits::DomainType & | in, | |
const std::vector< C > & | coeffs | |||
) | const [inline, inherited] |
Evaluate basis with coefficients at given position.
Evaluates all shape functions at the given (local) position and return the (global) value of the sum weighted with some coefficients.
C | The type of the coefficients |
[in] | in | Where to evaluate in local (reference element) coordinates. |
[in] | coeffs | The coefficients. |
void Dune::C1SimpleBasis< LB, Geo >::evaluateFunction | ( | const typename Traits::DomainType & | in, | |
std::vector< typename Traits::RangeType > & | out | |||
) | const [inline] |
Evaluate all basis function at given position. Evaluates all shape functions at the given (local) position and returns the (global) values in a vector.
[in] | in | Where to evaluate in local (reference element) coordinates. |
[out] | out | The resulting global values, one per shape function. |
Reimplemented from Dune::C0BasisInterface< Imp, T >.
void Dune::C1SimpleBasis< LB, Geo >::evaluateJacobian | ( | const typename Traits::DomainType & | in, | |
std::vector< typename Traits::JacobianType > & | out | |||
) | const [inline] |
Evaluate jacobian of all shape functions at given position. out[i][j][k] is , when
is the i'th shape function. Note that this are the derivatives of the global values by the global coordinates, evaluated at local coordinates.
[in] | in | Where to evaluate in local coordinates. |
[out] | out | The result, one jacobian per base function. |
The Jacobian is taken as a vector of the gradients of each component:
Each gradient is transformed according to
where is component
of the
'th shape function,
is the Jacobian of the local-to-global map of the geometry and the hat
denotes local coordinates (
) or functions of the local basis (as opposed to this "global" basis).
Reimplemented from Dune::C1BasisInterface< C1SimpleBasis< LB, Geo > >.
References Dune::C0LocalBasisTraits< DF, n, D, RF, m, R >::dimRange.
void Dune::C1BasisInterface< C1SimpleBasis< LB, Geo > , BasisTraits<C1SimpleBasis< LB, Geo > > >::evaluateJacobianCoeffs | ( | const typename Traits::DomainType & | in, | |
const std::vector< C > & | coeffs | |||
) | const [inline, inherited] |
Evaluate jacobian with given coefficients at given position.
out[j][k] is , where
is the function given by this basis and the coefficients. Note that this are the derivatives of the global values by the global coordinates, evaluated at local coordinates.
C | The type of the coefficients |
[in] | in | Where to evaluate in local (reference element) coordinates. |
[in] | coeffs | The coefficients. |
unsigned int Dune::C1SimpleBasis< LB, Geo >::order | ( | ) | const [inline] |
Polynomial order of the shape functions.
Reimplemented from Dune::C0BasisInterface< Imp, T >.
unsigned int Dune::C1SimpleBasis< LB, Geo >::size | ( | ) | const [inline] |
Number of shape functions.
Reimplemented from Dune::C0BasisInterface< Imp, T >.