Sundance::PartitionedRectangleMesher Class Reference

PartitionedRectangleMesher meshes the rectangle $ \left[a_x, b_x\right] \otimes \left[a_y, b_y\right] $ with $ n_x \otimes n_y $ elements per processor. More...

Inheritance diagram for Sundance::PartitionedRectangleMesher:

Sundance::MeshSourceBase Playa::Handleable< MeshSourceBase > Playa::Printable Sundance::Noncopyable Sundance::ObjectWithClassVerbosity< MeshSourceBase > Playa::ObjectWithVerbosity

List of all members.

Public Member Functions

 PartitionedRectangleMesher (double ax, double bx, int nx, int npx, double ay, double by, int ny, int npy, const MeshType &meshType, const MPIComm &comm=MPIComm::world())
 Set up meshing of the rectangle $ \left[a_x, b_x\right] \otimes \left[a_y, b_y\right] $ with $ n_x \otimes n_y $ elements per processor.
 PartitionedRectangleMesher (const ParameterList &params)
 Create a rectangle mesher from a ParameterList.
virtual ~PartitionedRectangleMesher ()
virtual std::string description () const
 Print a short descriptive std::string.
virtual RCP< MeshSourceBasegetRcp ()
 Return a ref count pointer to self.

Static Public Member Functions

static void balanceXY (int n, int *npx, int *npy)
 Find a nearly equal balance between X and Y partitions.

Protected Member Functions

virtual Mesh fillMesh () const
 Fill a mesh object with data from the source.

Private Attributes

double ax_
double bx_
int nx_
int npx_
double ay_
double by_
int ny_
int npy_


Detailed Description

PartitionedRectangleMesher meshes the rectangle $ \left[a_x, b_x\right] \otimes \left[a_y, b_y\right] $ with $ n_x \otimes n_y $ elements per processor.

The rectangle is partitioned among processors, with $np_x$ equal sized subdomains in the $x$ direction and $np_y$ in the $y$ direction.

Definition at line 52 of file SundancePartitionedRectangleMesher.hpp.


Constructor & Destructor Documentation

Sundance::PartitionedRectangleMesher::PartitionedRectangleMesher ( double  ax,
double  bx,
int  nx,
int  npx,
double  ay,
double  by,
int  ny,
int  npy,
const MeshType meshType,
const MPIComm comm = MPIComm::world() 
) [inline]

Set up meshing of the rectangle $ \left[a_x, b_x\right] \otimes \left[a_y, b_y\right] $ with $ n_x \otimes n_y $ elements per processor.

The rectangle is partitioned among processors, with $np_x$ equal sized subdomains in the $x$ direction and $np_y$ in the $y$ direction.

Definition at line 64 of file SundancePartitionedRectangleMesher.hpp.

PartitionedRectangleMesher::PartitionedRectangleMesher ( const ParameterList &  params  ) 

Create a rectangle mesher from a ParameterList.

Definition at line 10 of file SundancePartitionedRectangleMesher.cpp.

References npx_, and npy_.

virtual Sundance::PartitionedRectangleMesher::~PartitionedRectangleMesher (  )  [inline, virtual]

Definition at line 78 of file SundancePartitionedRectangleMesher.hpp.


Member Function Documentation

void PartitionedRectangleMesher::balanceXY ( int  n,
int *  npx,
int *  npy 
) [static]

Find a nearly equal balance between X and Y partitions.

Definition at line 32 of file SundancePartitionedRectangleMesher.cpp.

Referenced by Sundance::RectangleDomain::init().

virtual std::string Sundance::PartitionedRectangleMesher::description (  )  const [inline, virtual]

Print a short descriptive std::string.

Reimplemented from Sundance::MeshSourceBase.

Definition at line 81 of file SundancePartitionedRectangleMesher.hpp.

References ax_, ay_, bx_, by_, nx_, ny_, and Sundance::toString().

Mesh PartitionedRectangleMesher::fillMesh (  )  const [protected, virtual]

Fill a mesh object with data from the source.

Subclass implementors will need to provide a fillMesh() for their subclass. Implementors should use the createMesh() method for the allocation of the new mesh.

Implements Sundance::MeshSourceBase.

Definition at line 50 of file SundancePartitionedRectangleMesher.cpp.

References Sundance::Mesh::addElement(), Sundance::Mesh::addVertex(), ax_, ay_, bx_, by_, Sundance::MeshSourceBase::createMesh(), Sundance::MeshSourceBase::myRank(), Sundance::MeshSourceBase::nProc(), npx_, npy_, nx_, ny_, SUNDANCE_OUT, and Playa::ObjectWithVerbosity::verb().

virtual RCP<MeshSourceBase> Sundance::PartitionedRectangleMesher::getRcp (  )  [inline, virtual]

Return a ref count pointer to self.

Implements Playa::Handleable< MeshSourceBase >.

Definition at line 96 of file SundancePartitionedRectangleMesher.hpp.


Member Data Documentation

Definition at line 108 of file SundancePartitionedRectangleMesher.hpp.

Referenced by description(), and fillMesh().

Definition at line 117 of file SundancePartitionedRectangleMesher.hpp.

Referenced by description(), and fillMesh().

Definition at line 110 of file SundancePartitionedRectangleMesher.hpp.

Referenced by description(), and fillMesh().

Definition at line 119 of file SundancePartitionedRectangleMesher.hpp.

Referenced by description(), and fillMesh().

Definition at line 114 of file SundancePartitionedRectangleMesher.hpp.

Referenced by fillMesh(), and PartitionedRectangleMesher().

Definition at line 123 of file SundancePartitionedRectangleMesher.hpp.

Referenced by fillMesh(), and PartitionedRectangleMesher().

Definition at line 112 of file SundancePartitionedRectangleMesher.hpp.

Referenced by description(), and fillMesh().

Definition at line 121 of file SundancePartitionedRectangleMesher.hpp.

Referenced by description(), and fillMesh().

Site Contact