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

Global discrete evaluator. More...

#include <discrete_evaluator.hpp>

Static Public Member Functions

template<typename PointRange_ , typename DT_ , typename IT_ , typename Space_ >
static std::vector< Assembly::ScalarDiscreteEvalData< DT_, Intern::dim_from_point_range< PointRange_ > > > eval_fe_function (const Dist::Comm &comm, const PointRange_ &points, const LAFEM::DenseVector< DT_, IT_ > &vector, const Space_ &space)
 Evaluates a scalar finite-element function in all given points. More...
 
template<typename PointRange_ , typename DT_ , typename IT_ , typename Space_ >
static std::vector< Assembly::VectorDiscreteEvalData< DT_, Intern::dim_from_point_range< PointRange_ > > > eval_fe_function (const Dist::Comm &comm, const PointRange_ &points, const LAFEM::DenseVectorBlocked< DT_, IT_, Intern::dim_from_point_range< PointRange_ > > &vector, const Space_ &space)
 Evaluates a vector-valued finite-element function in all given points. More...
 
template<typename PointRange_ , typename DT_ , typename IT_ , typename Space_ >
static std::vector< Assembly::VectorDiscreteEvalData< DT_, Intern::dim_from_point_range< PointRange_ > > > eval_fe_gradient (const Dist::Comm &comm, const PointRange_ &points, const LAFEM::DenseVector< DT_, IT_ > &vector, const Space_ &space)
 Evaluates the gradient of a scalar finite-element function in all given points. More...
 
template<typename PointRange_ , typename DT_ , typename IT_ , typename Space_ >
static std::vector< Assembly::MatrixDiscreteEvalData< DT_, Intern::dim_from_point_range< PointRange_ >, Intern::dim_from_point_range< PointRange_ > > > eval_fe_gradient (const Dist::Comm &comm, const PointRange_ &points, const LAFEM::DenseVectorBlocked< DT_, IT_, Intern::dim_from_point_range< PointRange_ > > &vector, const Space_ &space)
 Evaluates the gradient of a vector-valued finite-element function in all given points. More...
 

Static Private Member Functions

template<bool gradient_, typename PointRange_ , typename VectorType_ , typename Space_ >
static std::vector< typename Intern::DiscreteEvaluatorTypeHelper< PointRange_, VectorType_, Space_, gradient_ >::EvalType > _remote_eval (const Dist::Comm &comm, const PointRange_ &points, const VectorType_ &vector, const Space_ &space)
 Common function for evaluating a scalar or vector-valued finite-element function on a distributed domain. More...
 
template<typename BoundingBoxType_ , typename MeshType_ >
static BoundingBoxType_ get_local_bb (const MeshType_ &mesh)
 Get bounding box of local part of domain. More...
 
template<typename BoundingBoxType_ , typename PointType_ >
static bool is_in_bb (const BoundingBoxType_ &bb, const PointType_ &p)
 Check if a point is in a bounding box. More...
 

Detailed Description

Global discrete evaluator.

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

See also
Assembly::DiscreteEvaluator

Definition at line 125 of file discrete_evaluator.hpp.

Member Function Documentation

◆ _remote_eval()

template<bool gradient_, typename PointRange_ , typename VectorType_ , typename Space_ >
static std::vector< typename Intern::DiscreteEvaluatorTypeHelper< PointRange_, VectorType_, Space_, gradient_ >::EvalType > FEAT::Global::DiscreteEvaluator::_remote_eval ( const Dist::Comm &  comm,
const PointRange_ &  points,
const VectorType_ &  vector,
const Space_ &  space 
)
inlinestaticprivate

Common function for evaluating a scalar or vector-valued finite-element function on a distributed domain.

Template Parameters
gradient_Are we evaluating the function or its gradient?
PointRange_Type of point range
VectorType_Type of vector
Space_Space type of finite-element function
Parameters
[in]commA transient reference to the communicator that the domain is distributed over.
[in]pointsA transient reference to a range of points 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 vector of *DiscreteE*valData objects that contain the evaluation results. One *DiscreteEvalData object is returned per point in the point range. Each *DiscreteEvalData object contains all values determined by all ranks that managed to evaluate the function in that point.

Definition at line 299 of file discrete_evaluator.hpp.

References FEAT::Dist::Comm::allgather(), FEAT::Assembly::DiscreteEvaluator::eval_fe_function(), FEAT::Assembly::DiscreteEvaluator::eval_fe_gradient(), is_in_bb(), FEAT::Dist::Comm::rank(), FEAT::Dist::Comm::size(), and FEAT::Trafo::InverseMapping< Trafo_, DataType_ >::unmap_point().

◆ eval_fe_function() [1/2]

template<typename PointRange_ , typename DT_ , typename IT_ , typename Space_ >
static std::vector< Assembly::ScalarDiscreteEvalData< DT_, Intern::dim_from_point_range< PointRange_ > > > FEAT::Global::DiscreteEvaluator::eval_fe_function ( const Dist::Comm &  comm,
const PointRange_ &  points,
const LAFEM::DenseVector< DT_, IT_ > &  vector,
const Space_ &  space 
)
inlinestatic

