peclet.voro 1.0.4
Device-native moving-particle Voronoi dynamics
Loading...
Searching...
No Matches
voro_bindings_common.hpp File Reference

Internal helpers shared by the translation units of the peclet.voro nanobind module. More...

#include <nanobind/nanobind.h>
#include <nanobind/ndarray.h>
#include <nanobind/stl/array.h>
#include <nanobind/stl/optional.h>
#include <nanobind/stl/string.h>
#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <deque>
#include <Kokkos_Core.hpp>
#include <optional>
#include <set>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <variant>
#include <vector>
#include "peclet/core/common/view.hpp"
#include "peclet/core/geom/scene_builder.hpp"
#include "peclet/core/python/kokkos_teardown.hpp"
#include "peclet/core/python/ndarray_interop.hpp"
#include "peclet/voro/params.hpp"
#include "peclet/voro/sdf.hpp"
Include dependency graph for voro_bindings_common.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  peclet::voro::pybind::SceneHolder
 
struct  peclet::voro::pybind::OptimizeResult
 
struct  peclet::voro::pybind::InterfaceResult
 

Namespaces

namespace  peclet
 
namespace  peclet::voro
 Device-native Voronoi tessellation, geometry and finite-volume physics.
 
namespace  peclet::voro::pybind
 
namespace  peclet::voro::pybind::defaults
 

Typedefs

using real_t = double
 
using DView = Kokkos::View< real_t *, peclet::core::MemSpace >
 
using peclet::voro::pybind::NoSdfT = peclet::voro::NoSdf
 
using peclet::voro::pybind::SceneT = peclet::voro::SdfScene< real_t >
 
using peclet::voro::pybind::Mem = peclet::core::MemSpace
 

Functions

const char * peclet::voro::pybind::doc (std::string s)
 
std::string peclet::voro::pybind::fmt (double v)
 
std::string peclet::voro::pybind::fmt (int v)
 
std::vector< real_t > peclet::voro::pybind::flatten3 (nb::ndarray< real_t, nb::c_contig > a)
 
std::vector< real_t > peclet::voro::pybind::flatten1 (nb::ndarray< real_t, nb::c_contig > a)
 
real_t peclet::voro::pybind::cubicExtent (std::array< real_t, 3 > e, const char *fn)
 
SceneHolder peclet::voro::pybind::makeSceneHolder (nb::ndarray< int, nb::c_contig > node_ints, nb::ndarray< real_t, nb::c_contig > node_reals, int root, real_t grad_h)
 
void peclet::voro::pybind::checkDomain (const char *cls, std::array< real_t, 3 > extent, std::array< real_t, 3 > origin, std::array< bool, 3 > periodic)
 
bool peclet::voro::pybind::parseWallMode (const std::string &mode)
 
nb::ndarray< nb::numpy, real_t > peclet::voro::pybind::toNumpy3 (std::vector< real_t > v)
 
nb::ndarray< nb::numpy, real_t > peclet::voro::pybind::toNumpy1 (std::vector< real_t > v)
 
void peclet::voro::pybind::bindOptimizers (nb::module_ &m)
 
void peclet::voro::pybind::bindPore (nb::module_ &m)
 
void peclet::voro::pybind::bindTessellation (nb::module_ &m)
 
void peclet::voro::pybind::bindFlow (nb::module_ &m)
 
void peclet::voro::pybind::bindSimulation (nb::module_ &m)
 

Variables

constexpr double peclet::voro::pybind::defaults::kSdfGradientStep = 1e-5
 
constexpr double peclet::voro::pybind::defaults::kWallSkin = 0.0
 
constexpr int peclet::voro::pybind::defaults::kOptimizerSearchWindow = 5
 
constexpr int peclet::voro::pybind::defaults::kPoreSearchWindow = 6
 
constexpr int peclet::voro::pybind::defaults::kOptimizerMaxIter = 60
 
constexpr int peclet::voro::pybind::defaults::kPoreMaxIter = 80
 
constexpr double peclet::voro::pybind::defaults::kOptimizerTolerance = 1e-9
 
constexpr int peclet::voro::pybind::defaults::kPoreCgIters = 400
 
constexpr double peclet::voro::pybind::defaults::kInterfaceSigma = 1.0
 
constexpr int peclet::voro::pybind::defaults::kPoreMaxBins = 96
 
constexpr double peclet::voro::pybind::defaults::kDistributedRcut = 3.5
 
constexpr long peclet::voro::pybind::defaults::kDistributedCells = 16
 
constexpr const char * peclet::voro::pybind::kWallModeList = "'exact', 'skin'"
 

Detailed Description

Internal helpers shared by the translation units of the peclet.voro nanobind module.

Not an installed header: src/ only. Everything here is host-side glue (array conversion, the domain/mode contract checks, the device SDF scene holder, the typed optimiser results) — no device kernel is instantiated by including it.

Typedef Documentation

◆ DView

using DView = Kokkos::View<real_t*, peclet::core::MemSpace>

◆ real_t

using real_t = double