Flow123d  release_3.0.0-1106-ga3b2e4c
Public Member Functions | Public Attributes | List of all members
Dof Class Reference

#include <finite_element.hh>

Public Member Functions

 Dof (unsigned int dim_, unsigned int n_face_idx_, arma::vec coords_, arma::vec coefs_, DofType type_)
 
template<class FS >
const double evaluate (const FS &function_space, unsigned int basis_idx) const
 Evaulate dof for basis function of given function space. More...
 

Public Attributes

unsigned int dim
 Association to n-face of given dimension (point, line, triangle, tetrahedron. More...
 
unsigned int n_face_idx
 Index of n-face to which the dof is associated. More...
 
arma::vec coords
 Barycentric coordinates. More...
 
arma::vec coefs
 Coefficients of linear combination of function value components. More...
 
DofType type
 

Detailed Description

Class Dof is a general description of functionals (degrees of freedom) determining the finite element. We assume that the Dof is defined as a linear combination of components of function value at a given point:

Dof_value = a_1.f_1(x) + ... + a_n.f_n(x),

where (a_1, ... , a_n) are given by coefs, x is the support point given by barycentric coords and (f_1, ..., f_n) is a generally vector-valued function. For the simplest Dof, i.e. value of a scalar function at point p, we set

coords = p, coefs = { 1 }. The member dim denotes the affiliation of Dof to n-face: Nodal dofs have dim = 0, Dofs on lines: dim = 1, Dofs on triangles: dim = 2, Dofs in tetrahedron: dim = 3. It means that when a node, line or triangle is shared by adjacent cells, also the Dofs on this n-face are shared by the cells. Therefore for DG finite elements we set for all dofs the highest possible dimension.

The class implements the method evaluate() which computes the Dof value for a basis function from given FunctionSpace.

Definition at line 75 of file finite_element.hh.

Constructor & Destructor Documentation

Dof::Dof ( unsigned int  dim_,
unsigned int  n_face_idx_,
arma::vec  coords_,
arma::vec  coefs_,
DofType  type_ 
)
inline

Definition at line 78 of file finite_element.hh.

Member Function Documentation

template<class FS >
const double Dof::evaluate ( const FS &  function_space,
unsigned int  basis_idx 
) const

Evaulate dof for basis function of given function space.

Definition at line 34 of file finite_element.cc.

Here is the caller graph for this function:

Member Data Documentation

arma::vec Dof::coefs

Coefficients of linear combination of function value components.

Definition at line 106 of file finite_element.hh.

arma::vec Dof::coords

Barycentric coordinates.

Definition at line 103 of file finite_element.hh.

unsigned int Dof::dim

Association to n-face of given dimension (point, line, triangle, tetrahedron.

Definition at line 97 of file finite_element.hh.

unsigned int Dof::n_face_idx

Index of n-face to which the dof is associated.

Definition at line 100 of file finite_element.hh.

DofType Dof::type

Currently we consider only type=Value, possibly we could have Gradient, CellIntegral, FaceIntegral or other types.

Definition at line 112 of file finite_element.hh.


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