#include <UniformRectilinearMesh.h>
Classes | |
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 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 ConstantFunction | CellVolumesEngineTag_t |
Support for the cellVolumes() function. | |
typedef ConstantFunction | FaceAreasEngineTag_t |
Support for the faceAreas() function. | |
typedef ConstantFunction | EdgeLengthsEngineTag_t |
Support for the edgeLengths() function. | |
Public Member Functions | |
UniformRectilinearMesh () | |
We supply a default constructor, but it doesn't generate a useful mesh. | |
template<class Layout > | |
UniformRectilinearMesh (const Layout &layout, const PointType_t &origin, const PointType_t &spacings) | |
This constructor fully constructs the object. | |
template<class Layout > | |
UniformRectilinearMesh (const Layout &layout) | |
UniformRectilinearMesh (const UniformRectilinearMesh< Dim, T > &model) | |
Copy constructor. | |
UniformRectilinearMesh< Dim, T > & | operator= (const UniformRectilinearMesh< Dim, T > &rhs) |
Copy assignment operator. | |
~UniformRectilinearMesh () | |
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_t, CellVolumesEngineTag_t > &e, const Centering< Dim > &c) const |
void | initializeFaceAreas (Engine< Dim, T_t, FaceAreasEngineTag_t > &e, const Centering< Dim > &c) const |
void | initializeEdgeLengths (Engine< Dim, T_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. | |
UniformRectilinearMesh (const UniformRectilinearMesh< Dim, T > &model, const Interval< Dim > &d) | |
Interval view. | |
UniformRectilinearMesh (const UniformRectilinearMesh< Dim, T > &model, const INode< Dim > &i) | |
INode view. | |
UniformRectilinearMesh (const UniformRectilinearMesh< 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 Vector< Dim, T > & | spacings () const |
The mesh spacing. | |
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. |
This spacing can be different in each coordinate direction.
typedef Vector<Dim, T> UniformRectilinearMesh< Dim, T >::PointType_t |
The type of mesh points.
typedef Vector<Dim, T> UniformRectilinearMesh< Dim, T >::VectorType_t |
The type of vectors used to represent, for example, normals.
typedef T UniformRectilinearMesh< Dim, T >::T_t |
The type T, used to represent, for example, volumes & areas, etc.
typedef IndexFunction<PositionsFunctor> UniformRectilinearMesh< Dim, T >::PositionsEngineTag_t |
typedef ConstantFunction UniformRectilinearMesh< 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.
typedef ConstantFunction UniformRectilinearMesh< 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.
typedef ConstantFunction UniformRectilinearMesh< 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.
typedef ConstantFunction UniformRectilinearMesh< 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.
anonymous enum |
UniformRectilinearMesh< Dim, T >::UniformRectilinearMesh | ( | ) | [inline] |
We supply a default constructor, but it doesn't generate a useful mesh.
This is accomplished through assignment.
UniformRectilinearMesh< Dim, T >::UniformRectilinearMesh | ( | const Layout & | layout, | |
const PointType_t & | origin, | |||
const PointType_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.
UniformRectilinearMesh< Dim, T >::UniformRectilinearMesh | ( | const Layout & | layout | ) | [inline] |
UniformRectilinearMesh< Dim, T >::UniformRectilinearMesh | ( | const UniformRectilinearMesh< Dim, T > & | model | ) | [inline] |
Copy constructor.
UniformRectilinearMesh< Dim, T >::UniformRectilinearMesh | ( | const UniformRectilinearMesh< Dim, T > & | model, | |
const Interval< Dim > & | d | |||
) | [inline] |
UniformRectilinearMesh< Dim, T >::UniformRectilinearMesh | ( | const UniformRectilinearMesh< Dim, T > & | model, | |
const INode< Dim > & | i | |||
) | [inline] |
UniformRectilinearMesh< Dim, T >::UniformRectilinearMesh | ( | const UniformRectilinearMesh< Dim, T > & | model, | |
const FieldEnginePatch< Dim > & | p | |||
) | [inline] |
FieldEnginePatch view.
The FieldEnginePatch supplied must refer to VERTEX positions.
UniformRectilinearMesh< Dim, T >::~UniformRectilinearMesh | ( | ) | [inline] |
Empty destructor is fine.
The pointer to the data is ref-counted so its lifetime is correctly managed.
UniformRectilinearMesh<Dim, T>& UniformRectilinearMesh< Dim, T >::operator= | ( | const UniformRectilinearMesh< Dim, T > & | rhs | ) | [inline] |
Copy assignment operator.
const Interval<Dim>& UniformRectilinearMesh< Dim, T >::physicalVertexDomain | ( | ) | const [inline] |
The vertex domain, as the mesh was constructed with.
const Interval<Dim>& UniformRectilinearMesh< Dim, T >::physicalCellDomain | ( | ) | const [inline] |
Function that returns a domain adjusted to give the indices of the cells.
Referenced by UniformRectilinearMesh< Dim, T >::PositionsFunctor::PositionsFunctor(), and UniformRectilinearMesh< Dim, T >::vertexPosition().
const Interval<Dim>& UniformRectilinearMesh< Dim, T >::totalVertexDomain | ( | ) | const [inline] |
The total vertex domain, including mesh guard vertices.
const Interval<Dim>& UniformRectilinearMesh< Dim, T >::totalCellDomain | ( | ) | const [inline] |
The total cell domain, including mesh guard cells.
const Vector<Dim, T>& UniformRectilinearMesh< Dim, T >::spacings | ( | ) | const [inline] |
The mesh spacing.
Referenced by UniformRectilinearMesh< Dim, T >::cellContaining(), and UniformRectilinearMesh< Dim, T >::vertexPosition().
const Vector<Dim, T>& UniformRectilinearMesh< Dim, T >::origin | ( | ) | const [inline] |
The mesh origin.
Referenced by UniformRectilinearMesh< Dim, T >::cellContaining(), and UniformRectilinearMesh< Dim, T >::vertexPosition().
Loc<Dim> UniformRectilinearMesh< Dim, T >::cellContaining | ( | const Vector< Dim, T > & | point | ) | const [inline] |
The cell containing a particular point.
References UniformRectilinearMesh< Dim, T >::origin(), and UniformRectilinearMesh< Dim, T >::spacings().
Vector<Dim, T> UniformRectilinearMesh< Dim, T >::vertexPosition | ( | const Loc< Dim > & | loc | ) | const [inline] |
The lower-left vertex associated with a given cell location.
References UniformRectilinearMesh< Dim, T >::origin(), UniformRectilinearMesh< Dim, T >::physicalCellDomain(), and UniformRectilinearMesh< Dim, T >::spacings().
void UniformRectilinearMesh< Dim, T >::initializePositions | ( | Engine< Dim, PointType_t, PositionsEngineTag_t > & | e, | |
const Centering< Dim > & | c | |||
) | const [inline] |
void UniformRectilinearMesh< Dim, T >::initializeNormals | ( | Engine< Dim, VectorType_t, NormalsEngineTag_t > & | e, | |
const Centering< Dim > & | c, | |||
bool | outward = true | |||
) | const [inline] |
void UniformRectilinearMesh< Dim, T >::initializeCellVolumes | ( | Engine< Dim, T_t, CellVolumesEngineTag_t > & | e, | |
const Centering< Dim > & | c | |||
) | const [inline] |
References CellType, Centering< Dim >::centeringType(), PAssert, and Centering< Dim >::size().
void UniformRectilinearMesh< Dim, T >::initializeFaceAreas | ( | Engine< Dim, T_t, FaceAreasEngineTag_t > & | e, | |
const Centering< Dim > & | c | |||
) | const [inline] |
References Centering< Dim >::centeringType(), FaceType, PAssert, and Centering< Dim >::size().
void UniformRectilinearMesh< Dim, T >::initializeEdgeLengths | ( | Engine< Dim, T_t, EdgeLengthsEngineTag_t > & | e, | |
const Centering< Dim > & | c | |||
) | const [inline] |
References Centering< Dim >::centeringType(), EdgeType, PAssert, and Centering< Dim >::size().