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

#include <single_predicates.h>

Inheritance diagram for libMesh::Predicates::facelocal_pid< T >:
[legend]

Public Member Functions

 facelocal_pid (processor_id_type p)
 
virtual ~facelocal_pid ()
 
virtual bool operator() (const T &it) const libmesh_override
 

Protected Member Functions

virtual predicate< T > * clone () const libmesh_override
 

Protected Attributes

const processor_id_type _pid
 

Detailed Description

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

Returns
true if the element pointed to is face-local to (is on or has a neighbor on the partition of) a given processor id.

Definition at line 265 of file single_predicates.h.

Constructor & Destructor Documentation

Definition at line 267 of file single_predicates.h.

267 : _pid(p) {}
template<typename T>
virtual libMesh::Predicates::facelocal_pid< T >::~facelocal_pid ( )
virtual

Definition at line 268 of file single_predicates.h.

268 {}

Member Function Documentation

template<typename T>
virtual predicate<T>* libMesh::Predicates::facelocal_pid< T >::clone ( ) const
protectedvirtual

Implements libMesh::Predicates::predicate< T >.

Definition at line 282 of file single_predicates.h.

282 { return new facelocal_pid<T>(*this); }
template<typename T>
virtual bool libMesh::Predicates::facelocal_pid< T >::operator() ( const T &  it) const
virtual

Implements libMesh::Predicates::predicate< T >.

Definition at line 271 of file single_predicates.h.

272  {
273  if ((*it)->processor_id() == _pid)
274  return true;
275  for (auto n : (*it)->neighbor_ptr_range())
276  if (n && n->processor_id() == _pid)
277  return true;
278  return false;
279  }

Member Data Documentation

template<typename T>
const processor_id_type libMesh::Predicates::facelocal_pid< T >::_pid
protected

Definition at line 283 of file single_predicates.h.


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