libMesh::Predicates::Local< T > Struct Template Reference

#include <multi_predicates.h>

Inheritance diagram for libMesh::Predicates::Local< T >:

Public Member Functions

 Local (processor_id_type my_pid)
 
virtual bool operator() (const T &it) const
 

Protected Member Functions

void deep_copy (const abstract_multi_predicate &rhs)
 

Protected Attributes

std::vector< predicate< T > * > _predicates
 

Detailed Description

template<typename T>
struct libMesh::Predicates::Local< T >

Used to iterate over non-nullptr, local entries (i.e. owned by the current processor) in a container.

Definition at line 259 of file multi_predicates.h.

Constructor & Destructor Documentation

◆ Local()

template<typename T >
libMesh::Predicates::Local< T >::Local ( processor_id_type  my_pid)
inline

Definition at line 262 of file multi_predicates.h.

References libMesh::Predicates::abstract_multi_predicate< T >::_predicates.

263  {
264  this->_predicates.push_back(new not_null<T>);
265  this->_predicates.push_back(new pid<T>(my_pid));
266  }
std::vector< predicate< T > * > _predicates

Member Function Documentation

◆ deep_copy()

template<typename T >
void libMesh::Predicates::abstract_multi_predicate< T >::deep_copy ( const abstract_multi_predicate< T > &  rhs)
inlineprotectedinherited

Definition at line 108 of file multi_predicates.h.

References libMesh::Predicates::abstract_multi_predicate< T >::_predicates.

Referenced by libMesh::Predicates::abstract_multi_predicate< T >::abstract_multi_predicate(), and libMesh::Predicates::abstract_multi_predicate< T >::operator=().

109  {
110  for (std::size_t i=0; i<rhs._predicates.size(); ++i)
111  _predicates.push_back(rhs._predicates[i]->clone());
112  }
std::vector< predicate< T > * > _predicates

◆ operator()()

template<typename T >
virtual bool libMesh::Predicates::abstract_multi_predicate< T >::operator() ( const T &  it) const
inlinevirtualinherited

Definition at line 80 of file multi_predicates.h.

References libMesh::Predicates::abstract_multi_predicate< T >::_predicates, and pred.

81  {
82  for (std::size_t i=0; i<_predicates.size(); ++i)
83  {
84  const predicate<T> * pred = _predicates[i];
85 
86  libmesh_assert (pred);
87 
88  if (!(*pred)(it))
89  return false;
90  }
91 
92  return true;
93  }
std::vector< predicate< T > * > _predicates
PredBase * pred

Member Data Documentation

◆ _predicates

template<typename T >
std::vector<predicate<T> *> libMesh::Predicates::abstract_multi_predicate< T >::_predicates
protectedinherited

Definition at line 115 of file multi_predicates.h.

Referenced by libMesh::Predicates::Active< T >::Active(), libMesh::Predicates::ActiveLocal< T >::ActiveLocal(), libMesh::Predicates::ActiveLocalSubdomain< T >::ActiveLocalSubdomain(), libMesh::Predicates::ActiveNotLocal< T >::ActiveNotLocal(), libMesh::Predicates::ActiveOnBoundary< T >::ActiveOnBoundary(), libMesh::Predicates::ActivePID< T >::ActivePID(), libMesh::Predicates::ActiveSemiLocal< T >::ActiveSemiLocal(), libMesh::Predicates::ActiveSubdomain< T >::ActiveSubdomain(), libMesh::Predicates::ActiveSubdomainSet< T >::ActiveSubdomainSet(), libMesh::Predicates::ActiveType< T >::ActiveType(), libMesh::Predicates::Ancestor< T >::Ancestor(), libMesh::Predicates::BID< T >::BID(), libMesh::Predicates::BND< T >::BND(), libMesh::Predicates::BoundarySide< T >::BoundarySide(), libMesh::Predicates::abstract_multi_predicate< T >::deep_copy(), libMesh::Predicates::Evaluable< T >::Evaluable(), libMesh::Predicates::FaceLocal< T >::FaceLocal(), libMesh::Predicates::Flagged< T >::Flagged(), libMesh::Predicates::FlaggedPID< T >::FlaggedPID(), libMesh::Predicates::Ghost< T >::Ghost(), libMesh::Predicates::IsNull< T >::IsNull(), libMesh::Predicates::Level< T >::Level(), libMesh::Predicates::Local< T >::Local(), libMesh::Predicates::LocalLevel< T >::LocalLevel(), libMesh::Predicates::LocalNotLevel< T >::LocalNotLevel(), libMesh::Predicates::NotActive< T >::NotActive(), libMesh::Predicates::NotAncestor< T >::NotAncestor(), libMesh::Predicates::NotLevel< T >::NotLevel(), libMesh::Predicates::NotLocal< T >::NotLocal(), libMesh::Predicates::NotNull< T >::NotNull(), libMesh::Predicates::NotPID< T >::NotPID(), libMesh::Predicates::NotSubActive< T >::NotSubActive(), libMesh::Predicates::abstract_multi_predicate< T >::operator()(), libMesh::Predicates::abstract_multi_predicate< T >::operator=(), libMesh::Predicates::PID< T >::PID(), libMesh::Predicates::SubActive< T >::SubActive(), libMesh::Predicates::Type< T >::Type(), and libMesh::Predicates::abstract_multi_predicate< T >::~abstract_multi_predicate().


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