Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
CellId Class Reference

#include <CellId.hpp>

+ Inheritance diagram for CellId:
+ Collaboration diagram for CellId:

Public Member Functions

 CellId ()
 
virtual ~CellId ()
 
void AssignCellId ()
 
unsigned GetMaxCellId () const
 
unsigned GetCellId () const
 
- Public Member Functions inherited from AbstractCellProperty
 AbstractCellProperty ()
 
virtual ~AbstractCellProperty ()
 
template<class CLASS >
bool IsType () const
 
template<class BASECLASS >
bool IsSubType () const
 
bool IsSame (const AbstractCellProperty *pOther) const
 
bool IsSame (boost::shared_ptr< const AbstractCellProperty > pOther) const
 
void IncrementCellCount ()
 
void DecrementCellCount ()
 
unsigned GetCellCount () const
 
- Public Member Functions inherited from Identifiable
virtual ~Identifiable ()
 
std::string GetIdentifier () const
 

Static Public Member Functions

static void ResetMaxCellId ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 

Private Attributes

unsigned mCellId
 

Static Private Attributes

static unsigned mMaxCellId = 0
 

Friends

class boost::serialization::access
 

Detailed Description

Cell id class.

Each Cell owns a CellPropertyCollection, which may include a shared pointer to an object of this type. When a Cell divides a new object is created with the new cell id.

The CellId object that stores the value of a the cell identifier.

Definition at line 57 of file CellId.hpp.

Constructor & Destructor Documentation

◆ CellId()

CellId::CellId ( )

Constructor.

This doesn't do anything and AssignCellId must be called before doing anything

Definition at line 41 of file CellId.cpp.

References mCellId, and UNSIGNED_UNSET.

◆ ~CellId()

CellId::~CellId ( )
virtual

Destructor.

Definition at line 47 of file CellId.cpp.

Member Function Documentation

◆ AssignCellId()

void CellId::AssignCellId ( )

This assigns the cell id to be the maximum current cell id. It then increments mMaxCellId.

Definition at line 51 of file CellId.cpp.

References PetscTools::GetMyRank(), PetscTools::GetNumProcs(), mCellId, and mMaxCellId.

◆ GetCellId()

unsigned CellId::GetCellId ( ) const
Returns
mCellId.

Definition at line 57 of file CellId.cpp.

References EXCEPTION, mCellId, and UNSIGNED_UNSET.

◆ GetMaxCellId()

unsigned CellId::GetMaxCellId ( ) const
Returns
the maximum value of the cell identifier

Definition at line 66 of file CellId.cpp.

References EXCEPTION, mCellId, mMaxCellId, and UNSIGNED_UNSET.

◆ ResetMaxCellId()

void CellId::ResetMaxCellId ( )
static

Reset the maximum cell id to zero.

Definition at line 75 of file CellId.cpp.

References mMaxCellId.

Referenced by AbstractCellBasedTestSuite::setUp().

◆ serialize()

template<class Archive >
void CellId::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

Archive the member variables.

Parameters
archivethe archive
versionthe current version of this class

Definition at line 78 of file CellId.hpp.

References PetscTools::IsParallel(), mCellId, and mMaxCellId.

Friends And Related Symbol Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 70 of file CellId.hpp.

Member Data Documentation

◆ mCellId

unsigned CellId::mCellId
private

Cell Id

Definition at line 64 of file CellId.hpp.

Referenced by CellId(), AssignCellId(), GetCellId(), GetMaxCellId(), and serialize().

◆ mMaxCellId

unsigned CellId::mMaxCellId = 0
staticprivate

maximum cell identifier.

Definition at line 67 of file CellId.hpp.

Referenced by AssignCellId(), GetMaxCellId(), ResetMaxCellId(), and serialize().


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