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 ()=default
 
virtual bool operator() (const T &it) const override
 

Protected Member Functions

virtual std::unique_ptr< 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 265 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 267 of file single_predicates.h.

267 : _pid(p) {}

◆ ~facelocal_pid()

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

Member Function Documentation

◆ clone()

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

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

Definition at line 282 of file single_predicates.h.

282 { return std::make_unique<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 271 of file single_predicates.h.

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

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

◆ _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: