Flow123d  JS_before_hm-937-g93502c2
Public Member Functions | Private Attributes | List of all members
PolynomialSpace Class Reference

Space of polynomial functions. More...

#include <fe_p.hh>

Inheritance diagram for PolynomialSpace:
Inheritance graph
[legend]
Collaboration diagram for PolynomialSpace:
Collaboration graph
[legend]

Public Member Functions

 PolynomialSpace (unsigned int degree, unsigned int dim)
 Constructor. More...
 
double basis_value (unsigned int basis_index, const arma::vec &point, unsigned int comp_index=0) const override
 Value of the i th basis function at point point. More...
 
const arma::vec basis_grad (unsigned int basis_index, const arma::vec &point, unsigned int comp_index=0) const override
 Gradient of the i th basis function at point point. More...
 
unsigned int dim () const override
 Dimension of function space (number of basis functions). More...
 
- Public Member Functions inherited from FunctionSpace
 FunctionSpace (unsigned int space_dim, unsigned int n_components)
 
unsigned int space_dim () const
 Getter for space dimension. More...
 
unsigned int n_components () const
 Getter for number of components. More...
 
virtual ~FunctionSpace ()
 

Private Attributes

const unsigned int degree_
 Max. degree of polynomials. More...
 
std::vector< arma::uvec > powers
 Coefficients of basis functions. More...
 

Additional Inherited Members

- Protected Attributes inherited from FunctionSpace
unsigned int space_dim_
 Space dimension of function arguments (i.e. 1, 2 or 3). More...
 
unsigned int n_components_
 Number of components of function values. More...
 

Detailed Description

Space of polynomial functions.

This class serves for evaluation of the value and gradient of a polynomial of order degree in dim variables.

Definition at line 39 of file fe_p.hh.

Constructor & Destructor Documentation

PolynomialSpace::PolynomialSpace ( unsigned int  degree,
unsigned int  dim 
)

Constructor.

Creates the coefficients of the basis.

Definition at line 25 of file fe_p.cc.

Member Function Documentation

const arma::vec PolynomialSpace::basis_grad ( unsigned int  basis_index,
const arma::vec &  point,
unsigned int  comp_index = 0 
) const
overridevirtual

Gradient of the i th basis function at point point.

Parameters
basis_indexIndex of the basis function.
pointPoint coordinates.
comp_indexIndex of component (>0 for vector-valued functions).

Implements FunctionSpace.

Definition at line 78 of file fe_p.cc.

double PolynomialSpace::basis_value ( unsigned int  basis_index,
const arma::vec &  point,
unsigned int  comp_index = 0 
) const
overridevirtual

Value of the i th basis function at point point.

Parameters
basis_indexIndex of the basis function.
pointPoint coordinates.
comp_indexIndex of component (>0 for vector-valued functions).

Implements FunctionSpace.

Definition at line 62 of file fe_p.cc.

unsigned int PolynomialSpace::dim ( ) const
inlineoverridevirtual

Dimension of function space (number of basis functions).

Implements FunctionSpace.

Definition at line 60 of file fe_p.hh.

Here is the caller graph for this function:

Member Data Documentation

const unsigned int PolynomialSpace::degree_
private

Max. degree of polynomials.

Definition at line 65 of file fe_p.hh.

std::vector<arma::uvec> PolynomialSpace::powers
private

Coefficients of basis functions.

Powers of x, y, z, ... in the i-th basis function are stored in powers[i].

Definition at line 73 of file fe_p.hh.


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