Flow123d  3.9.0-094ba6f5a
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 >
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 70 of file finite_element.hh.

Constructor & Destructor Documentation

◆ Dof()

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

Definition at line 73 of file finite_element.hh.

Member Function Documentation

◆ evaluate()

template<class FS >
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.

Member Data Documentation

◆ coefs

arma::vec Dof::coefs

Coefficients of linear combination of function value components.

Definition at line 101 of file finite_element.hh.

◆ coords

arma::vec Dof::coords

Barycentric coordinates.

Definition at line 98 of file finite_element.hh.

◆ dim

unsigned int Dof::dim

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

Definition at line 92 of file finite_element.hh.

◆ n_face_idx

unsigned int Dof::n_face_idx

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

Definition at line 95 of file finite_element.hh.

◆ type

DofType Dof::type

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

Definition at line 107 of file finite_element.hh.


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