Added method to access face normals.

This commit is contained in:
Markus Blatt
2014-02-25 14:59:53 +01:00
parent 842667eab2
commit a0253e8e0f
2 changed files with 11 additions and 0 deletions

View File

@@ -53,6 +53,11 @@ const double* faceCentroid(const UnstructuredGrid& grid, int face_index)
return grid.face_centroids+face_index*grid.dimensions;
}
const double* faceNormal(const UnstructuredGrid& grid, int face_index)
{
return grid.face_normals+face_index*grid.dimensions;
}
SparseTableView cell2Faces(const UnstructuredGrid& grid)
{
return SparseTableView(grid.cell_faces, grid.cell_facepos, numCells(grid));

View File

@@ -134,6 +134,12 @@ const double* beginFaceCentroids(const UnstructuredGrid& grid);
/// \breif coordinate The coordinate index.
const double* faceCentroid(const UnstructuredGrid& grid, int face_index);
/// \brief Get the normal of a face.
/// \param grid The grid that the face is part of.
/// \param face_index The index of the face in the grid.
const double* faceNormal(const UnstructuredGrid& grid, int face_index);
/// \brief Maps the grid type to the associated type of the cell to faces mapping.
///
/// Provides a type named Type.