Public Member Functions | Protected Attributes | List of all members
libMesh::ParallelObject Class Reference

An object whose state is distributed along a set of processors. More...

#include <parallel_object.h>

Inheritance diagram for libMesh::ParallelObject:

Public Member Functions

 ParallelObject (const Parallel::Communicator &comm_in)
 Constructor. More...
 ParallelObject (const ParallelObject &other)
 Copy Constructor. More...
ParallelObjectoperator= (const ParallelObject &libmesh_dbg_var(other))
 "Assignment" operator. More...
virtual ~ParallelObject ()
 Destructor. More...
const Parallel::Communicatorcomm () const
processor_id_type n_processors () const
processor_id_type processor_id () const

Protected Attributes

const Parallel::Communicator_communicator

Detailed Description

An object whose state is distributed along a set of processors.

This class forms the base class for all other classes that are expected to be implemented in parallel. Each ParallelObject requires a Parallel::Communicator object for construction.

Benjamin S. Kirk

Definition at line 50 of file parallel_object.h.

Constructor & Destructor Documentation

◆ ParallelObject() [1/2]

libMesh::ParallelObject::ParallelObject ( const Parallel::Communicator comm_in)


Requires a reference to the communicator that defines the object's parallel decomposition.

Definition at line 58 of file parallel_object.h.

58  :
59  _communicator(comm_in)
60  {}
const Parallel::Communicator & _communicator

◆ ParallelObject() [2/2]

libMesh::ParallelObject::ParallelObject ( const ParallelObject other)

Copy Constructor.

Definition at line 65 of file parallel_object.h.

65  :
66  _communicator(other._communicator)
67  {}
const Parallel::Communicator & _communicator

◆ ~ParallelObject()

virtual libMesh::ParallelObject::~ParallelObject ( )


Virtual because we are a base class.

Definition at line 83 of file parallel_object.h.

83 {}

Member Function Documentation

◆ comm()

const Parallel::Communicator& libMesh::ParallelObject::comm ( ) const

◆ n_processors()

processor_id_type libMesh::ParallelObject::n_processors ( ) const
The number of processors in the group.

Definition at line 95 of file parallel_object.h.

References _communicator, and libMesh::Parallel::Communicator::size().

Referenced by libMesh::MeshBase::partition().

96  { return cast_int<processor_id_type>(_communicator.size()); }
processor_id_type size() const
Definition: communicator.h:175
const Parallel::Communicator & _communicator

◆ operator=()

ParallelObject& libMesh::ParallelObject::operator= ( const ParallelObject libmesh_dbg_varother)

"Assignment" operator.

Simply asserts our references are identical because this is the only thing that makes sense

Definition at line 74 of file parallel_object.h.

References _communicator, and libMesh::Parallel::Communicator::_communicator.

75  {
76  libmesh_assert_equal_to (&_communicator, &other._communicator);
77  return *this;
78  }
const Parallel::Communicator & _communicator

◆ processor_id()

processor_id_type libMesh::ParallelObject::processor_id ( ) const

Member Data Documentation

◆ _communicator

const Parallel::Communicator& libMesh::ParallelObject::_communicator

Definition at line 107 of file parallel_object.h.

Referenced by comm(), n_processors(), operator=(), and processor_id().

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