7#include "Kokkos_Sort.hpp"
351#ifdef NF_WITH_MPI_SUPPORT
Represents boundaries of an unstructured mesh.
A class representing a dictionary that stores key-value pairs.
Represents an unstructured mesh in NeoN.
const labelVector & faceOwners() const
Get the list of labels of face owner cells.
Dictionary & stencilDB() const
Get the stencil data base.
vectorVector & cellCenters()
const scalarVector & cellVolumes() const
Get the field of cell volumes in the mesh.
UnstructuredMesh(vectorVector points, scalarVector cellVolumes, vectorVector cellCenters, vectorVector faceNormals, vectorVector faceCenters, scalarVector faceAreas, labelVector faceOwners, labelVector faceNeighbors, BoundaryMesh boundaryMesh)
Constructor for the UnstructuredMesh class.
UnstructuredMesh(Executor exec, vectorVector points, scalarVector cellVolumes, vectorVector cellCenters, vectorVector faceNormals, vectorVector faceCenters, scalarVector faceAreas, labelVector faceOwners, labelVector faceNeighbors, BoundaryMesh boundaryMesh)
Constructor for the UnstructuredMesh class.
const vectorVector & faceNormals() const
Get the field of face normal vectors.
vectorVector & faceNormals()
labelVector & faceNeighbors()
const labelVector & faceNeighbors() const
Get the list of labels of face neighbor cells.
sizeType nProcBoundaryFaces() const
Get the number of processor-boundary faces (inter-rank faces).
const vectorVector & faceCenters() const
Get the field of face centers.
sizeType nBoundaries() const
Get the number of boundaries patches in the mesh.
const scalarVector & faceAreas() const
Get the field of face areas.
const vectorVector & cellCenters() const
Get the field of cell centers in the mesh.
const Executor & exec() const
Get the executor.
sizeType nBoundaryFaces() const
Get the number of boundary faces in the mesh.
localIdx globalOffset() const
the offset local cellIds for the global mesh.
scalarVector & cellVolumes()
sizeType nCells() const
Get the number of cells in the mesh.
vectorVector & faceCenters()
sizeType nTotalFaces() const
Get the total number of faces including boundary and processor faces in the mesh.
BoundaryMesh & boundaryMesh()
scalarVector & faceAreas()
labelVector & faceOwners()
const BoundaryMesh & boundaryMesh() const
Get the boundary mesh.
const vectorVector & points() const
Get the field of mesh points.
sizeType nInternalFaces() const
Get the number of internal faces in the mesh.
Integer types used throughout NeoN.
UnstructuredMesh create1DUniformMesh(const Executor exec, const localIdx nCells, scalar lx=1.0)
A factory function for a 1D uniform mesh.
std::variant< SerialExecutor, CPUExecutor, GPUExecutor > Executor
UnstructuredMesh createSingleCellMesh(const Executor exec)
creates a mesh containing only a single cell @warn currently this is only a 2D mesh
NeoN::Vector< Vec3 > vectorVector
UnstructuredMesh create2DUniformMesh(const Executor exec, localIdx nx, localIdx ny, scalar lx=1.0, scalar ly=1.0)
A factory function for a 2D uniform mesh (single-layer hex slab).
UnstructuredMesh create3DUniformMesh(const Executor exec, localIdx nx, localIdx ny, localIdx nz, scalar lx=1.0, scalar ly=1.0, scalar lz=1.0)
A factory function for a uniform 3D hex mesh.
NeoN::Vector< scalar > scalarVector
NeoN::Vector< label > labelVector