- Home
- About DUNE
- Download
- Documentation
- Community
- Development
#include <dgfunction.hh>
Inheritance diagram for Dune::DGFunction< GV, RT, o, SFSC >:

This class implements the interface of a DifferentiableGridFunction with piecewise discontinous elements using a orthonormal basis. It is assumed that all elements use the same shapefunction set.
In addition to the DifferentiableGridFunction interface. Dereferencing delivers the coefficient vector.
| GV | The GridView associating the values of the funciton with according entities | |
| RT | The type used for the component values of the function | |
| o | The order of the monomial shapefunctions | |
| SFSC | The type of the ShapeFunctionSetContainer |
Public Types | |
|
typedef SFSC< DT, RT, G::dimension, o > | ShapeFunctionSetContainer |
| type of ShapeFunctionSetContainer | |
| typedef ShapeFunctionSetContainer::ShapeFunctionSet | ShapeFunctionSet |
| type of ShapeFunctionSet | |
| enum | |
| export dimension of domain and range | |
| typedef DT | DomainFieldType |
| export type for domain components | |
| typedef RT | RangeFieldType |
| export type for range components | |
| enum | |
| export dimension of domain and range | |
| typedef G::ctype | DomainFieldType |
| export type for domain components | |
| typedef RT | RangeFieldType |
| export type for range components | |
Public Member Functions | |
| DGFunction (const GV &gv) | |
| allocate a vector with the data | |
| ~DGFunction () | |
| deallocate the vector | |
| virtual RT | evallocal (int comp, const Entity &e, const Dune::FieldVector< DT, n > &xi) const |
| evaluate single component comp in the entity e at local coordinates xi | |
| void | interpolate (const C0Function< DT, RT, n, 1 > &u) |
| interpolate nodal values from a grid function | |
| const RepresentationType & | operator * () const |
| return const reference to coefficient vector | |
| RepresentationType & | operator * () |
| return reference to coefficient vector | |
| void | preAdapt () |
| void | postAdapt () |
| Initiate update process. | |
| VTKWriter< GV >::VTKFunction * | vtkFunction (std::string s) const |
| VTK output. | |
| virtual RT | evallocal (int comp, const Entity &e, const Dune::FieldVector< DT, n > &xi) const =0 |
| evaluate single component comp in the entity e at local coordinates xi | |
| virtual void | evalalllocal (const Entity &e, const Dune::FieldVector< DT, GV::Grid::dimension > &xi, Dune::FieldVector< RT, m > &y) const=0 |
| evaluate all components in the entity e at local coordinates xi | |
| virtual RT | eval (int comp, const Dune::FieldVector< DT, n > &x) const=0 |
| evaluate single component comp at global point x | |
| virtual void | evalall (const Dune::FieldVector< DT, n > &x, Dune::FieldVector< RT, m > &y) const=0 |
| evaluate all components at point x and store result in y | |
| RT | evallocal (int comp, const Entity &e, const Dune::FieldVector< DT, n > &xi) const |
| implement local evaluation with global evaluation | |
| virtual RT | evallocal (int comp, const Entity &e, const Dune::FieldVector< DT, n > &xi) const =0 |
| evaluate single component comp in the entity e at local coordinates xi | |
| void | evalalllocal (const Entity &e, const Dune::FieldVector< DT, GV::Grid::dimension > &xi, Dune::FieldVector< RT, m > &y) const |
| does local evaluation via component-wise global evaluation | |
| virtual void | evalalllocal (const Entity &e, const Dune::FieldVector< DT, G::dimension > &xi, Dune::FieldVector< RT, m > &y) const=0 |
| evaluate all components in the entity e at local coordinates xi | |
| virtual RT | eval (int comp, const Dune::FieldVector< G::ctype, n > &x) const=0 |
| evaluate single component comp at global point x | |
| virtual void | evalall (const Dune::FieldVector< G::ctype, n > &x, Dune::FieldVector< RT, m > &y) const=0 |
| evaluate all components at point x and store result in y | |
| virtual RT | eval (int comp, const Dune::FieldVector< DT, n > &xi) const |
| implement global evaluation with local evaluation | |
| virtual void | evalall (const Dune::FieldVector< GV::Grid::ctype, n > &x, Dune::FieldVector< RT, m > &y) const |
| default implemention for evaluation of all components | |
| virtual int | order () const |
| returns order 1 | |
| virtual RT | derivative (int comp, const Dune::FieldVector< int, n > &d, const Dune::FieldVector< DT, n > &x) const=0 |
| evaluate partial derivative | |
| virtual RT | derivative (int comp, const Dune::FieldVector< int, n > &d, const Dune::FieldVector< DT, n > &x) const |
| virtual RT | derivativelocal (int comp, const Dune::FieldVector< int, n > &d, const Entity &e, const Dune::FieldVector< DT, n > &xi) const=0 |
| evaluate derivative in local coordinates | |
| virtual RT | evallocal (int comp, const Entity &e, const Dune::FieldVector< DT, n > &xi) const =0 |
| evaluate single component comp in the entity e at local coordinates xi | |
| virtual void | evalalllocal (const Entity &e, const Dune::FieldVector< DT, GV::Grid::dimension > &xi, Dune::FieldVector< RT, m > &y) const=0 |
| evaluate all components in the entity e at local coordinates xi | |
| virtual RT | eval (int comp, const Dune::FieldVector< DT, n > &xi) const |
| implement global evaluation with local evaluation | |
| virtual int | order () const=0 |
| return number of partial derivatives that can be taken | |
Protected Types | |
| enum | |
| get domain dimension from the grid | |
| typedef G::ctype | DT |
| get domain field type from the grid | |
|
typedef G::template Codim< 0 >::Entity | Entity |
| get entity from the grid | |
Protected Member Functions | |
| DGFunction (const DGFunction &) | |
| make copy constructor private | |
Static Protected Attributes | |
| static const int | BlockSize = ShapeFunctionSetContainer::maxsize |
| size of local vector blocks | |
| virtual RT Dune::DGFunction< GV, RT, o, SFSC >::evallocal | ( | int | comp, | |
| const Entity & | e, | |||
| const Dune::FieldVector< DT, n > & | xi | |||
| ) | const [inline, virtual] |
evaluate single component comp in the entity e at local coordinates xi
Evaluate the function in an entity at local coordinates.
| [in] | comp | number of component to be evaluated |
| [in] | e | reference to grid entity of codimension 0 |
| [in] | xi | point in local coordinates of the reference element of e |
| void Dune::DGFunction< GV, RT, o, SFSC >::interpolate | ( | const C0Function< DT, RT, n, 1 > & | u | ) | [inline] |
interpolate nodal values from a grid function
L2 Projection of a C0 function
| [in] | u | a continuous function |
| const RepresentationType& Dune::DGFunction< GV, RT, o, SFSC >::operator * | ( | ) | const [inline] |
return const reference to coefficient vector
Dereferencing a finite element function returns the coefficient representation of the finite element function. This is the const version.
| RepresentationType& Dune::DGFunction< GV, RT, o, SFSC >::operator * | ( | ) | [inline] |
return reference to coefficient vector
Dereferencing a finite element function returns the coefficient representation of the finite element function. This is the non-const version.
| void Dune::DGFunction< GV, RT, o, SFSC >::preAdapt | ( | ) | [inline] |
empty method to maintain symmetry For vertex data nothing is required in preAdapt but for other finite element functions this method is necessary.
| void Dune::DGFunction< GV, RT, o, SFSC >::postAdapt | ( | ) | [inline] |
Initiate update process.
Call this method after the grid has been adapted. The representation is now updated to the new grid and the finite element function can be used on the new grid. However the data is not initialized. The old representation (with respect to the old grid) can still be accessed if it has been saved. It is deleted in endUpdate().
| virtual RT Dune::GridFunction< GV::Grid , RT , m >::evallocal | ( | int | comp, | |
| const Entity & | e, | |||
| const Dune::FieldVector< DT, n > & | xi | |||
| ) | const [pure virtual, inherited] |
evaluate single component comp in the entity e at local coordinates xi
Evaluate the function in an entity at local coordinates.
| [in] | comp | number of component to be evaluated |
| [in] | e | reference to grid entity of codimension 0 |
| [in] | xi | point in local coordinates of the reference element of e |
| virtual void Dune::GridFunction< GV::Grid , RT , m >::evalalllocal | ( | const Entity & | e, | |
| const Dune::FieldVector< DT, GV::Grid ::dimension > & | xi, | |||
| Dune::FieldVector< RT , m > & | y | |||
| ) | const [pure virtual, inherited] |
evaluate all components in the entity e at local coordinates xi
Evaluates all components of a function at once.
| [in] | e | reference to grid entity of codimension 0 |
| [in] | xi | point in local coordinates of the reference element of e |
| [out] | y | vector with values to be filled |
| virtual RT Dune::FunctionBase< DT, RT, n, m >::eval | ( | int | comp, | |
| const Dune::FieldVector< DT, n > & | x | |||
| ) | const [pure virtual, inherited] |
evaluate single component comp at global point x
Evaluate a single component of the vector-valued function.
| [in] | comp | number of component to be evaluated |
| [in] | x | position to be evaluated |
Implemented in Dune::GridFunctionAdapter< G, RT, m >, Dune::DifferentiableGridFunctionAdapter< G, RT, m >, Dune::GridLevelLeafFunctionAdapter< G, RT, m >, Dune::GridLeafFunctionAdapter< G, IS, RT, m >, Dune::GridFunctionGradient< G, RT >, Dune::GridFunctionMinus< G, RT, m >, Dune::GridFunctionGlobalEvalDefault< GV, RT, 1 >, Dune::GridFunctionGlobalEvalDefault< G::LevelGridView, RT, m >, Dune::GridFunctionGlobalEvalDefault< G::LeafGridView, RT, 1 >, Dune::GridFunctionGlobalEvalDefault< G::LeafGridView, RT, m >, and Dune::GridFunctionGlobalEvalDefault< G::LevelGridView, RT, 1 >.
| virtual void Dune::FunctionBase< DT, RT, n, m >::evalall | ( | const Dune::FieldVector< DT, n > & | x, | |
| Dune::FieldVector< RT, m > & | y | |||
| ) | const [pure virtual, inherited] |
evaluate all components at point x and store result in y
Evaluation function for all components at once.
| [in] | x | position to be evaluated |
| [out] | y | result vector to be filled |
Implemented in Dune::FunctionDefault< DT, RT, n, m >.
| RT Dune::GridFunctionDefault< GV::Grid , RT , m >::evallocal | ( | int | comp, | |
| const Entity & | e, | |||
| const Dune::FieldVector< DT, n > & | xi | |||
| ) | const [inline, inherited] |
implement local evaluation with global evaluation
| [in] | comp | number of component to be evaluated |
| [in] | e | reference to grid entity of codimension 0 |
| [in] | xi | point in local coordinates of the reference element of e |
| virtual RT Dune::GridFunction< G, RT, m >::evallocal | ( | int | comp, | |
| const Entity & | e, | |||
| const Dune::FieldVector< DT, n > & | xi | |||
| ) | const [pure virtual, inherited] |
evaluate single component comp in the entity e at local coordinates xi
Evaluate the function in an entity at local coordinates.
| [in] | comp | number of component to be evaluated |
| [in] | e | reference to grid entity of codimension 0 |
| [in] | xi | point in local coordinates of the reference element of e |
Implemented in Dune::GridFunctionDefault< G, RT, m >, and Dune::GridFunctionDefault< G, RT, G::dimension >.
| void Dune::GridFunctionDefault< GV::Grid , RT , m >::evalalllocal | ( | const Entity & | e, | |
| const Dune::FieldVector< DT, GV::Grid ::dimension > & | xi, | |||
| Dune::FieldVector< RT , m > & | y | |||
| ) | const [inline, inherited] |
does local evaluation via component-wise global evaluation
| [in] | e | reference to grid entity of codimension 0 |
| [in] | xi | point in local coordinates of the reference element of e |
| [out] | y | vector with values to be filled |
| virtual void Dune::GridFunction< G, RT, m >::evalalllocal | ( | const Entity & | e, | |
| const Dune::FieldVector< DT, G::dimension > & | xi, | |||
| Dune::FieldVector< RT, m > & | y | |||
| ) | const [pure virtual, inherited] |
evaluate all components in the entity e at local coordinates xi
Evaluates all components of a function at once.
| [in] | e | reference to grid entity of codimension 0 |
| [in] | xi | point in local coordinates of the reference element of e |
| [out] | y | vector with values to be filled |
Implemented in Dune::GridFunctionDefault< G, RT, m >, and Dune::GridFunctionDefault< G, RT, G::dimension >.
| virtual RT Dune::FunctionBase< G::ctype , RT , n, m >::eval | ( | int | comp, | |
| const Dune::FieldVector< G::ctype , n > & | x | |||
| ) | const [pure virtual, inherited] |
evaluate single component comp at global point x
Evaluate a single component of the vector-valued function.
| [in] | comp | number of component to be evaluated |
| [in] | x | position to be evaluated |
Implemented in Dune::GridFunctionAdapter< G, RT, m >, Dune::DifferentiableGridFunctionAdapter< G, RT, m >, Dune::GridLevelLeafFunctionAdapter< G, RT, m >, Dune::GridLeafFunctionAdapter< G, IS, RT, m >, Dune::GridFunctionGradient< G, RT >, Dune::GridFunctionMinus< G, RT, m >, Dune::GridFunctionGlobalEvalDefault< GV, RT, 1 >, Dune::GridFunctionGlobalEvalDefault< G::LevelGridView, RT, m >, Dune::GridFunctionGlobalEvalDefault< G::LeafGridView, RT, 1 >, Dune::GridFunctionGlobalEvalDefault< G::LeafGridView, RT, m >, and Dune::GridFunctionGlobalEvalDefault< G::LevelGridView, RT, 1 >.
| virtual void Dune::FunctionBase< G::ctype , RT , n, m >::evalall | ( | const Dune::FieldVector< G::ctype , n > & | x, | |
| Dune::FieldVector< RT , m > & | y | |||
| ) | const [pure virtual, inherited] |
evaluate all components at point x and store result in y
Evaluation function for all components at once.
| [in] | x | position to be evaluated |
| [out] | y | result vector to be filled |
| virtual RT Dune::GridFunctionGlobalEvalDefault< GV , RT , m >::eval | ( | int | comp, | |
| const Dune::FieldVector< DT, n > & | xi | |||
| ) | const [inline, virtual, inherited] |
implement global evaluation with local evaluation
The local entity is searched via a hierarchic search
| [in] | comp | number of component to be evaluated |
| [in] | xi | point in local coordinates of the reference element of e |
Implements Dune::FunctionBase< G::ctype, RT, G::dimension, m >.
| virtual void Dune::FunctionDefault< GV::Grid::ctype , RT , n, m >::evalall | ( | const Dune::FieldVector< GV::Grid::ctype , n > & | x, | |
| Dune::FieldVector< RT , m > & | y | |||
| ) | const [inline, virtual, inherited] |
default implemention for evaluation of all components
Evaluate all components at once using componentwise evaluation function
| [in] | x | position to be evaluated |
| [out] | y | result vector to be filled |
| virtual int Dune::H1Function< GV::Grid::ctype , RT , n, m >::order | ( | ) | const [inline, virtual, inherited] |
returns order 1
For H1 functions we can implement it here.
Implements Dune::DifferentiableFunction< DT, RT, n, m >.
| virtual RT Dune::DifferentiableFunction< DT, RT, n, m >::derivative | ( | int | comp, | |
| const Dune::FieldVector< int, n > & | d, | |||
| const Dune::FieldVector< DT, n > & | x | |||
| ) | const [pure virtual, inherited] |
evaluate partial derivative
Evaluate partial derivative of a component of the vector-valued function.
| [in] | comp | number of component that should be differentiated |
| [in] | d | vector giving order of derivative for each variable |
| [in] | x | position where derivative is to be evaluated |
Implemented in Dune::DifferentiableGridFunctionAdapter< G, RT, m >, Dune::DifferentiableFunctionDefault< DT, RT, n, m >, Dune::P1Function< GV, RT, LC, m >, Dune::GridFunctionGlobalDifferentiationDefault< GV, RT, 1 >, Dune::GridFunctionGlobalDifferentiationDefault< G::LeafGridView, RT, 1 >, Dune::GridFunctionGlobalDifferentiationDefault< G::LevelGridView, RT, 1 >, Dune::P1Function< G::LevelGridView, RT, Dune::LevelCommunicate< G >, m >, and Dune::P1Function< G::LeafGridView, RT, Dune::LeafCommunicate< G >, m >.
| virtual RT Dune::GridFunctionGlobalDifferentiationDefault< GV , RT , m >::derivative | ( | int | comp, | |
| const Dune::FieldVector< int, n > & | d, | |||
| const Dune::FieldVector< DT, n > & | x | |||
| ) | const [inline, virtual, inherited] |
evaluate partial derivative
Evaluate partial derivative of a component of the vector-valued function.
| [in] | comp | number of component that should be differentiated |
| [in] | d | vector giving order of derivative for each variable |
| [in] | x | position where derivative is to be evaluated |
Implements Dune::DifferentiableFunction< G::ctype, RT, G::dimension, m >.
| virtual RT Dune::DifferentiableGridFunction< G, RT, m >::derivativelocal | ( | int | comp, | |
| const Dune::FieldVector< int, n > & | d, | |||
| const Entity & | e, | |||
| const Dune::FieldVector< DT, n > & | xi | |||
| ) | const [pure virtual, inherited] |
evaluate derivative in local coordinates
Evaluate the partial derivative a the given position in local coordinates in an entity.
| [in] | comp | number of component that should be differentiated |
| [in] | d | vector giving order of derivative for each variable |
| [in] | e | reference to grid entity of codimension 0 |
| [in] | xi | point in local coordinates of the reference element of e |
Implemented in Dune::DifferentiableGridFunctionDefault< G, RT, m >.
| virtual RT Dune::GridFunction< GV::Grid , RT , m >::evallocal | ( | int | comp, | |
| const Entity & | e, | |||
| const Dune::FieldVector< DT, n > & | xi | |||
| ) | const [pure virtual, inherited] |
evaluate single component comp in the entity e at local coordinates xi
Evaluate the function in an entity at local coordinates.
| [in] | comp | number of component to be evaluated |
| [in] | e | reference to grid entity of codimension 0 |
| [in] | xi | point in local coordinates of the reference element of e |
| virtual void Dune::GridFunction< GV::Grid , RT , m >::evalalllocal | ( | const Entity & | e, | |
| const Dune::FieldVector< DT, GV::Grid ::dimension > & | xi, | |||
| Dune::FieldVector< RT , m > & | y | |||
| ) | const [pure virtual, inherited] |
evaluate all components in the entity e at local coordinates xi
Evaluates all components of a function at once.
| [in] | e | reference to grid entity of codimension 0 |
| [in] | xi | point in local coordinates of the reference element of e |
| [out] | y | vector with values to be filled |
| virtual RT Dune::GridFunctionGlobalEvalDefault< GV, RT, m >::eval | ( | int | comp, | |
| const Dune::FieldVector< DT, n > & | xi | |||
| ) | const [inline, virtual, inherited] |
implement global evaluation with local evaluation
The local entity is searched via a hierarchic search
| [in] | comp | number of component to be evaluated |
| [in] | xi | point in local coordinates of the reference element of e |
| virtual int Dune::DifferentiableFunction< G::ctype , RT , n, m >::order | ( | ) | const [pure virtual, inherited] |
return number of partial derivatives that can be taken
A DifferentiableFunction can say how many derivatives exist and can be safely evaluated.
Implemented in Dune::DifferentiableGridFunctionAdapter< G, RT, m >, Dune::ElementwiseCInfinityFunction< G, RT, m >, Dune::P1Function< GV, RT, LC, m >, Dune::P2Function< GridType, RT, IS, m >, Dune::ElementwiseCInfinityFunction< G::LeafGridView::Grid, RT, m >, Dune::ElementwiseCInfinityFunction< G::LevelGridView::Grid, RT, m >, Dune::ElementwiseCInfinityFunction< GridType, RT, m >, Dune::ElementwiseCInfinityFunction< GV::Grid, RT, m >, Dune::P1Function< G::LevelGridView, RT, Dune::LevelCommunicate< G >, m >, Dune::P1Function< G::LeafGridView, RT, Dune::LeafCommunicate< G >, m >, Dune::P2Function< G, RT, G::template Codim< 0 >::LevelIndexSet, m >, and Dune::P2Function< G, RT, G::template Codim< 0 >::LeafIndexSet, m >.