Merge pull request #720 from blattms/add-facetag-access-2
Adds a free function to UgGridHelpers to access the face tag.
This commit is contained in:
commit
f7bd6076e6
@ -63,6 +63,12 @@ double faceArea(const UnstructuredGrid& grid, int face_index)
|
||||
return grid.face_areas[face_index];
|
||||
}
|
||||
|
||||
int faceTag(const UnstructuredGrid& grid,
|
||||
boost::iterator_range<const int*>::const_iterator face)
|
||||
{
|
||||
return grid.cell_facetag[face-cell2Faces(grid)[0].begin()];
|
||||
}
|
||||
|
||||
SparseTableView cell2Faces(const UnstructuredGrid& grid)
|
||||
{
|
||||
return SparseTableView(grid.cell_faces, grid.cell_facepos, numCells(grid));
|
||||
|
@ -181,6 +181,12 @@ const double* faceNormal(const UnstructuredGrid& grid, int face_index);
|
||||
/// \param face_index The index of the face in the grid.
|
||||
double faceArea(const UnstructuredGrid& grid, int face_index);
|
||||
|
||||
/// \brief Get Eclipse Cartesian tag of a face
|
||||
/// \param grid The grid that the face is part of.
|
||||
/// \param cell_face The face attached to a cell as obtained from cell2Faces()
|
||||
/// \return 0, 1, 2, 3, 4, 5 for I-, I+, J-, J+, K-, K+
|
||||
int faceTag(const UnstructuredGrid& grid, boost::iterator_range<const int*>::const_iterator cell_face);
|
||||
|
||||
/// \brief Maps the grid type to the associated type of the cell to faces mapping.
|
||||
///
|
||||
/// Provides a type named Type.
|
||||
|
Loading…
Reference in New Issue
Block a user