FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Assembly::DiscreteEvaluator Class Reference

Discrete function evaluator. More...

#include <discrete_evaluator.hpp>

Static Public Member Functions

template<typename DT_ , typename DTP_ , typename IT_ , int dim_, int s_, typename Space_ >
static ScalarDiscreteEvalData< DT_, dim_ > eval_fe_function (const Tiny::Vector< DTP_, dim_, s_ > &point, const LAFEM::DenseVector< DT_, IT_ > &vector, const Space_ &space)
 Evaluates a scalar finite-element function in a given point. More...
 
template<typename DT_ , typename DTP_ , typename IT_ , int dim_, int s_, typename Space_ >
static VectorDiscreteEvalData< DT_, dim_ > eval_fe_function (const Tiny::Vector< DTP_, dim_, s_ > &point, const LAFEM::DenseVectorBlocked< DT_, IT_, dim_ > &vector, const Space_ &space)
 Evaluates a vector-valued finite-element function in a given point. More...
 
template<typename DT_ , typename DTP_ , typename IT_ , int dim_, typename Space_ >
static ScalarDiscreteEvalData< DT_, dim_ > eval_fe_function (const Trafo::InverseMappingData< DTP_, dim_, dim_ > &inv_map_data, const LAFEM::DenseVector< DT_, IT_ > &vector, const Space_ &space)
 Evaluates a scalar finite-element function in a given unmapped point. More...
 
template<typename DT_ , typename DTP_ , typename IT_ , int dim_, typename Space_ >
static VectorDiscreteEvalData< DT_, dim_ > eval_fe_function (const Trafo::InverseMappingData< DTP_, dim_, dim_ > &inv_map_data, const LAFEM::DenseVectorBlocked< DT_, IT_, dim_ > &vector, const Space_ &space)
 Evaluates a vector-valued finite-element function in a given unmapped point. More...
 
template<typename DT_ , typename DTP_ , typename IT_ , int dim_, int s_, typename Space_ >
static VectorDiscreteEvalData< DT_, dim_ > eval_fe_gradient (const Tiny::Vector< DTP_, dim_, s_ > &point, const LAFEM::DenseVector< DT_, IT_ > &vector, const Space_ &space)
 Evaluates the gradient of a scalar finite-element function in a given point. More...
 
template<typename DT_ , typename DTP_ , typename IT_ , int dim_, int s_, typename Space_ >
static MatrixDiscreteEvalData< DT_, dim_, dim_ > eval_fe_gradient (const Tiny::Vector< DTP_, dim_, s_ > &point, const LAFEM::DenseVectorBlocked< DT_, IT_, dim_ > &vector, const Space_ &space)
 Evaluates the gradient of a vector-valued finite-element function in a given point. More...
 
template<typename DT_ , typename DTP_ , typename IT_ , int dim_, typename Space_ >
static VectorDiscreteEvalData< DT_, dim_ > eval_fe_gradient (const Trafo::InverseMappingData< DTP_, dim_, dim_ > &inv_map_data, const LAFEM::DenseVector< DT_, IT_ > &vector, const Space_ &space)
 Evaluates the gradient of a scalar finite-element function in a given unmapped point. More...
 
template<typename DT_ , typename DTP_ , typename IT_ , int dim_, typename Space_ >
static MatrixDiscreteEvalData< DT_, dim_, dim_ > eval_fe_gradient (const Trafo::InverseMappingData< DTP_, dim_, dim_ > &inv_map_data, const LAFEM::DenseVectorBlocked< DT_, IT_, dim_ > &vector, const Space_ &space)
 Evaluates the gradient of a vector-valued finite-element function in a given unmapped point. More...
 

Detailed Description

Discrete function evaluator.

This class implements various functions which can be used to evaluate discrete (finite-element) functions defined on a mesh/trafo in arbitrary points.

Remarks: A basic problem with discrete (finite-element) function evaluation is that one single point may intersect several cells of the mesh and, depending on the finite-element space, the discrete function may not be uniquely defined in this case. On the other hand, the given input point may be outside of the domain represented by the underlying mesh (or the patch in the parallel domain decomposition case), in which case the discrete function is not defined at all.

In consequence, the functions provided by this class do not return a single value, but a ScalarDiscreteEvalData or VectorDiscreteEvalData object instead, depending on whether the discrete function is a scalar function or a vector field. These objects contain a vector of all cells, which have been found to intersect with the given input point, as well as the corresponding values of the discrete function as evaluated on the cells. It is up to you to decide what has to be done if a given input point was found to intersect with more than one element – or no element at all. In most cases, you will simply want to compute the average of all these values, which can be computed by the mean_value() functions of the ScalarDiscreteEvalData/VectorDiscreteEvalData classes.

