LifeV
EntityMarkerIDInterrogator< MeshEntity, ComparisonPolicy > Class Template Reference

A simple predicate to test the marker ID flag. More...

#include <MeshEntityContainer.hpp>

+ Collaboration diagram for EntityMarkerIDInterrogator< MeshEntity, ComparisonPolicy >:

Public Types

typedef ComparisonPolicy comparisonPolicy_Type
 

Public Member Functions

 EntityMarkerIDInterrogator (markerID_Type flag, ComparisonPolicy const &p=std::equal_to< markerID_Type >())
 
bool operator() (const MeshEntity &entity) const
 

Private Attributes

markerID_Type const M_flag
 
ComparisonPolicy const M_policy
 

Detailed Description

template<typename MeshEntity, typename ComparisonPolicy = std::function< bool (markerID_Type, markerID_Type)>>
class LifeV::Predicates::EntityMarkerIDInterrogator< MeshEntity, ComparisonPolicy >

A simple predicate to test the marker ID flag.

MeshEntity must have a method markerID_Type markerID();

The ComparisonPolicy passed as (possible) second template parameter must be a functor capable of being constructed from a bool (*)(markerID_Type const&, entityflag_Type const &) and so that bool operator()(markerID_Type const&, markerID_Type const &) is defined. By default we use the std::equal_to functor

Usage: if you want a predicate that tests if an markerID is equal to a given flag MYFLAG you create a object of type

EntityMarkerIDInterrogator<face_Type,ComparisonPolicy>(MYFLAG,mycomparisonpolicy())
which can now be used on all std algorithms operating on containers of mesh entities
Author
Luca Formaggia

Definition at line 196 of file MeshEntityContainer.hpp.

Member Typedef Documentation

◆ comparisonPolicy_Type

typedef ComparisonPolicy comparisonPolicy_Type

Definition at line 199 of file MeshEntityContainer.hpp.

Constructor & Destructor Documentation

◆ EntityMarkerIDInterrogator()

EntityMarkerIDInterrogator ( markerID_Type  flag,
ComparisonPolicy const &  p = std::equal_to<markerID_Type>() 
)
inline

Definition at line 201 of file MeshEntityContainer.hpp.

+ Here is the caller graph for this function:

Member Function Documentation

◆ operator()()

bool operator() ( const MeshEntity entity) const
inline

Definition at line 204 of file MeshEntityContainer.hpp.

Field Documentation

◆ M_flag

markerID_Type const M_flag
private

Definition at line 210 of file MeshEntityContainer.hpp.

◆ M_policy

ComparisonPolicy const M_policy
private

Definition at line 211 of file MeshEntityContainer.hpp.


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