DNDSR 0.2.1
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
Mesh_Helpers.hpp File Reference

Unified mesh helpers: read, prepare, build boundary, serialize. More...

#include "Mesh.hpp"
#include "DNDS/Serializer/SerializerFactory.hpp"
#include <functional>
#include <string>
Include dependency graph for Mesh_Helpers.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  DNDS::Geom::PrepareMeshOptions
 Options for PrepareMesh. More...
 

Namespaces

namespace  DNDS
 the host side operators are provided as implemented
 
namespace  DNDS::Geom
 

Functions

void DNDS::Geom::BuildGhostPrimary (UnstructuredMesh &mesh, int nGhostLayers=1)
 Build connectivity and ghost layer for a freshly-distributed mesh.
 
void DNDS::Geom::ReadMeshFromCGNS (ssp< UnstructuredMesh > &mesh, ssp< UnstructuredMeshSerialRW > &reader, const std::string &meshFile, const PartitionOptions &partOpts={}, real periodicTol=1e-9, int elevation=0, int bisect=0, std::function< t_index(const std::string &)> nameMapper=nullptr)
 Read a CGNS mesh, partition, and optionally elevate/bisect.
 
void DNDS::Geom::ReadMeshFromH5 (UnstructuredMesh &mesh, Serializer::SerializerFactory factory, const std::string &h5Path, const PartitionOptions &partOpts={})
 Read a mesh from DNDSR H5 with even-split + ParMetis repartition.
 
void DNDS::Geom::ReadMeshFromH5Parallel (UnstructuredMesh &mesh, Serializer::SerializerFactory factory, const std::string &h5Path)
 Read a pre-partitioned mesh from H5 (exact np match required).
 
void DNDS::Geom::PrepareMesh (UnstructuredMesh &mesh, UnstructuredMeshSerialRW &reader, const PrepareMeshOptions &opts={})
 Prepare a distributed mesh for solver use.
 
void DNDS::Geom::BuildBndMesh (UnstructuredMesh &mesh, UnstructuredMesh &meshBnd, UnstructuredMeshSerialRW &readerBnd, bool buildSerialOut=true)
 Extract the boundary surface mesh from a solver-ready volume mesh.
 
void DNDS::Geom::SerializeMesh (UnstructuredMesh &mesh, const std::string &outputPath, Serializer::SerializerFactory &factory)
 Write a partitioned mesh to H5 for later distributed read.
 
std::string DNDS::Geom::MeshH5Path (const std::string &base, int mpiSize, int elevation=0, int bisect=0)
 Build the conventional H5 filename for a partitioned mesh.
 

Detailed Description

Unified mesh helpers: read, prepare, build boundary, serialize.

Thin wrappers that compose the canonical mesh assembly pipeline from lower-level UnstructuredMesh / UnstructuredMeshSerialRW methods. Mirror the Python helpers in DNDSR.Geom.utils.

See docs/dev/mesh_helpers_design.md for the design document.

Definition in file Mesh_Helpers.hpp.