#include <Cylindrical2dNodesOnlyMesh.hpp>
Inherits NodesOnlyMesh< 2 >.
Public Member Functions | |
Cylindrical2dNodesOnlyMesh (double width) | |
virtual void | SetUpBoxCollection (double cutOffLength, c_vector< double, 2 *2 > domainSize, int numLocalRows=PETSC_DECIDE, bool isPeriodic=true) |
c_vector< double, 2 > | GetVectorFromAtoB (const c_vector< double, 2 > &rLocation1, const c_vector< double, 2 > &rLocation2) |
double | GetWidth (const unsigned &rDimension) const |
void | SetNode (unsigned nodeIndex, ChastePoint< 2 > point, bool concreteMove=false) |
unsigned | AddNode (Node< 2 > *pNewNode) |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Private Attributes | |
double | mWidth |
Friends | |
class | TestCylindrical2dNodesOnlyMesh |
class | boost::serialization::access |
A subclass of NodesOnlyMesh<2> for a rectangular mesh with periodic left and right boundaries, representing a cylindrical geometry.
The class works by overriding calls such as ReMesh() and GetVectorFromAtoB() so that simulation classes can treat this class in exactly the same way as a NodesOnlyMesh<2>.
Definition at line 52 of file Cylindrical2dNodesOnlyMesh.hpp.
Cylindrical2dNodesOnlyMesh::Cylindrical2dNodesOnlyMesh | ( | double | width | ) |
Constructor.
width | the width of the mesh (circumference) |
Definition at line 39 of file Cylindrical2dNodesOnlyMesh.cpp.
Overridden AddNode() method.
pNewNode | pointer to the new node |
Definition at line 92 of file Cylindrical2dNodesOnlyMesh.cpp.
References Node< SPACE_DIM >::GetPoint(), and SetNode().
c_vector< double, 2 > Cylindrical2dNodesOnlyMesh::GetVectorFromAtoB | ( | const c_vector< double, 2 > & | rLocation1, | |
const c_vector< double, 2 > & | rLocation2 | |||
) |
Overridden GetVectorFromAtoB() method.
Evaluates the (surface) distance between two points in a 2D cylindrical geometry.
rLocation1 | the x and y co-ordinates of point 1 | |
rLocation2 | the x and y co-ordinates of point 2 |
Definition at line 105 of file Cylindrical2dNodesOnlyMesh.cpp.
References mWidth.
Overridden GetWidth() method.
Calculate the 'width' of any dimension of the mesh, taking periodicity into account.
rDimension | a dimension (0 or 1) |
Reimplemented from NodesOnlyMesh< 2 >.
Definition at line 53 of file Cylindrical2dNodesOnlyMesh.cpp.
References mWidth.
void Cylindrical2dNodesOnlyMesh::serialize | ( | Archive & | archive, | |
const unsigned int | version | |||
) | [inline, private] |
Archives the member variables of the object which have to be preserved during its lifetime.
Note that we must archive any member variables FIRST so that this method can call a ReMesh (to convert from TrianglesMeshReader input format into our native format).
archive | the archive | |
version | the current version of this class |
Reimplemented from NodesOnlyMesh< 2 >.
Definition at line 76 of file Cylindrical2dNodesOnlyMesh.hpp.
References mWidth.
void Cylindrical2dNodesOnlyMesh::SetNode | ( | unsigned | nodeIndex, | |
ChastePoint< 2 > | point, | |||
bool | concreteMove = false | |||
) |
Overridden SetNode() method.
If the location should be set outside a cylindrical boundary move it back onto the cylinder.
nodeIndex | is the index of the node to be moved | |
point | is the new target location of the node | |
concreteMove | is set to false if we want to skip the signed area tests in the parent Class Note this should always be false here |
Definition at line 69 of file Cylindrical2dNodesOnlyMesh.cpp.
References AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), mWidth, ChastePoint< DIM >::rGetLocation(), and ChastePoint< DIM >::SetCoordinate().
Referenced by AddNode().
void Cylindrical2dNodesOnlyMesh::SetUpBoxCollection | ( | double | cutOffLength, | |
c_vector< double, 2 *2 > | domainSize, | |||
int | numLocalRows = PETSC_DECIDE , |
|||
bool | isPeriodic = true | |||
) | [virtual] |
Set up the box collection
cutOffLength | the cut off length for node neighbours | |
domainSize | the size of the domain containing the nodes. | |
numLocalRows | the number of rows of the collection that this process should own. | |
isPeriodic | whether the box collection should be periodic. Defaults to true. |
Definition at line 46 of file Cylindrical2dNodesOnlyMesh.cpp.
References NodesOnlyMesh< 2 >::AddNodesToBoxes().
friend class boost::serialization::access [friend] |
Needed for serialization.
Reimplemented from NodesOnlyMesh< 2 >.
Definition at line 63 of file Cylindrical2dNodesOnlyMesh.hpp.
double Cylindrical2dNodesOnlyMesh::mWidth [private] |
The periodic width of the domain
Definition at line 58 of file Cylindrical2dNodesOnlyMesh.hpp.
Referenced by GetVectorFromAtoB(), GetWidth(), serialize(), and SetNode().