CEPS
24.01
Cardiac ElectroPhysiology Simulator
|
An abstract class for objects that regroup pointers to cells (eg a mesh, a finite elements discretization, a finite volume discretization)
Definition at line 45 of file HoldsCells.hpp.
#include <HoldsCells.hpp>
Public Member Functions | |
HoldsCells (const CepsVector< CellType * > &cells) | |
Constructor with a vector of cells. More... | |
HoldsCells (CellType **cells, const CepsUInt &n) | |
Constructor with a vector of cells. More... | |
HoldsCells ()=default | |
Default constructor. More... | |
HoldsCells (const HoldsCells &)=default | |
Copy constructor. More... | |
HoldsCells (HoldsCells &&) noexcept=default | |
Copy constructor. More... | |
virtual | ~HoldsCells ()=default |
Destructor. More... | |
HoldsCells & | operator= (const HoldsCells &)=default |
Assignment operator. More... | |
HoldsCells & | operator= (HoldsCells &&) noexcept=default |
Assignment operator. More... | |
CepsUInt | getNumberOfCells () const |
Returns the number of cells in the object. More... | |
CepsUInt | countValidCells () |
Get the number of cells that are not nullptr. More... | |
CepsVector< CellType * > | getValidCells () |
Reference to the valid cells. More... | |
CepsVector< CellType * > & | getCells () |
Reference to the cells. More... | |
const CepsVector< CellType * > & | getCells () const |
Reference to the cells, const version. More... | |
CellType *& | getCellAt (const CepsUInt &i) |
Pointer to the i-th cell. More... | |
const CellType *& | getCellAt (const CepsUInt &i) const |
Pointer to the i-th cell , const version. More... | |
void | setCells (const CepsVector< CellType * > &cells) |
Replaces currently held cell pointers. More... | |
void | setCells (CellType **cells, const CepsUInt &n) |
Replaces currently held cell pointers. More... | |
template<class _It > | |
void | setCells (_It first, _It last) |
Replaces currently held cell pointers. More... | |
void | setCellAt (const CepsUInt &i, CellType *neigh) |
Set a cell pointer in the vector of currently held cells, at given index. More... | |
void | addCell (CellType *&name) |
Adds a cell to the list. More... | |
void | addCells (const CepsVector< CellType * > &cells) |
Adds several cells to the list. More... | |
void | addCells (CellType **cells, const CepsUInt &n) |
Adds several cells to the list. More... | |
template<class _It > | |
void | addCells (_It first, _It last) |
Adds several cells to the list. More... | |
void | removeCell (CellType *&name) |
Removes a given cell pointer from the list. More... | |
void | removeCells (const CepsVector< CellType * > &cells) |
Removes several cell pointers from the list. More... | |
void | removeCells (CellType **cells, const CepsUInt &n) |
Removes several cell pointers from the list. More... | |
template<class _It > | |
void | removeCells (_It first, _It last) |
Removes several cell pointers from the list. More... | |
void | clearCells () |
Wipes the current list of cell pointers. More... | |
CepsBool | hasCell (CellType *&neigh) |
Tells if object has the cell given in argument. More... | |
CepsBool | hasAllCells (const CepsVector< CellType * > &cells) |
Tells if object has all cells given in argument. More... | |
CepsBool | hasAllCells (CellType **cells, const CepsUInt &n) |
Tells if object has all cells given in argument. More... | |
template<class _It > | |
CepsBool | hasAllCells (_It first, _It last) |
Tells if object has all cells given in argument. More... | |
CepsBool | hasOneOfCells (const CepsVector< CellType * > &cells) |
Tells if object has one of the cells given in argument. More... | |
CepsBool | hasOneOfCells (CellType **cells, const CepsUInt &n) |
Tells if object has one of the cells given in argument. More... | |
template<class _It > | |
CepsBool | hasOneOfCells (_It first, _It last) |
Tells if object has one of the cells given in argument. More... | |
CepsIndex | getCellIndex (CepsUInt i) const |
Get the index of i-th cell. More... | |
CepsVector< CepsIndex > | getCellsIndices () const |
Get indices of all cells. More... | |
void | reset () |
Equivalent to HoldsCells::clearCells. More... | |
Protected Member Functions | |
void | errorOnCellIndex (CepsUInt i, const CepsString &funcName) const |
Aborts if object holds less than i cells. More... | |
Protected Attributes | |
CepsVector< CellType * > | m_cells |
The cell pointers. More... | |
|
explicit |
Constructor with a vector of cells.
ceps::HoldsCells< CellType >::HoldsCells | ( | CellType ** | cells, |
const CepsUInt & | n | ||
) |
Constructor with a vector of cells.
|
default |
Default constructor.
|
default |
Copy constructor.
|
defaultnoexcept |
Copy constructor.
|
virtualdefault |
Destructor.
void ceps::HoldsCells< CellType >::addCell | ( | CellType *& | name | ) |
Adds a cell to the list.
void ceps::HoldsCells< CellType >::addCells | ( | _It | first, |
_It | last | ||
) |
Adds several cells to the list.
void ceps::HoldsCells< CellType >::addCells | ( | CellType ** | cells, |
const CepsUInt & | n | ||
) |
Adds several cells to the list.
void ceps::HoldsCells< CellType >::addCells | ( | const CepsVector< CellType * > & | cells | ) |
Adds several cells to the list.
void ceps::HoldsCells< CellType >::clearCells | ( | ) |
Wipes the current list of cell pointers.
CepsUInt ceps::HoldsCells< CellType >::countValidCells | ( | ) |
Get the number of cells that are not nullptr.
|
protected |
Aborts if object holds less than i cells.
CellType*& ceps::HoldsCells< CellType >::getCellAt | ( | const CepsUInt & | i | ) |
Pointer to the i-th cell.
const CellType*& ceps::HoldsCells< CellType >::getCellAt | ( | const CepsUInt & | i | ) | const |
Pointer to the i-th cell , const version.
CepsIndex ceps::HoldsCells< CellType >::getCellIndex | ( | CepsUInt | i | ) | const |
Get the index of i-th cell.
CepsVector<CellType*>& ceps::HoldsCells< CellType >::getCells | ( | ) |
Reference to the cells.
const CepsVector<CellType*>& ceps::HoldsCells< CellType >::getCells | ( | ) | const |
Reference to the cells, const version.
CepsVector<CepsIndex> ceps::HoldsCells< CellType >::getCellsIndices | ( | ) | const |
Get indices of all cells.
CepsUInt ceps::HoldsCells< CellType >::getNumberOfCells | ( | ) | const |
Returns the number of cells in the object.
CepsVector<CellType*> ceps::HoldsCells< CellType >::getValidCells | ( | ) |
Reference to the valid cells.
CepsBool ceps::HoldsCells< CellType >::hasAllCells | ( | _It | first, |
_It | last | ||
) |
Tells if object has all cells given in argument.
CepsBool ceps::HoldsCells< CellType >::hasAllCells | ( | CellType ** | cells, |
const CepsUInt & | n | ||
) |
Tells if object has all cells given in argument.
CepsBool ceps::HoldsCells< CellType >::hasAllCells | ( | const CepsVector< CellType * > & | cells | ) |
Tells if object has all cells given in argument.
CepsBool ceps::HoldsCells< CellType >::hasCell | ( | CellType *& | neigh | ) |
Tells if object has the cell given in argument.
CepsBool ceps::HoldsCells< CellType >::hasOneOfCells | ( | _It | first, |
_It | last | ||
) |
Tells if object has one of the cells given in argument.
CepsBool ceps::HoldsCells< CellType >::hasOneOfCells | ( | CellType ** | cells, |
const CepsUInt & | n | ||
) |
Tells if object has one of the cells given in argument.
CepsBool ceps::HoldsCells< CellType >::hasOneOfCells | ( | const CepsVector< CellType * > & | cells | ) |
Tells if object has one of the cells given in argument.
|
default |
Assignment operator.
|
defaultnoexcept |
Assignment operator.
void ceps::HoldsCells< CellType >::removeCell | ( | CellType *& | name | ) |
Removes a given cell pointer from the list.
void ceps::HoldsCells< CellType >::removeCells | ( | _It | first, |
_It | last | ||
) |
Removes several cell pointers from the list.
void ceps::HoldsCells< CellType >::removeCells | ( | CellType ** | cells, |
const CepsUInt & | n | ||
) |
Removes several cell pointers from the list.
void ceps::HoldsCells< CellType >::removeCells | ( | const CepsVector< CellType * > & | cells | ) |
Removes several cell pointers from the list.
void ceps::HoldsCells< CellType >::reset | ( | ) |
Equivalent to HoldsCells::clearCells.
void ceps::HoldsCells< CellType >::setCellAt | ( | const CepsUInt & | i, |
CellType * | neigh | ||
) |
Set a cell pointer in the vector of currently held cells, at given index.
If the index is larger than the current size of vector, the vector is filled with nullptrs until the given index.
void ceps::HoldsCells< CellType >::setCells | ( | _It | first, |
_It | last | ||
) |
Replaces currently held cell pointers.
void ceps::HoldsCells< CellType >::setCells | ( | CellType ** | cells, |
const CepsUInt & | n | ||
) |
Replaces currently held cell pointers.
void ceps::HoldsCells< CellType >::setCells | ( | const CepsVector< CellType * > & | cells | ) |
Replaces currently held cell pointers.
|
protected |
The cell pointers.
Definition at line 215 of file HoldsCells.hpp.