|
pnm 1.0.3
peclet.pnm — pore-network extraction from SDF geometry (Kokkos)
|
Namespaces | |
| namespace | detail_mpi |
| namespace | kernels |
| namespace | test |
Classes | |
| struct | BlockGeo |
| Extended-block geometry policy (the MPI pipeline): ghost-inclusive local box <-> global periodic grid. More... | |
| struct | GridGeo |
| Single-rank geometry policy: the field IS the whole periodic grid, owned == field coords, gid == index. More... | |
| struct | I3 |
| struct | MpiPoreNetwork |
| Result of one distributed extraction. More... | |
| struct | NetworkFlow |
| struct | Pore |
| struct | PoreNetwork |
| The full pore network from one extraction: pores, the per-voxel segmentation (flat), and the label-adjacency connections. More... | |
| struct | PoreRec |
| One owned pore-peak record of the distributed network-flow extraction (namespace-scope: nvcc forbids function-local types in extended-lambda captures). More... | |
Typedefs | |
| using | Exec = Kokkos::DefaultExecutionSpace |
| using | Mem = Exec::memory_space |
| using | Index = std::int64_t |
| Global voxel / face id (== peclet::core::Index; asserted where core is included). | |
Functions | |
| std::vector< Pore > | extractPoresView (const Kokkos::View< float *, Mem > &sdf, std::array< int, 3 > resolution, std::array< float, 3 > origin, std::array< float, 3 > spacing) |
| std::vector< Pore > | extract_pores_k (const std::vector< float > &sdf_h, std::array< int, 3 > resolution, std::array< float, 3 > origin, std::array< float, 3 > spacing) |
| Kokkos::View< int *, Mem > | segmentVolumeView (const Kokkos::View< float *, Mem > &sdf, std::array< int, 3 > resolution, std::array< float, 3 > spacing, Kokkos::View< int *, Mem > *rootsOut=nullptr) |
| std::vector< int > | segment_volume_k (const std::vector< float > &sdf_h, std::array< int, 3 > resolution, std::array< float, 3 > spacing) |
| std::vector< std::pair< int, int > > | extractTopologyView (const Kokkos::View< int *, Mem > &seg, std::array< int, 3 > resolution) |
| std::vector< std::pair< int, int > > | extract_topology_k (const int *seg_h, std::size_t n, std::array< int, 3 > resolution) |
| std::vector< std::pair< int, int > > | extract_topology_k (const std::vector< int > &seg_h, std::array< int, 3 > resolution) |
| NetworkFlow | extract_network_flow_k (const std::vector< float > &sdf_h, std::array< int, 3 > resolution, std::array< float, 3 > origin, std::array< float, 3 > spacing, const std::vector< double > &u_h, const std::vector< double > &v_h, const std::vector< double > &w_h, const std::vector< double > &p_h, const std::vector< double > &ox_h, const std::vector< double > &oy_h, const std::vector< double > &oz_h, std::array< double, 3 > grad_p) |
| PoreNetwork | extract_pore_network_k (const std::vector< float > &sdf_h, std::array< int, 3 > resolution, std::array< float, 3 > origin, std::array< float, 3 > spacing) |
| void | mpi_block_of (std::array< int, 3 > gdims, MPI_Comm comm, std::array< int, 3 > &offset, std::array< int, 3 > &size) |
This rank's ORB block of the global grid (deterministic; same partition as flow/dem): offset = the block's first voxel index per axis (an integer grid offset, not a physical origin), size = its voxel count per axis. | |
| MpiPoreNetwork | extract_pore_network_mpi (const std::vector< float > &sdf_local, std::array< int, 3 > gdims, std::array< float, 3 > origin, std::array< float, 3 > spacing, MPI_Comm comm) |
| Distributed fused extraction. | |
| NetworkFlow | extract_network_flow_mpi (const std::vector< float > &sdf_local, std::array< int, 3 > gdims, std::array< float, 3 > origin, std::array< float, 3 > spacing, const std::vector< double > &u_h, const std::vector< double > &v_h, const std::vector< double > &w_h, const std::vector< double > &p_h, const std::vector< double > &ox_h, const std::vector< double > &oy_h, const std::vector< double > &oz_h, std::array< double, 3 > grad_p, MPI_Comm comm) |
| template<class T > | |
| void | uploadVec (const std::vector< T > &h, const Kokkos::View< T *, Mem > &d) |
| Bulk host->device upload of a whole std::vector via one deep_copy over an unmanaged host view. | |
| template<class V > | |
| std::vector< typename V::value_type > | downloadN (const V &d, std::size_t count) |
Download the first count elements of a device view into a fresh std::vector via one deep_copy — only moves what is used. | |
| template<class V > | |
| V::value_type | readScalar (const V &d) |
Read a device scalar (the changed / counter flags) back to the host. | |
| int | get_idx (int x, int y, int z, I3 res) |
| int | wrapc (int a, int n) |
| using pnm::Exec = typedef Kokkos::DefaultExecutionSpace |
Definition at line 51 of file pore_kernels.hpp.
| using pnm::Mem = typedef Exec::memory_space |
Definition at line 52 of file pore_kernels.hpp.
| using pnm::Index = typedef std::int64_t |
Global voxel / face id (== peclet::core::Index; asserted where core is included).
Definition at line 54 of file pore_kernels.hpp.
|
inline |
Definition at line 29 of file pore_extraction.hpp.
References pnm::kernels::detectPores(), downloadN(), pnm::GridGeo::of(), and readScalar().
Referenced by extract_pore_network_k(), and extract_pores_k().
|
inline |
Definition at line 45 of file pore_extraction.hpp.
References extractPoresView(), and uploadVec().
Referenced by NB_MODULE().
|
inline |
Definition at line 59 of file pore_extraction.hpp.
References pnm::kernels::cclFixpoint(), pnm::kernels::cclMergeMarkers(), pnm::kernels::floodFixpoint(), pnm::kernels::gradientWalk(), pnm::kernels::initMarkers(), and pnm::GridGeo::of().
Referenced by extract_network_flow_k(), extract_pore_network_k(), and segment_volume_k().
|
inline |
Definition at line 169 of file pore_extraction.hpp.
References downloadN(), segmentVolumeView(), and uploadVec().
Referenced by NB_MODULE().
|
inline |
Definition at line 181 of file pore_extraction.hpp.
References pnm::kernels::boundaryPairs(), pnm::GridGeo::of(), readScalar(), and pnm::kernels::uniquePairs().
Referenced by extract_pore_network_k(), and extract_topology_k().
|
inline |
Definition at line 198 of file pore_extraction.hpp.
References extractTopologyView().
Referenced by extract_topology_k(), and NB_MODULE().
|
inline |
Definition at line 209 of file pore_extraction.hpp.
References extract_topology_k().
|
inline |
Definition at line 244 of file pore_extraction.hpp.
References downloadN(), pnm::GridGeo::of(), pnm::NetworkFlow::pore_pressure, pnm::NetworkFlow::pore_residual, pnm::NetworkFlow::pores, readScalar(), segmentVolumeView(), pnm::NetworkFlow::throat_area, pnm::NetworkFlow::throat_dp, pnm::NetworkFlow::throat_flow, pnm::NetworkFlow::throats, uploadVec(), pnm::Pore::x, pnm::Pore::y, and pnm::Pore::z.
Referenced by NB_MODULE().
|
inline |
Definition at line 466 of file pore_extraction.hpp.
References pnm::PoreNetwork::connections, downloadN(), extractPoresView(), extractTopologyView(), pnm::PoreNetwork::pores, pnm::PoreNetwork::seg, segmentVolumeView(), and uploadVec().
Referenced by NB_MODULE().
|
inline |
This rank's ORB block of the global grid (deterministic; same partition as flow/dem): offset = the block's first voxel index per axis (an integer grid offset, not a physical origin), size = its voxel count per axis.
Definition at line 327 of file pore_extraction_mpi.hpp.
Referenced by NB_MODULE().
|
inline |
Distributed fused extraction.
sdf_local is this rank's INNER block (x-fastest, no ghosts), sized to the ORB block from mpi_block_of. Bit-exact to the single-rank extract_pore_network_k on the gathered grid (pores as a set; seg per voxel; connections).
Definition at line 343 of file pore_extraction_mpi.hpp.
References pnm::MpiPoreNetwork::block_origin, pnm::MpiPoreNetwork::block_size, downloadN(), pnm::BlockGeo::ex, pnm::BlockGeo::ey, pnm::BlockGeo::ez, pnm::BlockGeo::numExt(), pnm::BlockGeo::numOwned(), pnm::BlockGeo::nx, pnm::BlockGeo::ny, pnm::BlockGeo::nz, pnm::BlockGeo::ox, pnm::BlockGeo::oy, pnm::BlockGeo::oz, pnm::MpiPoreNetwork::pores, readScalar(), and uploadVec().
Referenced by extract_network_flow_mpi(), NB_MODULE(), and state_hash::run_case_mpi().
|
inline |
Definition at line 639 of file pore_extraction_mpi.hpp.
References downloadN(), extract_network_flow_mpi(), extract_pore_network_mpi(), pnm::PoreRec::id, pnm::BlockGeo::numExt(), pnm::BlockGeo::numOwned(), pnm::PoreRec::pgx, pnm::PoreRec::pgy, pnm::PoreRec::pgz, pnm::PoreRec::po, pnm::NetworkFlow::pore_pressure, pnm::NetworkFlow::pore_residual, pnm::NetworkFlow::pores, pnm::PoreRec::press, readScalar(), pnm::MpiPoreNetwork::seg, pnm::NetworkFlow::throat_area, pnm::NetworkFlow::throat_dp, pnm::NetworkFlow::throat_flow, pnm::NetworkFlow::throats, uploadVec(), pnm::Pore::x, pnm::Pore::y, and pnm::Pore::z.
Referenced by extract_network_flow_mpi(), NB_MODULE(), and state_hash::run_case_mpi().
|
inline |
Bulk host->device upload of a whole std::vector via one deep_copy over an unmanaged host view.
d must already be sized to h.
Definition at line 59 of file pore_kernels.hpp.
Referenced by extract_network_flow_k(), extract_network_flow_mpi(), extract_pore_network_k(), extract_pore_network_mpi(), extract_pores_k(), pnm::detail_mpi::globalMerge(), segment_volume_k(), and pnm::detail_mpi::stageInner().
|
inline |
Download the first count elements of a device view into a fresh std::vector via one deep_copy — only moves what is used.
Definition at line 70 of file pore_kernels.hpp.
Referenced by extract_network_flow_k(), extract_network_flow_mpi(), extract_pore_network_k(), extract_pore_network_mpi(), extractPoresView(), pnm::detail_mpi::localPairs(), pnm::detail_mpi::minByKey(), pnm::detail_mpi::packInner(), segment_volume_k(), and pnm::kernels::uniquePairs().
|
inline |
Read a device scalar (the changed / counter flags) back to the host.
Definition at line 81 of file pore_kernels.hpp.
Referenced by pnm::kernels::cclFixpoint(), extract_network_flow_k(), extract_network_flow_mpi(), extract_pore_network_mpi(), extractPoresView(), extractTopologyView(), and pnm::kernels::floodFixpoint().
| int pnm::get_idx | ( | int | x, |
| int | y, | ||
| int | z, | ||
| I3 | res | ||
| ) |
Definition at line 87 of file pore_kernels.hpp.
| int pnm::wrapc | ( | int | a, |
| int | n | ||
| ) |
Definition at line 94 of file pore_kernels.hpp.
Referenced by pnm::GridGeo::cell(), pnm::GridGeo::gcoord(), and pnm::BlockGeo::wrapc().