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

#include <single_predicates.h>

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

Public Member Functions

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

Protected Member Functions

virtual predicate< T > * clone () const 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 274 of file single_predicates.h.

Constructor & Destructor Documentation

◆ facelocal_pid()

template<typename T>
libMesh::Predicates::facelocal_pid< T >::facelocal_pid ( processor_id_type  p)
inline

Definition at line 276 of file single_predicates.h.

276 : _pid(p) {}

◆ ~facelocal_pid()

template<typename T>
virtual libMesh::Predicates::facelocal_pid< T >::~facelocal_pid ( )
inlinevirtual

Definition at line 277 of file single_predicates.h.

277 {}

Member Function Documentation

◆ clone()

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

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

Definition at line 291 of file single_predicates.h.

291 { return new facelocal_pid<T>(*this); }

◆ operator()()

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

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

Definition at line 280 of file single_predicates.h.

References libMesh::Predicates::facelocal_pid< T >::_pid.

281  {
282  if ((*it)->processor_id() == _pid)
283  return true;
284  for (auto n : (*it)->neighbor_ptr_range())
285  if (n && n->processor_id() == _pid)
286  return true;
287  return false;
288  }

Member Data Documentation

◆ _pid

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

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