Evaluates a scalar finite-element function in all given points.

Template Parameters
PointRange_Type of point range
DT_Data type of coefficient vector and evaluation results
IT_Index type of coefficient vector
Space_Space type of finite-element function
Parameters
[in]commA transient reference to the communicator that the domain is distributed over.
[in]pointsA transient reference to a range of points 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 vector of ScalarDiscreteEvalData objects that contain the evaluation results. One ScalarDiscreteEvalData object is returned per point in the point range. Each ScalarDiscreteEvalData object contains all values determined by all ranks that managed to evaluate the function in that point.

Definition at line 156 of file discrete_evaluator.hpp.

◆ eval_fe_function() [2/2]

template<typename PointRange_ , typename DT_ , typename IT_ , typename Space_ >
static std::vector< Assembly::VectorDiscreteEvalData< DT_, Intern::dim_from_point_range< PointRange_ > > > FEAT::Global::DiscreteEvaluator::eval_fe_function ( const Dist::Comm &  comm,
const PointRange_ &  points,
const LAFEM::DenseVectorBlocked< DT_, IT_, Intern::dim_from_point_range< PointRange_ > > &  vector,
const Space_ &  space 
)
inlinestatic

Evaluates a vector-valued finite-element function in all given points.

Template Parameters
PointRange_Type of point range
DT_Data type of coefficient vector and evaluation results
IT_Index type of coefficient vector
Space_Space type of finite-element function
Parameters
[in]commA transient reference to the communicator that the domain is distributed over.
[in]pointsA transient reference to a range of points 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 vector of VectorDiscreteEvalData objects that contain the evaluation results. One VectorDiscreteEvalData object is returned per point in the point range. Each VectorDiscreteEvalData object contains all values determined by all ranks that managed to evaluate the function in that point.

Definition at line 188 of file discrete_evaluator.hpp.

◆ eval_fe_gradient() [1/2]

template<typename PointRange_ , typename DT_ , typename IT_ , typename Space_ >
static std::vector< Assembly::VectorDiscreteEvalData< DT_, Intern::dim_from_point_range< PointRange_ > > > FEAT::Global::DiscreteEvaluator::eval_fe_gradient ( const Dist::Comm &  comm,
const PointRange_ &  points,
const LAFEM::DenseVector< DT_, IT_ > &  vector,
const Space_ &  space 
)
inlinestatic

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

Template Parameters
PointRange_Type of point range
DT_Data type of coefficient vector and evaluation results
IT_Index type of coefficient vector
Space_Space type of finite-element function
Parameters
[in]commA transient reference to the communicator that the domain is distributed over.
[in]pointsA transient reference to a range of points 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 vector of VectorDiscreteEvalData objects that contain the evaluation results. One VectorDiscreteEvalData object is returned per point in the point range. Each VectorDiscreteEvalData object contains all values determined by all ranks that managed to evaluate the function in that point.

Definition at line 225 of file discrete_evaluator.hpp.

◆ eval_fe_gradient() [2/2]

template<typename PointRange_ , typename DT_ , typename IT_ , typename Space_ >
static std::vector< Assembly::MatrixDiscreteEvalData< DT_, Intern::dim_from_point_range< PointRange_ >, Intern::dim_from_point_range< PointRange_ > > > FEAT::Global::DiscreteEvaluator::eval_fe_gradient ( const Dist::Comm &  comm,
const PointRange_ &  points,
const LAFEM::DenseVectorBlocked< DT_, IT_, Intern::dim_from_point_range< PointRange_ > > &  vector,
const Space_ &  space 
)
inlinestatic

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

Template Parameters
PointRange_Type of point range
DT_Data type of coefficient vector and evaluation results
IT_Index type of coefficient vector
Space_Space type of finite-element function
Parameters
[in]commA transient reference to the communicator that the domain is distributed over.
[in]pointsA transient reference to a range of points 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 vector of MatrixDiscreteEvalData objects that contain the evaluation results. One MatrixDiscreteEvalData object is returned per point in the point range. Each MatrixDiscreteEvalData object contains all values determined by all ranks that managed to evaluate the function in that point.

Definition at line 261 of file discrete_evaluator.hpp.

◆ get_local_bb()

template<typename BoundingBoxType_ , typename MeshType_ >
static BoundingBoxType_ FEAT::Global::DiscreteEvaluator::get_local_bb ( const MeshType_ &  mesh)
inlinestaticprivate

Get bounding box of local part of domain.

Definition at line 403 of file discrete_evaluator.hpp.

References FEAT::Math::maxi(), and FEAT::Math::mini().

◆ is_in_bb()

template<typename BoundingBoxType_ , typename PointType_ >
static bool FEAT::Global::DiscreteEvaluator::is_in_bb ( const BoundingBoxType_ &  bb,
const PointType_ &  p 
)
inlinestaticprivate

Check if a point is in a bounding box.

Definition at line 385 of file discrete_evaluator.hpp.

Referenced by _remote_eval().


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