VPTissue Reference Manual
SimPT_Sim::MeshState Class Reference

Contains the state of the whole Mesh at a given simulation step. More...

#include <MeshState.h>

Collaboration diagram for SimPT_Sim::MeshState:
Collaboration graph

Public Member Functions

 MeshState ()
 Creates a meshstate that represents an empty mesh with no nodes / cells / walls.
 
void PrintToStream (std::ostream &out) const
 Prints a textual representation of this MeshState to output stream. More...
 
Nodes

Methods for handling nodes in the mesh.

Note that the collective node operations assume the passed/retrieved containers to be ordered by node index and NOT by node ID!

size_t GetNumNodes () const
 Returns the number of nodes in the mesh.
 
void SetNumNodes (size_t n)
 Sets the number of nodes in the mesh. More...
 
int GetNodeID (size_t node_idx) const
 Returns the ID of a particular node.
 
double GetNodeX (size_t node_idx) const
 Returns the x coordinate of a particular node.
 
double GetNodeY (size_t node_idx) const
 Returns the y coordinate of a particular node.
 
std::vector< int > GetNodesID () const
 Returns the IDs of all nodes.
 
std::vector< double > GetNodesX () const
 Returns the x coordinates of all nodes.
 
std::vector< double > GetNodesY () const
 Returns the y coordinates of all nodes.
 
AttributeContainerNodeAttributeContainer ()
 Adds a new named attribute of type T for the nodes.
 
const AttributeContainerNodeAttributeContainer () const
 Adds a new named attribute of type T for the nodes.
 
void SetNodeID (size_t node_idx, int value)
 Sets the ID of a particular node.
 
void SetNodeX (size_t node_idx, double value)
 Sets the x coordinate of a particular node.
 
void SetNodeY (size_t node_idx, double value)
 Sets the y coordinate of a particular node.
 
void SetNodesID (std::vector< int > values)
 Sets the IDs of all nodes.
 
void SetNodesX (std::vector< double > values)
 Sets the x coordinates of all nodes.
 
void SetNodesY (std::vector< double > values)
 Sets the y coordinates of all nodes.
 
Cells

Methods for handling cells in the mesh.

Note that the collective cell operations assume the passed/retrieved containers to be ordered by cell index and NOT by cell ID!

size_t GetNumCells () const
 Returns the number of cells in the mesh.
 
void SetNumCells (size_t n)
 Sets the number of cells in the mesh. More...
 
AttributeContainerCellAttributeContainer ()
 Adds a new named attribute of type T for the nodes.
 
const AttributeContainerCellAttributeContainer () const
 Adds a new named attribute of type T for the nodes.
 
int GetCellID (size_t cell_idx) const
 Returns the ID of a particular cell.
 
size_t GetCellNumNodes (size_t cell_idx) const
 Returns the number of nodes that define the polygon of a particular cell.
 
std::vector< int > GetCellNodes (size_t cell_idx) const
 Returns the IDs of the nodes that form the polygon of a particular cell.
 
size_t GetCellNumWalls (size_t cell_idx) const
 Returns the number of walls of a particular cell.
 
std::vector< int > GetCellWalls (size_t cell_idx) const
 Returns the IDs of walls of a particular cell.
 
void SetCellID (size_t cell_idx, int value)
 Sets the ID of a particular cell.
 
void SetCellNodes (size_t cell_idx, std::vector< int > node_ids)
 Sets the IDs of the nodes that form the polygon of a particular cell.
 
void SetCellWalls (size_t cell_idx, std::vector< int > wall_ids)
 Sets the IDs of walls of a particular cell.
 
std::vector< int > GetCellsID () const
 Returns the IDs of all cells.
 
std::vector< size_t > GetCellsNumNodes () const
 Returns the number of nodes for all cells.
 
std::vector< size_t > GetCellsNumWalls () const
 Returns the number of walls for all cells.
 
void SetCellsID (std::vector< int > values)
 Sets the IDs of all cells.
 
std::vector< int > GetBoundaryPolygonNodes () const
 Returns the IDs of the nodes that form the boundary polygon of the tissue.
 
std::vector< int > GetBoundaryPolygonWalls () const
 Returns the IDs of the walls that form the boundary polygon of the tissue.
 
void SetBoundaryPolygonNodes (std::vector< int > node_ids)
 Sets the IDs of the nodes that form the boundary polygon of the tissue.
 
void SetBoundaryPolygonWalls (std::vector< int > wall_ids)
 Sets the IDs of the walls that form the boundary polygon of the tissue.
 
Walls

Methods for handling walls in the mesh.

size_t GetNumWalls () const
 Returns the number of walls in the mesh.
 
void SetNumWalls (size_t n)
 Sets the number of walls in the mesh. More...
 
AttributeContainerWallAttributeContainer ()
 Adds a new named attribute of type T for the nodes.
 
const AttributeContainerWallAttributeContainer () const
 Adds a new named attribute of type T for the nodes.
 
int GetWallID (size_t wall_idx) const
 Returns the ID of a particular wall.
 
std::pair< int, int > GetWallNodes (size_t wall_idx) const
 
std::pair< int, int > GetWallCells (size_t wall_idx) const
 
void SetWallID (size_t wall_idx, int value)
 Sets the ID of a particular wall.
 
void SetWallNodes (size_t wall_idx, std::pair< int, int > nodes_ids)
 
void SetWallCells (size_t wall_idx, std::pair< int, int > cells_ids)
 
std::vector< int > GetWallsID () const
 Returns the IDs of all walls.
 
void SetWallsID (std::vector< int > values)
 Sets the IDs of all walls.
 

Detailed Description

Contains the state of the whole Mesh at a given simulation step.

This class is mainly supposed to be a data object to pass around mesh state information for saving and loading.

Definition at line 41 of file MeshState.h.

Member Function Documentation

void SimPT_Sim::MeshState::PrintToStream ( std::ostream &  out) const

Prints a textual representation of this MeshState to output stream.

Parameters
[in,out]outThe ouput stream to use for printing.
Note
This method is mainly used for debug purposes.

Definition at line 303 of file MeshState.cpp.

Referenced by SimPT_Sim::SimState::PrintToStream().

Here is the caller graph for this function:

void SimPT_Sim::MeshState::SetNumCells ( size_t  n)

Sets the number of cells in the mesh.

This method must be called with the requested number of cells prior to setting any cell properties since it preallocates space for all cell related props.

Definition at line 136 of file MeshState.cpp.

Referenced by SimPT_Sim::Mesh::GetState().

Here is the caller graph for this function:

void SimPT_Sim::MeshState::SetNumNodes ( size_t  n)

Sets the number of nodes in the mesh.

This method must be called with the requested number of nodes prior to setting any node properties since it preallocates space for all node related props.

Definition at line 45 of file MeshState.cpp.

Referenced by SimPT_Sim::Mesh::GetState().

Here is the caller graph for this function:

void SimPT_Sim::MeshState::SetNumWalls ( size_t  n)

Sets the number of walls in the mesh.

This method must be called with the requested number of walls prior to setting any wall properties since it preallocates space for all wall related props.

Definition at line 249 of file MeshState.cpp.

Referenced by SimPT_Sim::Mesh::GetState().

Here is the caller graph for this function:


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