VPTissue Reference Manual
SimPT_Sim::Mesh Class Reference

Structure of cells; key data structure. More...

#include <Mesh.h>

Collaboration diagram for SimPT_Sim::Mesh:
Collaboration graph

Public Member Functions

 Mesh (unsigned int num_chemicals)
 Constructs empty Mesh.
 
void AddNodeToCell (Cell *c, Node *n, Node *nb1, Node *nb2)
 Add node to cell between existing neighbor nodes.
 
CellBuildBoundaryPolygon (const std::vector< unsigned int > &node_ids)
 
CellBuildCell ()
 
CellBuildCell (const std::vector< unsigned int > &node_ids)
 
CellBuildCell (unsigned int id, const std::vector< unsigned int > &node_ids)
 
NodeBuildNode (const std::array< double, 3 > &vec, bool at_boundary)
 
NodeBuildNode (unsigned int id, const std::array< double, 3 > &vec, bool at_boundary)
 
WallBuildWall (Node *n1, Node *n2, Cell *c1, Cell *c2)
 
WallBuildWall (unsigned int id, Node *n1, Node *n2, Cell *c1, Cell *c2)
 
void ConstructNeighborList (Cell *cell)
 Constructs neighbor list by looping over walls and registering adjoining cell for that wall, and then eliminating all instances of boundary polygon. More...
 
void Derivatives (double *derivs)
 Constructs neighbor list by looping over walls and registering. More...
 
CellFindEdgeNeighbor (Cell *cell, Edge edge) const
 Find the neighbor to this cell with respect to the given edge. More...
 
WallFindWall (const Edge &edge) const
 Find the wall including the edge.
 
CellGetBoundaryPolygon () const
 Get the boundary polygon of the mesh.
 
const std::vector< Cell * > & GetCells () const
 The cells of this mesh, EXCLUDING the boundary polygon.
 
std::vector< Cell * > & GetCells ()
 The cells of this mesh, EXCLUDING the boundary polygon.
 
std::vector< NeighborNodesGetEdgeOwners (const Edge &edge) const
 Find the intersecting neighbors of the end points of the edge. More...
 
std::list< Cell * > const & GetNeighbors (Cell *c) const
 Get the adjacent cells to the given cell (i.e. sharing a wall).
 
std::list< Cell * > & GetNeighbors (Cell *c)
 Get the adjacent cells to the given cell (i.e. sharing a wall).
 
std::list< NeighborNodes > & GetNodeOwningNeighbors (Node *n)
 Get the neighbors associated with this node.
 
const std::list< NeighborNodes > & GetNodeOwningNeighbors (Node *n) const
 Get the neighbors associated with this node.
 
std::list< Wall * > & GetNodeOwningWalls (Node *n)
 The walls that contain the given node somewhere on the wall.
 
const std::list< Wall * > & GetNodeOwningWalls (Node *n) const
 The walls that contain the given node somewhere on the wall.
 
const std::vector< Node * > & GetNodes () const
 The nodes of the mesh.
 
std::vector< Node * > & GetNodes ()
 The nodes of the mesh.
 
unsigned int GetNumChemicals () const
 
MeshState GetState () const
 The current state of the mesh as a self-contained object.
 
void getValues (double *values)
 Used for interacting with ODE-solvers. More...
 
const std::vector< Wall * > & GetWalls () const
 The walls of this mesh.
 
std::vector< Wall * > & GetWalls ()
 The walls of this mesh.
 
bool IsAtBoundary (const Edge *e) const
 True iff the edge is on the mesh boundary.
 
bool IsAtBoundary (Wall *w) const
 True iff one of cells owning the wall is the boundary polygon.
 
bool IsInBoundaryPolygon (Node *n) const
 True iff the node is one of the nodes of the boundary polygon.
 
std::ostream & Print (std::ostream &os) const
 Solely for debugging purposes.
 
void RemoveFromNeighborList (Cell *cell)
 Removes the cell from the neighbor list (only do this when deleting this cell).
 
void RemoveNodeFromOwnerLists (Node *node)
 Removes the node from the 'node owning neighbors' and 'node owning walls' lists. More...
 