Note
This class is strongly related to the Trafo::InverseMapping class template, which is used for the unmapping of the input point, so you might want to get familiar with that one, too.
Author
Peter Zajac

Definition at line 354 of file discrete_evaluator.hpp.

Member Function Documentation

◆ eval_fe_function() [1/4]

template<typename DT_ , typename DTP_ , typename IT_ , int dim_, int s_, typename Space_ >
static ScalarDiscreteEvalData< DT_, dim_ > FEAT::Assembly::DiscreteEvaluator::eval_fe_function ( const Tiny::Vector< DTP_, dim_, s_ > &  point,
const LAFEM::DenseVector< DT_, IT_ > &  vector,
const Space_ &  space 
)
inlinestatic

Evaluates a scalar finite-element function in a given point.

Note
If you intend to evaluate several finite-element functions in the same point, then you might consider unmapping the input point by yourself and using the other overload of this function instead for performance reasons.
Parameters
[in]pointThe transient point in real world coordinates in which the finite element function is to be evaluated.
[in]vectorThe transient coefficient vector of the finite-element function.
[in]spaceThe transient finite-element space corresponding to the vector.
Returns
A ScalarDiscreteEvalData object that contains the evaluations results.

Definition at line 379 of file discrete_evaluator.hpp.

References eval_fe_function(), and FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::unmap_point().

Referenced by eval_fe_function().

◆ eval_fe_function() [2/4]

template<typename DT_ , typename DTP_ , typename IT_ , int dim_, int s_, typename Space_ >
static VectorDiscreteEvalData< DT_, dim_ > FEAT::Assembly::DiscreteEvaluator::eval_fe_function ( const Tiny::Vector< DTP_, dim_, s_ > &  point,
const LAFEM::DenseVectorBlocked< DT_, IT_, dim_ > &  vector,
const Space_ &  space 
)
inlinestatic

Evaluates a vector-valued finite-element function in a given point.

Note
If you intend to evaluate several finite-element functions in the same point, then you might consider unmapping the input point by yourself and using the other overload of this function instead for performance reasons.
Parameters
[in]pointThe transient point in real world coordinates in which the finite element function is to be evaluated.
[in]vectorThe transient coefficient vector of the finite-element function.
[in]spaceThe transient finite-element space.
Returns
A VectorDiscreteEvalData object that contains the evaluations results.

Definition at line 526 of file discrete_evaluator.hpp.

References eval_fe_function(), and FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::unmap_point().

◆ eval_fe_function() [3/4]

template<typename DT_ , typename DTP_ , typename IT_ , int dim_, typename Space_ >
static ScalarDiscreteEvalData< DT_, dim_ > FEAT::Assembly::DiscreteEvaluator::eval_fe_function ( const Trafo::InverseMappingData< DTP_, dim_, dim_ > &  inv_map_data,
const LAFEM::DenseVector< DT_, IT_ > &  vector,
const Space_ &  space 
)
inlinestatic

Evaluates a scalar finite-element function in a given unmapped point.

Parameters
[in]inv_map_dataA transient Trafo::InverseMappingData object that represents the unmapped evaluation point, as computed by the Trafo::InverseMapping class.
[in]vectorThe transient coefficient vector of the finite-element function.
[in]spaceThe transient finite-element space.
Returns
A ScalarDiscreteEvalData object that contains the evaluations results.

Definition at line 411 of file discrete_evaluator.hpp.

References FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::cells, FEAT::dom_point, FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::dom_points, FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::size(), FEAT::value, and FEAT::Assembly::ScalarDiscreteEvalData< DT_, dim_ >::values.

◆ eval_fe_function() [4/4]

template<typename DT_ , typename DTP_ , typename IT_ , int dim_, typename Space_ >
static VectorDiscreteEvalData< DT_, dim_ > FEAT::Assembly::DiscreteEvaluator::eval_fe_function ( const Trafo::InverseMappingData< DTP_, dim_, dim_ > &  inv_map_data,
const LAFEM::DenseVectorBlocked< DT_, IT_, dim_ > &  vector,
const Space_ &  space 
)
inlinestatic

Evaluates a vector-valued finite-element function in a given unmapped point.

Parameters
[in]inv_map_dataA transient Trafo::InverseMappingData object that represents the unmapped evaluation point, as computed by the Trafo::InverseMapping class.
[in]vectorThe transient coefficient vector of the finite-element function.
[in]spaceThe transient finite-element space.
Returns
A VectorDiscreteEvalData object that contains the evaluations results.

Definition at line 558 of file discrete_evaluator.hpp.

References FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::cells, FEAT::dom_point, FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::dom_points, FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::size(), FEAT::value, and FEAT::Assembly::VectorDiscreteEvalData< DT_, dim_ >::values.

◆ eval_fe_gradient() [1/4]

