Chaste
Release::3.4
|
#include <CellVecData.hpp>
Public Member Functions | |
CellVecData () | |
CellVecData (const CellVecData &rAnotherCellVecData) | |
CellVecData (const std::map< std::string, Vec > &rCellVecDataMap) | |
virtual | ~CellVecData () |
void | SetItem (const std::string &rVariableName, Vec data) |
Vec | GetItem (const std::string &rVariableName) const |
unsigned | GetNumItems () const |
std::vector< std::string > | GetKeys () 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 |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Private Attributes | |
std::map< std::string, Vec > | mCellVecData |
bool | mFreeVecs |
Friends | |
class | boost::serialization::access |
CellVecData class.
This cell property allows each cell to store one or more 'named' PETSc Vec variables associated with it, for example solutions to reaction-diffusion PDEs solved within the cell. Other classes may interrogate or modify the values stored in this class.
Definition at line 62 of file CellVecData.hpp.
CellVecData::CellVecData | ( | ) |
Default constructor
Definition at line 38 of file CellVecData.cpp.
CellVecData::CellVecData | ( | const CellVecData & | rAnotherCellVecData | ) |
Copy constructor used to perform a deep copy of rAnotherCellVecData
rAnotherCellVecData | the class to copy |
Definition at line 43 of file CellVecData.cpp.
References GetItem(), GetKeys(), and mCellVecData.
CellVecData::CellVecData | ( | const std::map< std::string, Vec > & | rCellVecDataMap | ) |
Constructor required for serialisation. Avoid using otherwise.
rCellVecDataMap | the internal map which needs to be copied |
Definition at line 61 of file CellVecData.cpp.
|
virtual |
We need the empty virtual destructor in this class to ensure Boost serialization works correctly with static libraries.
Definition at line 67 of file CellVecData.cpp.
References PetscTools::Destroy(), mCellVecData, and mFreeVecs.
Vec CellVecData::GetItem | ( | const std::string & | rVariableName | ) | const |
rVariableName | the index of the data required. throws if rVariableName has not been stored |
Definition at line 84 of file CellVecData.cpp.
References EXCEPTION, and mCellVecData.
Referenced by CellVecData().
std::vector< std::string > CellVecData::GetKeys | ( | ) | const |
According to STL these are sorted in lexicographical/alphabetic order (so that the ordering here is predictable).
Definition at line 105 of file CellVecData.cpp.
References mCellVecData.
Referenced by CellVecData().
unsigned CellVecData::GetNumItems | ( | ) | const |
Definition at line 100 of file CellVecData.cpp.
References mCellVecData.
|
inlineprivate |
Archive the member variables.
archive | the archive |
version | the current version of this class |
Definition at line 85 of file CellVecData.hpp.
void CellVecData::SetItem | ( | const std::string & | rVariableName, |
Vec | data | ||
) |
This assigns the cell data.
rVariableName | the name of the data to be set. |
data | the value to set it to. |
Definition at line 79 of file CellVecData.cpp.
References mCellVecData.
|
friend |
Needed for serialization.
Definition at line 77 of file CellVecData.hpp.
|
private |
The cell data.
Definition at line 69 of file CellVecData.hpp.
Referenced by CellVecData(), GetItem(), GetKeys(), GetNumItems(), SetItem(), and ~CellVecData().
|
private |
Whether to free in the destructor the Vec stored in the map
Definition at line 74 of file CellVecData.hpp.
Referenced by ~CellVecData().