Sundance::PartitionedRectangleMesher Class Reference

Inheritance diagram for Sundance::PartitionedRectangleMesher:

Sundance::MeshSourceBase Playa::Handleable< MeshSourceBase > Playa::Printable Sundance::Noncopyable 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, int verbosity=0, const MPIComm &comm=MPIComm::world())
 PartitionedRectangleMesher (double ax, double bx, int nx, double ay, double by, int ny, const MeshType &meshType, int verbosity=0, const MPIComm &comm=MPIComm::world())
 PartitionedRectangleMesher (const ParameterList &params)
virtual ~PartitionedRectangleMesher ()
virtual std::string description () const
virtual RCP< MeshSourceBasegetRcp ()

Static Public Member Functions

static void balanceXY (int n, int *npx, int *npy)

Protected Member Functions

virtual Mesh fillMesh () const

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,
int  verbosity = 0,
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.

Sundance::PartitionedRectangleMesher::PartitionedRectangleMesher ( double  ax,
double  bx,
int  nx,
double  ay,
double  by,
int  ny,
const MeshType meshType,
int  verbosity = 0,
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 balance() function is used to choose npx and npy.

Definition at line 80 of file SundancePartitionedRectangleMesher.hpp.

References balanceXY(), Sundance::MeshSourceBase::comm(), Playa::MPIComm::getNProc(), npx_, and npy_.

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 98 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(), and PartitionedRectangleMesher().

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

Print a short descriptive std::string

Reimplemented from Sundance::MeshSourceBase.

Definition at line 101 of file SundancePartitionedRectangleMesher.hpp.

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

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

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

Return a ref count pointer to self

Implements Playa::Handleable< MeshSourceBase >.

Definition at line 116 of file SundancePartitionedRectangleMesher.hpp.


Member Data Documentation

Definition at line 128 of file SundancePartitionedRectangleMesher.hpp.

Referenced by description(), and fillMesh().

Definition at line 137 of file SundancePartitionedRectangleMesher.hpp.

Referenced by description(), and fillMesh().

Definition at line 130 of file SundancePartitionedRectangleMesher.hpp.

Referenced by description(), and fillMesh().

Definition at line 139 of file SundancePartitionedRectangleMesher.hpp.

Referenced by description(), and fillMesh().

Definition at line 134 of file SundancePartitionedRectangleMesher.hpp.

Referenced by fillMesh(), and PartitionedRectangleMesher().

Definition at line 143 of file SundancePartitionedRectangleMesher.hpp.

Referenced by fillMesh(), and PartitionedRectangleMesher().

Definition at line 132 of file SundancePartitionedRectangleMesher.hpp.

Referenced by description(), and fillMesh().

Definition at line 141 of file SundancePartitionedRectangleMesher.hpp.

Referenced by description(), and fillMesh().

Site Contact