RectilinearMesh< Dim, T > Class Template Reference

RectilinearMesh is a rectilinear mesh sometimes called a "cartesian product" or "tensor product" mesh. More...

#include <RectilinearMesh.h>

Collaboration diagram for RectilinearMesh< Dim, T >:

Collaboration graph
[legend]

List of all members.

Classes

class  GeneralVolumesFunctor
 General "volume" functor: works for edges, faces and cells. More...
class  PositionsFunctor
 Support for the positions() function. More...

Public Types

enum  { dimensions = Dim }
 The number of indices required to select a point in this mesh. More...
typedef Vector< Dim, T > PointType_t
 The type of mesh points.
typedef Vector< Dim, T > VectorType_t
 The type of vectors used to represent, for example, normals.
typedef Array< 1, T > SpacingsType_t [Dim]
 The type used to store spacings.
typedef T T_t
 The type T, used to represent, for example, volumes & areas, etc.
typedef IndexFunction
< PositionsFunctor
PositionsEngineTag_t
typedef ConstantFunction NormalsEngineTag_t
 Support for the outwardNormals() and coordinateNormals() functions.
typedef IndexFunction
< GeneralVolumesFunctor
CellVolumesEngineTag_t
 Support for the cellVolumes() function.
typedef IndexFunction
< GeneralVolumesFunctor
FaceAreasEngineTag_t
 Support for the faceAreas() function.
typedef IndexFunction
< GeneralVolumesFunctor
EdgeLengthsEngineTag_t
 Support for the edgeLengths() function.

Public Member Functions

 RectilinearMesh ()
 We supply a default constructor, but it doesn't generate a useful mesh.
template<class Layout >
 RectilinearMesh (const Layout &layout, const PointType_t &origin, const SpacingsType_t &spacings)
 This constructor fully constructs the object.
template<class Layout >
 RectilinearMesh (const Layout &layout, const PointType_t &origin, const PointType_t &spacings)
 Constructor compatible to UniformRectilinearMesh.
template<class Layout >
 RectilinearMesh (const Layout &layout)
 RectilinearMesh (const RectilinearMesh< Dim, T > &model)
 Copy constructor.
RectilinearMesh< Dim, T > & operator= (const RectilinearMesh< Dim, T > &rhs)
 Copy assignment operator.
 ~RectilinearMesh ()
 Empty destructor is fine.
void initializePositions (Engine< Dim, PointType_t, PositionsEngineTag_t > &e, const Centering< Dim > &c) const
void initializeNormals (Engine< Dim, VectorType_t, NormalsEngineTag_t > &e, const Centering< Dim > &c, bool outward=true) const
void initializeCellVolumes (Engine< Dim, T, CellVolumesEngineTag_t > &e, const Centering< Dim > &c) const
void initializeFaceAreas (Engine< Dim, T, FaceAreasEngineTag_t > &e, const Centering< Dim > &c) const
void initializeEdgeLengths (Engine< Dim, T, EdgeLengthsEngineTag_t > &e, const Centering< Dim > &c) const
View constructors
These are the only possible views of this mesh.

Other views will make a NoMesh.

 RectilinearMesh (const RectilinearMesh< Dim, T > &model, const Interval< Dim > &d)
 Interval view.
 RectilinearMesh (const RectilinearMesh< Dim, T > &model, const INode< Dim > &i)
 INode view.
 RectilinearMesh (const RectilinearMesh< Dim, T > &model, const FieldEnginePatch< Dim > &p)
 FieldEnginePatch view.
Domain functions.
const Interval< Dim > & physicalVertexDomain () const
 The vertex domain, as the mesh was constructed with.
const Interval< Dim > & physicalCellDomain () const
 Function that returns a domain adjusted to give the indices of the cells.
const Interval< Dim > & totalVertexDomain () const
 The total vertex domain, including mesh guard vertices.
const Interval< Dim > & totalCellDomain () const
 The total cell domain, including mesh guard cells.
