mesh_converter::Combination
Functor class to be used by the for_each_combination algorithm. More…
#include <MeshElement.hpp>
Public Functions
Name | |
---|---|
Combination(const std::vector< Point > * points, const std::vector< Point > * field, const Point & q, const double volume_cut) constructor for functor |
|
template <class It > bool |
operator()(It begin, It end) Operator called for each permutation. |
bool | valid() const Member to check for validity of returned mesh element: |
const Point & | result() const Member to retrieve interpolated result from valid mesh element. |
Detailed Description
class mesh_converter::Combination;
Functor class to be used by the for_each_combination algorithm.
It receives pointers to the point and field vectors and its operator() member is called for every combination of results found. It constructs a new MeshElement, checks for its validity and returns true to stop the iteration and false to continue to the next combination of results.
Public Functions Documentation
function Combination
inline explicit Combination(
const std::vector< Point > * points,
const std::vector< Point > * field,
const Point & q,
const double volume_cut
)
constructor for functor
Parameters:
- points Pointer to mesh point vector
- field Pointer to field vector
- q Reference point to interpolate at
- volume_cut Volume cut to be used
function operator()
template <class It >
inline bool operator()(
It begin,
It end
)
Operator called for each permutation.
Parameters:
- begin First iterator element of current combination
- end Last iterator element of current combination
Return: True if valid mesh element was found, stops the loop, or False if not found, continuing loop through combinations.
function valid
inline bool valid() const
Member to check for validity of returned mesh element:
Return: True if element is valid and can be used, False if no valid element was found but iteration ended without result
function result
inline const Point & result() const
Member to retrieve interpolated result from valid mesh element.
Return: Interpolated result from valid mesh element
Updated on 2024-12-13 at 08:31:36 +0000