|
dune-fem 2.12-git
|
A constant local function carrying values for one entity. More...
#include <dune/fem/function/localfunction/const.hh>

Public Types | |
| typedef std::remove_const_t< DiscreteFunction > | DiscreteFunctionType |
| typedef DiscreteFunctionType::DiscreteFunctionSpaceType | DiscreteFunctionSpaceType |
| typedef DiscreteFunctionSpaceType::GridPartType | GridPartType |
| typedef DiscreteFunctionSpaceType::FunctionSpaceType | FunctionSpaceType |
| typedef DiscreteFunctionType | GridFunctionType |
| typedef BaseType::DofType | DofType |
| typedef BaseType::EntityType | EntityType |
| typedef GridPartType::IntersectionType | IntersectionType |
| typedef BaseType::BasisFunctionSetType | BasisFunctionSetType |
| typedef BaseType::LocalDofVectorType | LocalDofVectorType |
| typedef BaseType::DomainType | DomainType |
| typedef BaseType::RangeType | RangeType |
| typedef BaseType::JacobianRangeType | JacobianRangeType |
| typedef BaseType::HessianRangeType | HessianRangeType |
| typedef BaseType::SizeType | SizeType |
| type of SizeType | |
| typedef EntityType::Geometry | Geometry |
| type of the geometry, the local function lives on is given by the space | |
| typedef FunctionSpaceType::DomainFieldType | DomainFieldType |
| field type of the domain | |
| typedef FunctionSpaceType::RangeFieldType | RangeFieldType |
| field type of the range | |
| typedef Geometry::LocalCoordinate | LocalCoordinateType |
| type of local coordinates | |
| typedef Traits::derived_type | derived_type |
| typedef Traits::value_type | value_type |
| typedef FieldTraits< value_type >::field_type | field_type |
| typedef Traits::value_type | block_type |
| typedef Traits::size_type | size_type |
| typedef DenseIterator< DenseVector, value_type > | Iterator |
| typedef Iterator | iterator |
| typedef DenseIterator< const DenseVector, const value_type > | ConstIterator |
| typedef ConstIterator | const_iterator |
Public Member Functions | |
| ConstLocalDiscreteFunction (const DiscreteFunctionType &df) | |
| constructor creating a local function without binding it to an entity | |
| ConstLocalDiscreteFunction (const typename DiscreteFunctionType::LocalFunctionType &localFunction) | |
| cast a MutableLocalFunction into this one !!! expensive !!! | |
| ConstLocalDiscreteFunction (const DiscreteFunctionType &df, const EntityType &entity) | |
| constructor creating a local function and binding it to an entity | |
| ConstLocalDiscreteFunction (const EntityType &entity, const DiscreteFunctionType &df) | |
| ConstLocalDiscreteFunction (const ThisType &other) | |
| copy constructor | |
| ConstLocalDiscreteFunction (ThisType &&other) | |
| move constructor | |
| template<class Point > | |
| RangeType | evaluate (const Point &p) const |
| evaluate the local function | |
| template<class Point > | |
| JacobianRangeType | jacobian (const Point &p) const |
| evaluate Jacobian of the local function | |
| template<class Point > | |
| HessianRangeType | hessian (const Point &p) const |
| evaluate Hessian of the local function | |
| void | init (const EntityType &entity) |
| interface for local functions :: init | |
| void | bind (const EntityType &entity) |
| void | unbind () |
| void | bind (const IntersectionType &intersection, IntersectionSide side) |
| const DiscreteFunctionType & | discreteFunction () const |
| const GridFunctionType & | gridFunction () const |
| const LocalDofVectorType & | localDofVector () const |
| return const reference to local Dof Vector | |
| LocalDofVectorType & | localDofVector () |
| return mutable reference to local Dof Vector | |
| const DofType & | operator[] (SizeType i) const |
| const DofType & | operator[] (SizeType i) |
| const DofType & | operator[] (SizeType num) const |
| access to local dofs (read-only) | |
| DofType & | operator[] (SizeType num) |
| access to local dofs (read-write) | |
| constexpr value_type & | operator[] (size_type i) |
| constexpr const value_type & | operator[] (size_type i) const |
| template<class T > | |
| void | assign (const LocalFunction< BasisFunctionSet, T > &other) |
| assign all DoFs of this local function | |
| constexpr derived_type & | axpy (const field_type &a, const DenseVector< Other > &x) |
| int | order () const |
| obtain the order of this local function | |
| const BasisFunctionSetType & | basisFunctionSet () const |
| obtain the basis function set for this local function | |
| const EntityType & | entity () const |
| obtain the entity, this local function lives on | |
| const Geometry & | geometry () const |
| obtain the geometry, this local function lives on | |
| template<class PointType > | |
| void | evaluate (const PointType &x, RangeType &ret) const |
| evaluate the local function | |
| template<class PointType > | |
| void | jacobian (const PointType &x, JacobianRangeType &ret) const |
| evaluate Jacobian of the local function | |
| template<class PointType > | |
| void | hessian (const PointType &x, HessianRangeType &ret) const |
| evaluate Hessian of the local function | |
| int | numDofs () const |
| obtain the number of local DoFs | |
| SizeType | size () const |
| obtain the number of local DoFs | |
| template<class QuadratureType , class ... Vectors> | |
| void | axpyQuadrature (const QuadratureType &quad, const Vectors &... values) |
| evaluate all basisfunctions for all quadrature points, multiply with the given factor and add the result to the local coefficients | |
| template<class QuadratureType , class RangeVectorType , class JacobianRangeVectorType > | |
| void | axpyQuadrature (const QuadratureType &quad, const RangeVectorType &rangeVector, const JacobianRangeVectorType &jacobianVector) |
| evaluate all basisfunctions for all quadrature points, multiply with the given factor and add the result to the local coefficients | |
| template<class QuadratureType , class ... Vectors> | |
| void | evaluateQuadrature (const QuadratureType &quad, Vectors &... vec) const |
| evaluate all basisfunctions for all quadrature points and store the results in the result vector | |
| template<class QuadratureType , class ... Vectors> | |
| void | jacobianQuadrature (const QuadratureType &quad, Vectors &... vec) const |
| evaluate all Jacobians for all basis functions for all quadrature points and store the results in the result vector | |
| template<class QuadratureType , class ... Vectors> | |
| void | hessianQuadrature (const QuadratureType &quad, Vectors &... vec) const |
| evaluate all hessians of all basis functions for all quadrature points and store the results in the result vector | |
| bool | valid () const |
| Returns true if local function if bind or init was previously called. | |
| constexpr value_type & | front () |
| constexpr const value_type & | front () const |
| constexpr value_type & | back () |
| constexpr const value_type & | back () const |
| constexpr bool | empty () const |
| constexpr Iterator | begin () |
| constexpr ConstIterator | begin () const |
| constexpr Iterator | end () |
| constexpr ConstIterator | end () const |
| constexpr Iterator | beforeEnd () |
| constexpr ConstIterator | beforeEnd () const |
| constexpr Iterator | beforeBegin () |
| constexpr ConstIterator | beforeBegin () const |
| constexpr Iterator | find (size_type i) |
| constexpr ConstIterator | find (size_type i) const |
| constexpr derived_type & | operator+= (const DenseVector< Other > &x) |
| constexpr std::enable_if< std::is_convertible< ValueType, value_type >::value, derived_type >::type & | operator+= (const ValueType &kk) |
| constexpr derived_type & | operator-= (const DenseVector< Other > &x) |
| constexpr std::enable_if< std::is_convertible< ValueType, value_type >::value, derived_type >::type & | operator-= (const ValueType &kk) |
| constexpr derived_type | operator+ (const DenseVector< Other > &b) const |
| constexpr derived_type | operator- (const DenseVector< Other > &b) const |
| constexpr derived_type | operator- () const |
| constexpr std::enable_if< std::is_convertible< FieldType, field_type >::value, derived_type >::type & | operator*= (const FieldType &kk) |
| constexpr std::enable_if< std::is_convertible< FieldType, field_type >::value, derived_type >::type & | operator/= (const FieldType &kk) |
| constexpr bool | operator== (const DenseVector< Other > &x) const |
| constexpr bool | operator!= (const DenseVector< Other > &x) const |
| constexpr PromotionTraits< field_type, typenameDenseVector< Other >::field_type >::PromotedType | operator* (const DenseVector< Other > &x) const |
| constexpr PromotionTraits< field_type, typenameDenseVector< Other >::field_type >::PromotedType | dot (const DenseVector< Other > &x) const |
| constexpr FieldTraits< value_type >::real_type | one_norm () const |
| constexpr FieldTraits< value_type >::real_type | one_norm_real () const |
| constexpr FieldTraits< value_type >::real_type | two_norm () const |
| constexpr FieldTraits< value_type >::real_type | two_norm2 () const |
| constexpr FieldTraits< vt >::real_type | infinity_norm () const |
| constexpr FieldTraits< vt >::real_type | infinity_norm () const |
| constexpr FieldTraits< vt >::real_type | infinity_norm_real () const |
| constexpr FieldTraits< vt >::real_type | infinity_norm_real () const |
| constexpr size_type | N () const |
| constexpr size_type | dim () const |
| std::ostream & | operator<< (std::ostream &s, const DenseVector< V > &v) |
Static Public Attributes | |
| static const int | dimDomain = FunctionSpaceType::dimDomain |
| dimension of the domain | |
| static const int | dimRange = FunctionSpaceType::dimRange |
| dimension of the range | |
| static constexpr int | blocklevel |
Protected Member Functions | |
| void | clear () |
| set all DoFs to zero | |
| void | assign (const LocalFunction< DiscreteFunctionTraits< std::remove_const_t< DiscreteFunction > >::DiscreteFunctionSpaceType::BasisFunctionSetType, T > &other) |
| assign all DoFs of this local function | |
| void | axpy (const PointType &x, const RangeType &factor) |
| axpy operation for local function | |
| void | axpy (const PointType &x, const JacobianRangeType &factor) |
| axpy operation for local function | |
| void | axpy (const PointType &x, const HessianRangeType &factor) |
| void | axpy (const PointType &x, const RangeType &factor1, const JacobianRangeType &factor2) |
| axpy operation for local function | |
| template<class QuadratureType , class VectorType > | |
| void | evaluateQuadrature (const QuadratureType &quad, VectorType &result, const RangeType &) const |
| template<class QuadratureType , class VectorType > | |
| void | evaluateQuadrature (const QuadratureType &quad, VectorType &result, const JacobianRangeType &) const |
| template<class QuadratureType , class VectorType > | |
| void | evaluateQuadrature (const QuadratureType &quad, VectorType &result, const HessianRangeType &) const |
| void | init (const BasisFunctionSetType &basisFunctionSet) |
| initialize the local function for an basisFunctionSet | |
Protected Attributes | |
| const DiscreteFunctionType * | discreteFunction_ |
| BasisFunctionSetType | basisFunctionSet_ |
| LocalDofVectorType | localDofVector_ |
Detailed Description
class Dune::Fem::ConstLocalDiscreteFunction< DiscreteFunction >
A constant local function carrying values for one entity.
A ConstLocalDiscreteFunction is a LocalFunction which is basically doing the same as the LocalFunction of a discrete function. The difference is that the local dofs are not kept as references but are copied to a local storage. Therefore, this is a const local function and any modification of dofs is not allowed.
- Note
- Local DoF numbers correspond directly to array indices. Hence it may be more cache efficient to generate a ConstLocalFunction when only a const access to the local function is needed.
- Parameters
-
DiscreteFunction type of the discrete function, the local function shall belong to
Member Typedef Documentation
◆ BasisFunctionSetType
| typedef BaseType::BasisFunctionSetType Dune::Fem::ConstLocalDiscreteFunction< DiscreteFunction >::BasisFunctionSetType |
◆ DiscreteFunctionSpaceType
| typedef DiscreteFunctionType::DiscreteFunctionSpaceType Dune::Fem::ConstLocalDiscreteFunction< DiscreteFunction >::DiscreteFunctionSpaceType |
◆ DiscreteFunctionType
| typedef std::remove_const_t< DiscreteFunction > Dune::Fem::ConstLocalDiscreteFunction< DiscreteFunction >::DiscreteFunctionType |
◆ DofType
| typedef BaseType::DofType Dune::Fem::ConstLocalDiscreteFunction< DiscreteFunction >::DofType |
◆ DomainFieldType
|
inherited |
field type of the domain
◆ DomainType
| typedef BaseType::DomainType Dune::Fem::ConstLocalDiscreteFunction< DiscreteFunction >::DomainType |
◆ EntityType
| typedef BaseType::EntityType Dune::Fem::ConstLocalDiscreteFunction< DiscreteFunction >::EntityType |
◆ FunctionSpaceType
| typedef DiscreteFunctionSpaceType::FunctionSpaceType Dune::Fem::ConstLocalDiscreteFunction< DiscreteFunction >::FunctionSpaceType |
◆ Geometry
|
inherited |
type of the geometry, the local function lives on is given by the space
◆ GridFunctionType
| typedef DiscreteFunctionType Dune::Fem::ConstLocalDiscreteFunction< DiscreteFunction >::GridFunctionType |
◆ GridPartType
| typedef DiscreteFunctionSpaceType::GridPartType Dune::Fem::ConstLocalDiscreteFunction< DiscreteFunction >::GridPartType |
◆ HessianRangeType
| typedef BaseType::HessianRangeType Dune::Fem::ConstLocalDiscreteFunction< DiscreteFunction >::HessianRangeType |
◆ IntersectionType
| typedef GridPartType::IntersectionType Dune::Fem::ConstLocalDiscreteFunction< DiscreteFunction >::IntersectionType |
◆ JacobianRangeType
| typedef BaseType::JacobianRangeType Dune::Fem::ConstLocalDiscreteFunction< DiscreteFunction >::JacobianRangeType |
◆ LocalCoordinateType
|
inherited |
type of local coordinates
◆ LocalDofVectorType
| typedef BaseType::LocalDofVectorType Dune::Fem::ConstLocalDiscreteFunction< DiscreteFunction >::LocalDofVectorType |
◆ RangeFieldType
|
inherited |
field type of the range
◆ RangeType
| typedef BaseType::RangeType Dune::Fem::ConstLocalDiscreteFunction< DiscreteFunction >::RangeType |
◆ SizeType
|
inherited |
type of SizeType
Constructor & Destructor Documentation
◆ ConstLocalDiscreteFunction() [1/6]
|
inlineexplicit |
constructor creating a local function without binding it to an entity
Creates the local function without initializing the fields depending on the current entity.
- Note
- Before using the local function it must be initilized by localFunction.init( entity );static GridFunctionView< GF > localFunction(const GF &gf)Definition gridfunctionview.hh:118const EntityType & entity() constobtain the entity, this local function lives onDefinition localfunction.hh:305
- Parameters
-
[in] df discrete function the local function shall belong to
◆ ConstLocalDiscreteFunction() [2/6]
|
inline |
cast a MutableLocalFunction into this one !!! expensive !!!
◆ ConstLocalDiscreteFunction() [3/6]
|
inline |
constructor creating a local function and binding it to an entity
Creates the local function and initilizes the fields depending on the current entity. It is not necessary, though allowed, to call init before using the discrete function.
- Note
- The degrees of freedom are not initialized by this function.
- Parameters
-
[in] df discrete function the local function shall belong to [in] entity entity for initialize the local function to
◆ ConstLocalDiscreteFunction() [4/6]
|
inline |
◆ ConstLocalDiscreteFunction() [5/6]
|
inline |
copy constructor
◆ ConstLocalDiscreteFunction() [6/6]
|
inline |
move constructor
Member Function Documentation
◆ assign() [1/2]
|
inlineinherited |
assign all DoFs of this local function
- Parameters
-
[in] lf local function to assign DoFs from
◆ assign() [2/2]
|
inlineprotectedinherited |
assign all DoFs of this local function
- Parameters
-
[in] lf local function to assign DoFs from
◆ axpy() [1/4]
|
inlineprotectedinherited |
◆ axpy() [2/4]
|
inlineprotectedinherited |
axpy operation for local function
Denoting the DoFs of the local function by \(u_i\) and the basis functions by \(\varphi_i\), this function performs the following operation:
\[ u_i = u_i + factor \cdot \nabla\varphi_i( x ) \]
- Parameters
-
[in] x point to evaluate jacobian of basis functions in [in] factor axpy factor
◆ axpy() [3/4]
|
inlineprotectedinherited |
axpy operation for local function
Denoting the DoFs of the local function by \(u_i\) and the basis functions by \(\varphi_i\), this function performs the following operation:
\[ u_i = u_i + factor \cdot \varphi_i( x ) \]
- Parameters
-
[in] x point to evaluate basis functions in [in] factor axpy factor
◆ axpy() [4/4]
|
inlineprotectedinherited |
axpy operation for local function
Denoting the DoFs of the local function by \(u_i\) and the basis functions by \(\varphi_i\), this function performs the following operation:
\[ u_i = u_i + factor1 \cdot \varphi_i( x ) + factor2 \cdot \nabla\varphi_i( x ) \]
- Parameters
-
[in] x point to evaluate basis functions in [in] factor1 axpy factor for \(\varphi( x )\) [in] factor2 axpy factor for \(\nabla\varphi( x )\)
◆ axpyQuadrature() [1/2]
|
inlineinherited |
evaluate all basisfunctions for all quadrature points, multiply with the given factor and add the result to the local coefficients
◆ axpyQuadrature() [2/2]
|
inlineinherited |
evaluate all basisfunctions for all quadrature points, multiply with the given factor and add the result to the local coefficients
◆ basisFunctionSet()
|
inlineinherited |
obtain the basis function set for this local function
- Returns
- reference to the basis function set
◆ bind() [1/2]
|
inline |
◆ bind() [2/2]
|
inline |
◆ clear()
|
inlineprotectedinherited |
set all DoFs to zero
◆ discreteFunction()
|
inline |
◆ entity()
|
inlineinherited |
obtain the entity, this local function lives on
- Returns
- reference to the entity
◆ evaluate() [1/2]
|
inline |
evaluate the local function
- Parameters
-
[in] x evaluation point in local coordinates
- Returns
- value of the function in the given point
◆ evaluate() [2/2]
|
inlineinherited |
evaluate the local function
- Parameters
-
[in] x evaluation point in local coordinates [out] ret value of the function in the given point
◆ evaluateQuadrature() [1/4]
|
inlineinherited |
evaluate all basisfunctions for all quadrature points and store the results in the result vector
◆ evaluateQuadrature() [2/4]
|
inlineprotectedinherited |
◆ evaluateQuadrature() [3/4]
|
inlineprotectedinherited |
◆ evaluateQuadrature() [4/4]
|
inlineprotectedinherited |
◆ geometry()
|
inlineinherited |
obtain the geometry, this local function lives on
- Returns
- reference to the geometry
◆ gridFunction()
|
inline |
◆ hessian() [1/2]
|
inline |
evaluate Hessian of the local function
- Note
- Though the Hessian is evaluated on the reference element, the return value is the Hessian with respect to the actual entity.
- Parameters
-
[in] x evaluation point in local coordinates
- Returns
- Hessian of the function in the evaluation point
◆ hessian() [2/2]
|
inlineinherited |
evaluate Hessian of the local function
- Note
- Though the Hessian is evaluated on the reference element, the return value is the Hessian with respect to the actual entity.
- Parameters
-
[in] x evaluation point in local coordinates [out] ret Hessian of the function in the evaluation point
◆ hessianQuadrature()
|
inlineinherited |
evaluate all hessians of all basis functions for all quadrature points and store the results in the result vector
◆ init() [1/2]
|
inlineprotectedinherited |
initialize the local function for an basisFunctionSet
Binds the local function to an basisFunctionSet and entity.
- Note
- A local function must be initialized to an entity before it can be used.
- This function can be called multiple times to use the local function for more than one entity.
- Parameters
-
[in] basisFunctionSet to bind the local function to
◆ init() [2/2]
|
inline |
interface for local functions :: init
Local functions are used to represend a discrete function on one entity. The LocalFunctionInterface defines the functionality that can be expected from such a local function. :: init
◆ jacobian() [1/2]
|
inline |
evaluate Jacobian of the local function
- Note
- Though the Jacobian is evaluated on the reference element, the return value is the Jacobian with respect to the actual entity.
- Parameters
-
[in] x evaluation point in local coordinates
- Returns
- Jacobian of the function in the evaluation point
◆ jacobian() [2/2]
|
inlineinherited |
evaluate Jacobian of the local function
- Note
- Though the Jacobian is evaluated on the reference element, the return value is the Jacobian with respect to the actual entity.
- Parameters
-
[in] x evaluation point in local coordinates [out] ret Jacobian of the function in the evaluation point
◆ jacobianQuadrature()
|
inlineinherited |
evaluate all Jacobians for all basis functions for all quadrature points and store the results in the result vector
◆ localDofVector() [1/2]
|
inline |
return mutable reference to local Dof Vector
◆ localDofVector() [2/2]
|
inline |
return const reference to local Dof Vector
◆ numDofs()
|
inlineinherited |
obtain the number of local DoFs
Obtain the number of local DoFs of this local function. The value is identical to the number of basis functons on the entity.
- Returns
- number of local DoFs
◆ operator[]() [1/4]
|
inlineinherited |
◆ operator[]() [2/4]
|
inlineinherited |
◆ operator[]() [3/4]
|
inlineinherited |
access to local dofs (read-write)
- Parameters
-
[in] num local DoF number
- Returns
- reference to DoF
◆ operator[]() [4/4]
|
inlineinherited |
access to local dofs (read-only)
- Parameters
-
[in] num local dof number
- Returns
- reference to dof
◆ order()
|
inlineinherited |
obtain the order of this local function
The order of a local function refers to the polynomial order required to integrate it exactly.
- Note
- It is not completely clear what this value should be, e.g., for bilinear basis functions.
- Returns
- order of the local function
◆ size()
|
inlineinherited |
obtain the number of local DoFs
Obtain the number of local DoFs of this local function. The value is identical to the number of basis functons on the entity.
- Returns
- number of local DoFs
◆ unbind()
|
inline |
◆ valid()
|
inlineinherited |
Returns true if local function if bind or init was previously called.
Member Data Documentation
◆ basisFunctionSet_
|
protectedinherited |
◆ dimDomain
|
staticinherited |
dimension of the domain
◆ dimRange
|
staticinherited |
dimension of the range
◆ discreteFunction_
|
protected |
◆ localDofVector_
|
protectedinherited |
The documentation for this class was generated from the following file:
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8