template<typename DT_ , typename DTP_ , typename IT_ , int dim_, int s_, typename Space_ >
static VectorDiscreteEvalData< DT_, dim_ > FEAT::Assembly::DiscreteEvaluator::eval_fe_gradient ( const Tiny::Vector< DTP_, dim_, s_ > &  point,
const LAFEM::DenseVector< DT_, IT_ > &  vector,
const Space_ &  space 
)
inlinestatic

Evaluates the gradient of a scalar finite-element function in a given point.

Note
If you intend to evaluate several finite-element functions in the same point, then you might consider unmapping the input point by yourself and using the other overload of this function instead for performance reasons.
Parameters
[in]pointThe point in real world coordinates in which the finite element function is to be evaluated.
[in]vectorThe coefficient vector of the finite-element function.
[in]spaceThe finite-element space.
Returns
A VectorDiscreteEvalData object that contains the evaluations results.

Definition at line 680 of file discrete_evaluator.hpp.

References eval_fe_gradient(), and FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::unmap_point().

Referenced by eval_fe_gradient().

◆ eval_fe_gradient() [2/4]

template<typename DT_ , typename DTP_ , typename IT_ , int dim_, int s_, typename Space_ >
static MatrixDiscreteEvalData< DT_, dim_, dim_ > FEAT::Assembly::DiscreteEvaluator::eval_fe_gradient ( const Tiny::Vector< DTP_, dim_, s_ > &  point,
const LAFEM::DenseVectorBlocked< DT_, IT_, dim_ > &  vector,
const Space_ &  space 
)
inlinestatic

Evaluates the gradient of a vector-valued finite-element function in a given point.

Note
If you intend to evaluate several finite-element functions in the same point, then you might consider unmapping the input point by yourself and using the other overload of this function instead for performance reasons.
Parameters
[in]pointThe point in real world coordinates in which the finite element function is to be evaluated.
[in]vectorThe coefficient vector of the finite-element function.
[in]spaceThe finite-element space.
Returns
A MatrixDiscreteEvalData object that contains the evaluations results.

Definition at line 838 of file discrete_evaluator.hpp.

References eval_fe_gradient(), and FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::unmap_point().

◆ eval_fe_gradient() [3/4]

template<typename DT_ , typename DTP_ , typename IT_ , int dim_, typename Space_ >
static VectorDiscreteEvalData< DT_, dim_ > FEAT::Assembly::DiscreteEvaluator::eval_fe_gradient ( const Trafo::InverseMappingData< DTP_, dim_, dim_ > &  inv_map_data,
const LAFEM::DenseVector< DT_, IT_ > &  vector,
const Space_ &  space 
)
inlinestatic

Evaluates the gradient of a scalar finite-element function in a given unmapped point.

Parameters
[in]inv_map_dataA Trafo::InverseMappingData object that represents the unmapped evaluation point, as computed by the Trafo::InverseMapping class.
[in]vectorThe coefficient vector of the finite-element function.
[in]spaceThe finite-element space.
Returns
A VectorDiscreteEvalData object that contains the evaluations results.

Definition at line 712 of file discrete_evaluator.hpp.

References FEAT::Tiny::axpy(), FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::cells, FEAT::dom_point, FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::dom_points, FEAT::Tiny::Vector< T_, n_, s_ >::format(), FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::size(), and FEAT::Assembly::VectorDiscreteEvalData< DT_, dim_ >::values.

◆ eval_fe_gradient() [4/4]

template<typename DT_ , typename DTP_ , typename IT_ , int dim_, typename Space_ >
static MatrixDiscreteEvalData< DT_, dim_, dim_ > FEAT::Assembly::DiscreteEvaluator::eval_fe_gradient ( const Trafo::InverseMappingData< DTP_, dim_, dim_ > &  inv_map_data,
const LAFEM::DenseVectorBlocked< DT_, IT_, dim_ > &  vector,
const Space_ &  space 
)
inlinestatic

Evaluates the gradient of a vector-valued finite-element function in a given unmapped point.

Parameters
[in]inv_map_dataA Trafo::InverseMappingData object that represents the unmapped evaluation point, as computed by the Trafo::InverseMapping class.
[in]vectorThe coefficient vector of the finite-element function.
[in]spaceThe finite-element space.
Returns
A MatrixDiscreteEvalData object that contains the evaluations results.

Definition at line 870 of file discrete_evaluator.hpp.

References FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::add_outer_product(), FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::cells, FEAT::dom_point, FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::dom_points, FEAT::Tiny::Matrix< T_, m_, n_, sm_, sn_ >::format(), FEAT::Trafo::InverseMappingData< DataType_, shape_dim_, world_dim_ >::size(), and FEAT::Assembly::MatrixDiscreteEvalData< DT_, dim_i_, dim_j_ >::values.


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