7#include "Kokkos_Sort.hpp"
348#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.
localIdx nProcBoundaryFaces() const
Get the number of processor-boundary faces (inter-rank faces).
const labelVector & faceOwners() const
Get the list of labels of face owner cells.
Dictionary & stencilDB() const
Get the stencil data base.
localIdx nCells() const
Get the number of cells in the mesh.
vectorVector & cellCenters()
const scalarVector & cellVolumes() const
Get the field of cell volumes in the mesh.
localIdx nBoundaryFaces() const
Get the number of boundary faces 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.
localIdx nBoundaries() const
Get the number of boundaries patches in the mesh.
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.
localIdx nInternalFaces() const
Get the number of internal faces in the mesh.
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.
const vectorVector & faceCenters() const
Get the field of face centers.
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.
localIdx globalOffset() const
the offset local cellIds for the global mesh.
scalarVector & cellVolumes()
vectorVector & faceCenters()
BoundaryMesh & boundaryMesh()
scalarVector & faceAreas()
labelVector & faceOwners()
const BoundaryMesh & boundaryMesh() const
Get the boundary mesh.
localIdx nTotalFaces() const
Get the total number of faces including boundary and processor faces in the mesh.
const vectorVector & points() const
Get the field of mesh points.
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
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.