1 #ifndef MESHSTATE_H_INCLUDED
2 #define MESHSTATE_H_INCLUDED
31 #include <boost/property_tree/ptree.hpp>
75 double GetNodeX(
size_t node_idx)
const;
80 double GetNodeY(
size_t node_idx)
const;
116 void SetNodeID(
size_t node_idx,
int value);
121 void SetNodeX(
size_t node_idx,
double value);
126 void SetNodeY(
size_t node_idx,
double value);
136 void SetNodesX(std::vector<double> values);
141 void SetNodesY(std::vector<double> values);
207 void SetCellID(
size_t cell_idx,
int value);
212 void SetCellNodes(
size_t cell_idx, std::vector<int> node_ids);
217 void SetCellWalls(
size_t cell_idx, std::vector<int> wall_ids);
300 std::pair<int, int> GetWallNodes(
size_t wall_idx)
const;
305 std::pair<int, int> GetWallCells(
size_t wall_idx)
const;
310 void SetWallID(
size_t wall_idx,
int value);
315 void SetWallNodes(
size_t wall_idx, std::pair<int, int> nodes_ids);
320 void SetWallCells(
size_t wall_idx, std::pair<int, int> cells_ids);
343 std::vector<int> m_nodes_id;
344 std::vector<double> m_nodes_x;
345 std::vector<double> m_nodes_y;
350 std::vector<int> m_cells_id;
351 std::vector< std::vector<int> > m_cells_nodes;
352 std::vector< std::vector<int> > m_cells_walls;
353 std::vector<int> m_boundary_polygon_nodes;
354 std::vector<int> m_boundary_polygon_walls;
359 std::vector<int> m_walls_id;
360 std::vector<std::pair<int, int> > m_walls_cells;
361 std::vector<std::pair<int, int> > m_walls_nodes;
367 #endif // include guard
void SetNodeY(size_t node_idx, double value)
Sets the y coordinate of a particular node.
double GetNodeY(size_t node_idx) const
Returns the y coordinate of a particular node.
void SetCellsID(std::vector< int > values)
Sets the IDs of all cells.
int GetWallID(size_t wall_idx) const
Returns the ID of a particular wall.
std::vector< double > GetNodesY() const
Returns the y coordinates of all nodes.
const AttributeContainer & NodeAttributeContainer() const
Adds a new named attribute of type T for the nodes.
size_t GetNumCells() const
Returns the number of cells in the mesh.
void PrintToStream(std::ostream &out) const
Prints a textual representation of this MeshState to output stream.
size_t GetCellNumWalls(size_t cell_idx) const
Returns the number of walls of a particular cell.
void SetWallsID(std::vector< int > values)
Sets the IDs of all walls.
size_t GetCellNumNodes(size_t cell_idx) const
Returns the number of nodes that define the polygon of a particular cell.
double GetNodeX(size_t node_idx) const
Returns the x coordinate of a particular node.
int GetCellID(size_t cell_idx) const
Returns the ID of a particular cell.
std::vector< int > GetWallsID() const
Returns the IDs of all walls.
const AttributeContainer & WallAttributeContainer() const
Adds a new named attribute of type T for the nodes.
std::vector< double > GetNodesX() const
Returns the x coordinates of all nodes.
void SetBoundaryPolygonWalls(std::vector< int > wall_ids)
Sets the IDs of the walls that form the boundary polygon of the tissue.
void SetWallID(size_t wall_idx, int value)
Sets the ID of a particular wall.
void SetNodeID(size_t node_idx, int value)
Sets the ID of a particular node.
Namespace for the core simulator.
void SetCellID(size_t cell_idx, int value)
Sets the ID of a particular cell.
std::vector< size_t > GetCellsNumNodes() const
Returns the number of nodes for all cells.
std::vector< int > GetCellNodes(size_t cell_idx) const
Returns the IDs of the nodes that form the polygon of a particular cell.
void SetNumNodes(size_t n)
Sets the number of nodes in the mesh.
void SetNumWalls(size_t n)
Sets the number of walls in the mesh.
AttributeContainer & WallAttributeContainer()
Adds a new named attribute of type T for the nodes.
AttributeContainer & NodeAttributeContainer()
Adds a new named attribute of type T for the nodes.
std::vector< int > GetCellsID() const
Returns the IDs of all cells.
std::vector< size_t > GetCellsNumWalls() const
Returns the number of walls for all cells.
void SetNumCells(size_t n)
Sets the number of cells in the mesh.
MeshState()
Creates a meshstate that represents an empty mesh with no nodes / cells / walls.
int GetNodeID(size_t node_idx) const
Returns the ID of a particular node.
Interface of AttributeContainer.
std::vector< int > GetBoundaryPolygonWalls() const
Returns the IDs of the walls that form the boundary polygon of the tissue.
Contains the state of the whole Mesh at a given simulation step.
void SetNodesID(std::vector< int > values)
Sets the IDs of all nodes.
std::vector< int > GetBoundaryPolygonNodes() const
Returns the IDs of the nodes that form the boundary polygon of the tissue.
AttributeContainer & CellAttributeContainer()
Adds a new named attribute of type T for the nodes.
void SetNodeX(size_t node_idx, double value)
Sets the x coordinate of a particular node.
size_t GetNumNodes() const
Returns the number of nodes in the mesh.
void SetNodesY(std::vector< double > values)
Sets the y coordinates of all nodes.
void SetNodesX(std::vector< double > values)
Sets the x coordinates of all nodes.
std::vector< int > GetCellWalls(size_t cell_idx) const
Returns the IDs of walls of a particular cell.
void SetBoundaryPolygonNodes(std::vector< int > node_ids)
Sets the IDs of the nodes that form the boundary polygon of the tissue.
void SetCellWalls(size_t cell_idx, std::vector< int > wall_ids)
Sets the IDs of walls of a particular cell.
size_t GetNumWalls() const
Returns the number of walls in the mesh.
const AttributeContainer & CellAttributeContainer() const
Adds a new named attribute of type T for the nodes.
std::vector< int > GetNodesID() const
Returns the IDs of all nodes.
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.