Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
InterfaceTools::CellWiseFunction< dim, VectorType, FEType > Class Template Reference

#include <interface_tools.h>

Inheritance diagram for InterfaceTools::CellWiseFunction< dim, VectorType, FEType >:
[legend]

Public Member Functions

 CellWiseFunction (const unsigned int p_fe_degree)
void set_active_cell (const VectorType &in_local_dof_values)
double value (const Point< dim > &point, const unsigned int component=0) const override
Tensor< 1, dim > gradient (const Point< dim > &point, const unsigned int component=0) const override
SymmetricTensor< 2, dim > hessian (const Point< dim > &point, const unsigned int component=0) const override

Private Attributes

FEType fe
unsigned int n_cell_wise_dofs
VectorType cell_dof_values

Detailed Description

template<int dim, typename VectorType = Vector<double>, typename FEType = FE_Q<dim>>
class InterfaceTools::CellWiseFunction< dim, VectorType, FEType >

Scalar function defined by the DOF values of a single cell. Based on the CellWiseFunction and RefSpaceFEFieldFunction of dealii.

Template Parameters
dimAn integer that denotes the dimension of the space in which the problem is solved.
VectorTypeThe vector type of the solution vector.
FETypeThe finite element type used to discretize the problem.

Definition at line 50 of file interface_tools.h.

Constructor & Destructor Documentation

◆ CellWiseFunction()

template<int dim, typename VectorType = Vector<double>, typename FEType = FE_Q<dim>>
InterfaceTools::CellWiseFunction< dim, VectorType, FEType >::CellWiseFunction ( const unsigned int p_fe_degree)
inline

Constructor.

Parameters
[in]p_fe_degreeFinite element degree discretizing the field we want to convert to a CellWiseFunction.

Definition at line 60 of file interface_tools.h.

References fe, and n_cell_wise_dofs.

Member Function Documentation

◆ gradient()

template<int dim, typename VectorType, typename FEType>
Tensor< 1, dim > InterfaceTools::CellWiseFunction< dim, VectorType, FEType >::gradient ( const Point< dim > & point,
const unsigned int component = 0 ) const
inlineoverride

Return the function gradient of the specified component at the given point in the reference cell.

Parameters
[in]pointCoordinates of the point in the reference cell
[in]componentIndex of the component of the function for which the gradient is computed
Returns
Value of the gradient of the specified component at the given point

Definition at line 151 of file interface_tools.h.

References cell_dof_values, fe, gradient(), and n_cell_wise_dofs.

◆ hessian()

template<int dim, typename VectorType, typename FEType>
SymmetricTensor< 2, dim > InterfaceTools::CellWiseFunction< dim, VectorType, FEType >::hessian ( const Point< dim > & point,
const unsigned int component = 0 ) const
inlineoverride

Return the function Hessian of the specified component at the given point in the reference cell.

Parameters
[in]pointCoordinates of the point in the reference cell
[in]componentIndex of the component of the function for which the Hessian is computed
Returns
Value of the Hessian of the specified component at the given point

Definition at line 165 of file interface_tools.h.

References cell_dof_values, fe, hessian(), and n_cell_wise_dofs.

◆ set_active_cell()

template<int dim, typename VectorType = Vector<double>, typename FEType = FE_Q<dim>>
void InterfaceTools::CellWiseFunction< dim, VectorType, FEType >::set_active_cell ( const VectorType & in_local_dof_values)
inline

Set the cell that the function should be evaluated on.

Parameters
[in]in_local_dof_valuesCell's DOF values

Definition at line 72 of file interface_tools.h.

References cell_dof_values.

◆ value()

template<int dim, typename VectorType, typename FEType>
double InterfaceTools::CellWiseFunction< dim, VectorType, FEType >::value ( const Point< dim > & point,
const unsigned int component = 0 ) const
inlineoverride

Return the value of the function at the given point in the reference cell.

Parameters
[in]pointCoordinates of the point in the reference cell
[in]componentIndex of the component of the function for which the value is computed
Returns
Value of the function (or the component of interest) at the given point

Definition at line 137 of file interface_tools.h.

References cell_dof_values, fe, n_cell_wise_dofs, and value().

Member Data Documentation

◆ cell_dof_values

template<int dim, typename VectorType = Vector<double>, typename FEType = FE_Q<dim>>
VectorType InterfaceTools::CellWiseFunction< dim, VectorType, FEType >::cell_dof_values
private

Value of the level-set field at the DoFs of the cell.

Definition at line 131 of file interface_tools.h.

◆ fe

template<int dim, typename VectorType = Vector<double>, typename FEType = FE_Q<dim>>
FEType InterfaceTools::CellWiseFunction< dim, VectorType, FEType >::fe
private

Finite element discretizing the field of interest.

Definition at line 125 of file interface_tools.h.

◆ n_cell_wise_dofs

template<int dim, typename VectorType = Vector<double>, typename FEType = FE_Q<dim>>
unsigned int InterfaceTools::CellWiseFunction< dim, VectorType, FEType >::n_cell_wise_dofs
private

Number of DoFs per element.

Definition at line 128 of file interface_tools.h.


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