void setValues (double x, double *y)
 Used for interacting with ODE-solvers.
 
boost::property_tree::ptree ToPtree () const
 Convert the mesh to a ptree.
 
void UpdateNodeOwningNeighbors (Cell *cell)
 Set ownerships of node <-> cell or update them after cell division.
 
void UpdateNodeOwningWalls (Wall *wall)
 Set ownerships of node <-> cell or update them after cell division. More...
 

Friends

class CBMBuilder
 
class MeshCheck
 
class SimPT_Editor::EditableMesh
 

Detailed Description

Structure of cells; key data structure.

The mesh consists of nodes, walls and cells. For more information, see Node.h, Wall.h and Cell.h. There are some structures provided (that must be kept consistent) to increase efficiency.

  • A boundary polygon that contains the boundary of the whole cell complex is being kept.
  • For every cell, their neighbor cells are provided (see Mesh::GetNeighbors).
  • For every node, their neighbors are provided (see Mesh::GetNodeOwningNeighbors). For more information about neighbors, see Neighbor.h.
  • For every node, the wall to which the node belongs are provided (see Mesh::NodeOwningWalls). This information is updated by Mesh::UpdateNodeOwningWalls.

Definition at line 62 of file Mesh.h.

Member Function Documentation

void SimPT_Sim::Mesh::ConstructNeighborList ( Cell cell)

Constructs neighbor list by looping over walls and registering adjoining cell for that wall, and then eliminating all instances of boundary polygon.

Definition at line 252 of file Mesh.cpp.

References SimPT_Sim::Cell::GetWalls().

Here is the call graph for this function:

void SimPT_Sim::Mesh::Derivatives ( double *  derivs)

Constructs neighbor list by looping over walls and registering.

Calculate derivatives of all variables to pass to ODESolver.

Cell * SimPT_Sim::Mesh::FindEdgeNeighbor ( Cell cell,
Edge  edge 
) const

Find the neighbor to this cell with respect to the given edge.

This neighbor can be the boundary polygon.

Definition at line 267 of file Mesh.cpp.

References SimPT_Sim::NeighborNodes::GetCell(), SimPT_Sim::Edge::GetFirst(), SimPT_Sim::Cell::GetIndex(), GetNodeOwningNeighbors(), SimPT_Sim::Edge::GetSecond(), SimPT_Sim::Container::make_const_circular(), and SimPT_Sim::Container::next().

Here is the call graph for this function:

vector< NeighborNodes > SimPT_Sim::Mesh::GetEdgeOwners ( const Edge edge) const

Find the intersecting neighbors of the end points of the edge.

Every edge has two neighbor cells, so there will be four of neighbors (two for every end point).

Definition at line 455 of file Mesh.cpp.

References SimPT_Sim::NeighborNodes::GetCell(), SimPT_Sim::Edge::GetFirst(), SimPT_Sim::Cell::GetIndex(), GetNodeOwningNeighbors(), and SimPT_Sim::Edge::GetSecond().

Referenced by SimPT_Sim::MeshCheck::CheckEdgeOwners(), and FindWall().

Here is the call graph for this function:

Here is the caller graph for this function:

void SimPT_Sim::Mesh::getValues ( double *  values)

Used for interacting with ODE-solvers.

See also
void Mesh::UpdateNodeOwningWalls(Wall *wall);
void SimPT_Sim::Mesh::RemoveNodeFromOwnerLists ( Node node)

Removes the node from the 'node owning neighbors' and 'node owning walls' lists.

Only do this when deleting this node.

Definition at line 763 of file Mesh.cpp.

void SimPT_Sim::Mesh::UpdateNodeOwningWalls ( Wall wall)

Set ownerships of node <-> cell or update them after cell division.

Sets and/or corrects the list of node owning walls of the nodes on this wall. Completely corrects the node owning walls of the nodes in between of the end points. Removes wrong entries and adds this wall in the node owning wall list of the end points of the wall. (So if another wall isn't contained in the list of node owning walls of an end point, it won't be added)

Definition at line 829 of file Mesh.cpp.

References SimPT_Sim::Cell::GetNodes(), and SimPT_Sim::Container::make_circular().

Here is the call graph for this function:


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