#include <RectilinearMesh.h>
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_t & | spacings () const |
The mesh spacing. | |
const SpacingsType_t & | positions () 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. |
Each dimension has a spacing value between every pair of vertices along that dimension; these spacings can all be different.
typedef Vector<Dim, T> RectilinearMesh< Dim, T >::PointType_t |
The type of mesh points.
typedef Vector<Dim, T> RectilinearMesh< Dim, T >::VectorType_t |
The type of vectors used to represent, for example, normals.
typedef Array<1, T> RectilinearMesh< Dim, T >::SpacingsType_t[Dim] |
The type used to store spacings.
typedef T RectilinearMesh< Dim, T >::T_t |
The type T, used to represent, for example, volumes & areas, etc.
typedef IndexFunction<PositionsFunctor> RectilinearMesh< Dim, T >::PositionsEngineTag_t |
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.
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.
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.
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.
anonymous enum |
RectilinearMesh< Dim, T >::RectilinearMesh | ( | ) | [inline] |
We supply a default constructor, but it doesn't generate a useful mesh.
This is accomplished through assignment.
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.
RectilinearMesh< Dim, T >::RectilinearMesh | ( | const Layout & | layout, | |
const PointType_t & | origin, | |||
const PointType_t & | spacings | |||
) | [inline] |
Constructor compatible to UniformRectilinearMesh.
RectilinearMesh< Dim, T >::RectilinearMesh | ( | const Layout & | layout | ) | [inline] |
RectilinearMesh< Dim, T >::RectilinearMesh | ( | const RectilinearMesh< Dim, T > & | model | ) | [inline] |
Copy constructor.
RectilinearMesh< Dim, T >::RectilinearMesh | ( | const RectilinearMesh< Dim, T > & | model, | |
const Interval< Dim > & | d | |||
) | [inline] |
RectilinearMesh< Dim, T >::RectilinearMesh | ( | const RectilinearMesh< Dim, T > & | model, | |
const INode< Dim > & | i | |||
) | [inline] |
RectilinearMesh< Dim, T >::RectilinearMesh | ( | const RectilinearMesh< Dim, T > & | model, | |
const FieldEnginePatch< Dim > & | p | |||
) | [inline] |
FieldEnginePatch view.
The FieldEnginePatch supplied must refer to VERTEX positions.
RectilinearMesh< Dim, T >::~RectilinearMesh | ( | ) | [inline] |
Empty destructor is fine.
The pointer to the data is ref-counted so its lifetime is correctly managed.
RectilinearMesh<Dim, T>& RectilinearMesh< Dim, T >::operator= | ( | const RectilinearMesh< Dim, T > & | rhs | ) | [inline] |
Copy assignment operator.
const Interval<Dim>& RectilinearMesh< Dim, T >::physicalVertexDomain | ( | ) | const [inline] |
The vertex domain, as the mesh was constructed with.
const Interval<Dim>& RectilinearMesh< Dim, T >::physicalCellDomain | ( | ) | const [inline] |
Function that returns a domain adjusted to give the indices of the cells.
const Interval<Dim>& RectilinearMesh< Dim, T >::totalVertexDomain | ( | ) | const [inline] |
The total vertex domain, including mesh guard vertices.
const Interval<Dim>& RectilinearMesh< Dim, T >::totalCellDomain | ( | ) | const [inline] |
The total cell domain, including mesh guard cells.
const SpacingsType_t& RectilinearMesh< Dim, T >::spacings | ( | ) | const [inline] |
The mesh spacing.
Referenced by RectilinearMesh< Dim, T >::GeneralVolumesFunctor::GeneralVolumesFunctor(), and RectilinearMesh< Dim, T >::PositionsFunctor::PositionsFunctor().
const SpacingsType_t& RectilinearMesh< Dim, T >::positions | ( | ) | const [inline] |
The mesh positions.
Referenced by RectilinearMesh< Dim, T >::cellContaining(), RectilinearMesh< Dim, T >::PositionsFunctor::PositionsFunctor(), and RectilinearMesh< Dim, T >::vertexPosition().
const Vector<Dim, T>& RectilinearMesh< Dim, T >::origin | ( | ) | const [inline] |
The mesh origin.
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().
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().
void RectilinearMesh< Dim, T >::initializePositions | ( | Engine< Dim, PointType_t, PositionsEngineTag_t > & | e, | |
const Centering< Dim > & | c | |||
) | const [inline] |
void RectilinearMesh< Dim, T >::initializeNormals | ( | Engine< Dim, VectorType_t, NormalsEngineTag_t > & | e, | |
const Centering< Dim > & | c, | |||
bool | outward = true | |||
) | const [inline] |
void RectilinearMesh< Dim, T >::initializeCellVolumes | ( | Engine< Dim, T, CellVolumesEngineTag_t > & | e, | |
const Centering< Dim > & | c | |||
) | const [inline] |
References CellType, Centering< Dim >::centeringType(), PAssert, and Centering< Dim >::size().
void RectilinearMesh< Dim, T >::initializeFaceAreas | ( | Engine< Dim, T, FaceAreasEngineTag_t > & | e, | |
const Centering< Dim > & | c | |||
) | const [inline] |
References Centering< Dim >::centeringType(), FaceType, PAssert, and Centering< Dim >::size().
void RectilinearMesh< Dim, T >::initializeEdgeLengths | ( | Engine< Dim, T, EdgeLengthsEngineTag_t > & | e, | |
const Centering< Dim > & | c | |||
) | const [inline] |
References Centering< Dim >::centeringType(), EdgeType, PAssert, and Centering< Dim >::size().