|
flow
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
nanobind module pnm — Kokkos pore-network extraction from SDF geometry.
More...
#include <nanobind/nanobind.h>#include <nanobind/ndarray.h>#include <nanobind/stl/pair.h>#include <nanobind/stl/string.h>#include <nanobind/stl/vector.h>#include <array>#include <cstddef>#include <Kokkos_Core.hpp>#include <vector>#include "peclet/core/python/ndarray_interop.hpp"#include "pore_extraction.hpp"#include "sdf_reader.h"Go to the source code of this file.
Functions | |
| static std::vector< float > | to_sdf (nb::ndarray< float, nb::c_contig > a, std::array< int, 3 > &res) |
| NB_MODULE (_pnm, m) | |
nanobind module pnm — Kokkos pore-network extraction from SDF geometry.
Matches the numpy convention: SDF is (Nz,Ny,Nx) C-order, origin/spacing are zyx. VTI reading (SDFReader) is pure C++ (sdf_reader.cpp, backend-free); the pore/segmentation/topology compute is the Kokkos GPU port. Exposes SDFReader, extract_pores, segment_volume, extract_topology_gpu. A C-order (Nz,Ny,Nx) buffer is contiguous x-fastest, so it maps onto the solver's flat layout directly via the shared bridge (peclet::core::python, core).
Definition in file pnm_bindings.cpp.
|
static |
Definition at line 28 of file pnm_bindings.cpp.
Referenced by NB_MODULE().
| NB_MODULE | ( | _pnm | , |
| m | |||
| ) |
Definition at line 35 of file pnm_bindings.cpp.
References pnm::PoreNetwork::connections, pnm::extract_pore_network_k(), pnm::extract_pores_k(), pnm::extract_topology_k(), pnm::PoreNetwork::pores, pnm::Pore::radius, SDFReader::read_vti(), pnm::PoreNetwork::seg, pnm::segment_volume_k(), to_sdf(), pnm::Pore::x, pnm::Pore::y, and pnm::Pore::z.