Cylindrical2dNodesOnlyMesh Class Reference

#include <Cylindrical2dNodesOnlyMesh.hpp>

Inherits NodesOnlyMesh< 2 >.

Collaboration diagram for Cylindrical2dNodesOnlyMesh:

List of all members.

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

Detailed Description

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.


Constructor & Destructor Documentation

Cylindrical2dNodesOnlyMesh::Cylindrical2dNodesOnlyMesh ( double  width  ) 

Constructor.

Parameters:
width the width of the mesh (circumference)

Definition at line 39 of file Cylindrical2dNodesOnlyMesh.cpp.


Member Function Documentation

unsigned Cylindrical2dNodesOnlyMesh::AddNode ( Node< 2 > *  pNewNode  ) 

Overridden AddNode() method.

Parameters:
pNewNode pointer to the new node
Returns:
index of 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.

Parameters:
rLocation1 the x and y co-ordinates of point 1
rLocation2 the x and y co-ordinates of point 2
Returns:
the vector from location1 to location2

Definition at line 105 of file Cylindrical2dNodesOnlyMesh.cpp.

References mWidth.

double Cylindrical2dNodesOnlyMesh::GetWidth ( const unsigned rDimension  )  const [virtual]

Overridden GetWidth() method.

Calculate the 'width' of any dimension of the mesh, taking periodicity into account.

Parameters:
rDimension a dimension (0 or 1)
Returns:
The maximum distance between any nodes in this dimension.

Reimplemented from NodesOnlyMesh< 2 >.

Definition at line 53 of file Cylindrical2dNodesOnlyMesh.cpp.

References mWidth.

template<class Archive >
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).

Parameters:
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.

Parameters:
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

Parameters:
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().


Friends And Related Function Documentation

friend class boost::serialization::access [friend]

Needed for serialization.

Reimplemented from NodesOnlyMesh< 2 >.

Definition at line 63 of file Cylindrical2dNodesOnlyMesh.hpp.


Member Data Documentation

The periodic width of the domain

Definition at line 58 of file Cylindrical2dNodesOnlyMesh.hpp.

Referenced by GetVectorFromAtoB(), GetWidth(), serialize(), and SetNode().


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

Generated by  doxygen 1.6.2