Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
libMesh::Predicates::ActiveSemiLocal< T > Struct Template Reference

Used to iterate over non-NULL, semi-local entries (i.e. More...

#include <multi_predicates.h>

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

Public Member Functions

 ActiveSemiLocal (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::ActiveSemiLocal< T >

Used to iterate over non-NULL, semi-local entries (i.e.

are not subactive and have are owned by an attached processor) in a container.

FIXME: This is not currently safe to use on adaptively-refined grids, it should be added back when Elem::is_semilocal() has been patched to not require the Elem to be active. Used to iterate over non-NULL, active, non sub-active, semi-local elements in a container.

Definition at line 296 of file multi_predicates.h.

Constructor & Destructor Documentation

Definition at line 299 of file multi_predicates.h.

300  {
301  this->_predicates.push_back(new not_null<T>);
302  this->_predicates.push_back(new active<T>);
303  this->_predicates.push_back(new not_subactive<T>);
304  this->_predicates.push_back(new semilocal_pid<T>(my_pid));
305  }
std::vector< predicate< T > * > _predicates

Member Function Documentation

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

Definition at line 107 of file multi_predicates.h.

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

108  {
109  for (std::size_t i=0; i<rhs._predicates.size(); ++i)
110  _predicates.push_back(rhs._predicates[i]->clone());
111  }
std::vector< predicate< T > * > _predicates
template<typename T >
virtual bool libMesh::Predicates::abstract_multi_predicate< T >::operator() ( const T &  it) const

Definition at line 79 of file multi_predicates.h.

References libMesh::libmesh_assert(), and pred.

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

Member Data Documentation

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

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