NeoN
A framework for CFD software
Loading...
Searching...
No Matches
Classes | Functions
NeoN::detail Namespace Reference

Classes

struct  CellData
 Cell geometric data for a uniform mesh. More...
 
struct  FaceData
 Face geometric and topological data for internal mesh faces. More...
 
struct  IntervalOffsetScan
 
struct  MeshParams
 Parameters describing a 3D uniform Cartesian mesh. More...
 
struct  RefHolder
 A wrapper class to put references in dictionaries to overcome the issue that std::any cannot hold a reference use with care since if the original values does not exist anymore it will be a dangling reference. More...
 

Functions

template<typename ValueType >
auto deepCopyVisitor (localIdx ssize, const ValueType *srcPtr, ValueType *dstPtr)
 A helper function to simplify the common pattern of copying between and to executor.
 
template<typename ValueType , typename BinaryOp >
void fieldBinaryOp (Vector< ValueType > &vect1, const Vector< std::type_identity_t< ValueType > > &vect2, BinaryOp op)
 
std::vector< Vec3generatePoints (const MeshParams &p)
 Generate mesh vertex coordinates for a uniform Cartesian grid.
 
CellData generateCellData (const MeshParams &p)
 Generate cell volumes and cell-center coordinates.
 
FaceData generateInternalFaces (const MeshParams &p, const localIdx nInternalFaces, const localIdx nFaces)
 Generate internal face data for a 3D uniform mesh.
 
BoundaryMesh generateBoundaryData (const Executor exec, const int dim, const MeshParams &p, const std::vector< Vec3 > &centers, const localIdx nInternalFaces, const localIdx nBoundaryFaces, const std::vector< localIdx > offset, FaceData &faces)
 Generate boundary face data for a 3D uniform mesh.
 

Function Documentation

◆ deepCopyVisitor()

template<typename ValueType >
auto NeoN::detail::deepCopyVisitor ( localIdx  ssize,
const ValueType *  srcPtr,
ValueType *  dstPtr 
)

A helper function to simplify the common pattern of copying between and to executor.

Parameters
sizeThe number of elements to copy.
srcPtrPointer to the original block of memory.
dstPtrPointer to the target block of memory.
Template Parameters
ValueTypeThe type of the underlying elements.
Returns
A function that takes a source and an destination executor

Definition at line 31 of file containerFreeFunctions.hpp.

◆ fieldBinaryOp()

template<typename ValueType , typename BinaryOp >
void NeoN::detail::fieldBinaryOp ( Vector< ValueType > &  vect1,
const Vector< std::type_identity_t< ValueType > > &  vect2,
BinaryOp  op 
)

◆ generateBoundaryData()

BoundaryMesh NeoN::detail::generateBoundaryData ( const Executor  exec,
const int  dim,
const MeshParams p,
const std::vector< Vec3 > &  centers,
const localIdx  nInternalFaces,
const localIdx  nBoundaryFaces,
const std::vector< localIdx offset,
FaceData faces 
)

Generate boundary face data for a 3D uniform mesh.

Constructs boundary face geometry, connectivity, and interpolation data for all six domain boundaries (x-, y-, z-directions).

Supports 1D, 2D, and 3D configurations depending on dimension parameter.

Parameters
execExecution context
dimSpatial dimension (1, 2, or 3)
pMesh parameters
centersCell center coordinates
nInternalFacesNumber of internal faces
nBoundaryFacesNumber of boundary faces
offsetBoundary face offset mapping for patch indexing
facesface data including boundary faces
Returns
BoundaryMesh containing all boundary-related geometric data

◆ generateCellData()

CellData NeoN::detail::generateCellData ( const MeshParams p)

Generate cell volumes and cell-center coordinates.

Computes geometric properties of each cell in a uniform Cartesian mesh, assuming constant spacing in all coordinate directions.

Parameters
pMesh parameters
Returns
CellData containing volumes and cell centers

◆ generateInternalFaces()

FaceData NeoN::detail::generateInternalFaces ( const MeshParams p,
const localIdx  nInternalFaces,
const localIdx  nFaces 
)

Generate internal face data for a 3D uniform mesh.

Constructs face normals, centers, magnitudes, and owner/neighbour connectivity for all internal faces in x-, y-, and z-directions.

Face ordering:

  • First: x-normal faces
  • Second: y-normal faces
  • Third: z-normal faces
Parameters
pMesh parameters
nInternalFacesNumber of internal faces
nFacesTotal number of faces
Returns
FaceData containing internal face geometry and connectivity

◆ generatePoints()

std::vector< Vec3 > NeoN::detail::generatePoints ( const MeshParams p)

Generate mesh vertex coordinates for a uniform Cartesian grid.

Creates a structured set of points spanning a 3D rectangular domain with uniform spacing in x, y, and z directions.

Parameters
pMesh parameters defining resolution and domain size
Returns
Vector of point coordinates in structured ordering