General accessors.
const SpacingsType_tspacings () const
 The mesh spacing.
const SpacingsType_tpositions () const
 The mesh positions.
const Vector< Dim, T > & origin () const
 The mesh origin.
Loc< Dim > cellContaining (const Vector< Dim, T > &point) const
 The cell containing a particular point.
Vector< Dim, T > vertexPosition (const Loc< Dim > &loc) const
 The lower-left vertex associated with a given cell location.


Detailed Description

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
class RectilinearMesh< Dim, T >

RectilinearMesh is a rectilinear mesh sometimes called a "cartesian product" or "tensor product" mesh.

Each dimension has a spacing value between every pair of vertices along that dimension; these spacings can all be different.


Member Typedef Documentation

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef Vector<Dim, T> RectilinearMesh< Dim, T >::PointType_t

The type of mesh points.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef Vector<Dim, T> RectilinearMesh< Dim, T >::VectorType_t

The type of vectors used to represent, for example, normals.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef Array<1, T> RectilinearMesh< Dim, T >::SpacingsType_t[Dim]

The type used to store spacings.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef T RectilinearMesh< Dim, T >::T_t

The type T, used to represent, for example, volumes & areas, etc.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef IndexFunction<PositionsFunctor> RectilinearMesh< Dim, T >::PositionsEngineTag_t

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef ConstantFunction RectilinearMesh< Dim, T >::NormalsEngineTag_t

Support for the outwardNormals() and coordinateNormals() functions.

We also need to export the NormalsEngineTag_t typedef and the initializeNormals() member function, which sets the appropriate constant value (since the normals exactly align with the coordinate axes). The boolean value passed is true if we are asking for outward normals, as opposed to coordinate normals. The indices passed in refer to cells.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef IndexFunction<GeneralVolumesFunctor> RectilinearMesh< Dim, T >::CellVolumesEngineTag_t

Support for the cellVolumes() function.

We also need to export the CellVolumesEngineTag_t typedef and the initializeCellVolumes() member function, which sets the appropriate constant value for the volume. The indices passed in refer to cells.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef IndexFunction<GeneralVolumesFunctor> RectilinearMesh< Dim, T >::FaceAreasEngineTag_t

Support for the faceAreas() function.

We also need to export the FaceAreasEngineTag_t typedef and the initializeFaceAreas() member function, which sets the appropriate constant face area value. The indices passed in refer to cells.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
typedef IndexFunction<GeneralVolumesFunctor> RectilinearMesh< Dim, T >::EdgeLengthsEngineTag_t

Support for the edgeLengths() function.

We also need to export the EdgeLengthsEngineTag_t typedef and the initializeEdgeLengths() member function, which sets the appropriate constant edge length value. The indices passed in refer to cells.


Member Enumeration Documentation

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
anonymous enum

The number of indices required to select a point in this mesh.

Enumerator:
dimensions 


Constructor & Destructor Documentation

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
RectilinearMesh< Dim, T >::RectilinearMesh (  )  [inline]

We supply a default constructor, but it doesn't generate a useful mesh.

This is accomplished through assignment.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
template<class Layout >
RectilinearMesh< Dim, T >::RectilinearMesh ( const Layout &  layout,
const PointType_t origin,
const SpacingsType_t spacings 
) [inline]

This constructor fully constructs the object.

It uses the layout to compute domains and also initializes the origin and the spacings in each coordinate direction.

The Layout supplied must refer to VERTEX positions.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
template<class Layout >
RectilinearMesh< Dim, T >::RectilinearMesh ( const Layout &  layout,
const PointType_t origin,
const PointType_t spacings 
) [inline]

Constructor compatible to UniformRectilinearMesh.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
template<class Layout >
RectilinearMesh< Dim, T >::RectilinearMesh ( const Layout &  layout  )  [inline]

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
RectilinearMesh< Dim, T >::RectilinearMesh ( const RectilinearMesh< Dim, T > &  model  )  [inline]

Copy constructor.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
RectilinearMesh< Dim, T >::RectilinearMesh ( const RectilinearMesh< Dim, T > &  model,
const Interval< Dim > &  d 
) [inline]

Interval view.

The Interval supplied must refer to VERTEX positions.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
RectilinearMesh< Dim, T >::RectilinearMesh ( const RectilinearMesh< Dim, T > &  model,
const INode< Dim > &  i 
) [inline]

INode view.

The INode supplied must refer to VERTEX positions.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
RectilinearMesh< Dim, T >::RectilinearMesh ( const RectilinearMesh< Dim, T > &  model,
const FieldEnginePatch< Dim > &  p 
) [inline]

FieldEnginePatch view.

The FieldEnginePatch supplied must refer to VERTEX positions.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
RectilinearMesh< Dim, T >::~RectilinearMesh (  )  [inline]

Empty destructor is fine.

The pointer to the data is ref-counted so its lifetime is correctly managed.


Member Function Documentation

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
RectilinearMesh<Dim, T>& RectilinearMesh< Dim, T >::operator= ( const RectilinearMesh< Dim, T > &  rhs  )  [inline]

Copy assignment operator.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
const Interval<Dim>& RectilinearMesh< Dim, T >::physicalVertexDomain (  )  const [inline]

The vertex domain, as the mesh was constructed with.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
const Interval<Dim>& RectilinearMesh< Dim, T >::physicalCellDomain (  )  const [inline]

Function that returns a domain adjusted to give the indices of the cells.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
const Interval<Dim>& RectilinearMesh< Dim, T >::totalVertexDomain (  )  const [inline]

The total vertex domain, including mesh guard vertices.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
const Interval<Dim>& RectilinearMesh< Dim, T >::totalCellDomain (  )  const [inline]

The total cell domain, including mesh guard cells.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
const SpacingsType_t& RectilinearMesh< Dim, T >::spacings (  )  const [inline]

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
const SpacingsType_t& RectilinearMesh< Dim, T >::positions (  )  const [inline]

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
const Vector<Dim, T>& RectilinearMesh< Dim, T >::origin (  )  const [inline]

The mesh origin.

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
Loc<Dim> RectilinearMesh< Dim, T >::cellContaining ( const Vector< Dim, T > &  point  )  const [inline]

The cell containing a particular point.

FIXME

References PInsist, and RectilinearMesh< Dim, T >::positions().

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
Vector<Dim, T> RectilinearMesh< Dim, T >::vertexPosition ( const Loc< Dim > &  loc  )  const [inline]

The lower-left vertex associated with a given cell location.

References RectilinearMesh< Dim, T >::positions().

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
void RectilinearMesh< Dim, T >::initializePositions ( Engine< Dim, PointType_t, PositionsEngineTag_t > &  e,
const Centering< Dim > &  c 
) const [inline]

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
void RectilinearMesh< Dim, T >::initializeNormals ( Engine< Dim, VectorType_t, NormalsEngineTag_t > &  e,
const Centering< Dim > &  c,
bool  outward = true 
) const [inline]

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
void RectilinearMesh< Dim, T >::initializeCellVolumes ( Engine< Dim, T, CellVolumesEngineTag_t > &  e,
const Centering< Dim > &  c 
) const [inline]

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
void RectilinearMesh< Dim, T >::initializeFaceAreas ( Engine< Dim, T, FaceAreasEngineTag_t > &  e,
const Centering< Dim > &  c 
) const [inline]

template<int Dim, class T = POOMA_DEFAULT_POSITION_TYPE>
void RectilinearMesh< Dim, T >::initializeEdgeLengths ( Engine< Dim, T, EdgeLengthsEngineTag_t > &  e,
const Centering< Dim > &  c 
) const [inline]


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

Generated on Wed Mar 16 06:20:28 2011 for FreePOOMA by  doxygen 1.5.9