peclet-amr 0.2.0
Block-local-Morton AMR octree + collocated cut-cell Navier–Stokes solver (header-only C++20, Kokkos + MPI)
Loading...
Searching...
No Matches
peclet::amr::pybind Namespace Reference

Classes

class  Octree
class  Poisson
class  Flow
class  DistributedOctree
class  FlowDiagnostics

Typedefs

using BO = amr::BlockOctree<3>
using DO = amr::DistributedOctree<3>
using Code = BO::Code
using Coord = BO::Coord
using DArray = nb::ndarray<double, nb::c_contig>
using SpacingArg = std::variant<double, std::array<double, 3>>

Functions

template<class T>
nb::ndarray< nb::numpy, T > vec1 (std::vector< T > v)
template<class T>
nb::ndarray< nb::numpy, T > vec2 (std::vector< T > v, std::size_t cols)
nb::ndarray< nb::numpy, double > leafCenters (const BO &t, const amr::AmrGeometry< 3 > &geo)
nb::ndarray< nb::numpy, double > leafSizes (const BO &t, const amr::AmrGeometry< 3 > &geo, int axis)
nb::ndarray< nb::numpy, std::int32_t > leafLevels (const BO &t)
nb::ndarray< nb::numpy, std::uint64_t > leafCodes (const BO &t)
nb::ndarray< nb::numpy, double > vecToArray (std::vector< double > v)
std::vector< double > asField (const BO &t, const DArray &field, const char *who)
std::array< double, 3 > spacingsFromExtent (const std::array< double, 3 > &extent, const std::array< long, 3 > &cells)
double spacingFromExtent (const std::array< double, 3 > &extent, const std::array< long, 3 > &cells)
std::array< double, 3 > spacingOf (const SpacingArg &sp)
std::array< long, 3 > rootCellsOf (const std::array< long, 3 > &cells, unsigned lmax, const char *who)
std::array< double, 3 > resolveSpacing (const std::optional< SpacingArg > &spacing, const std::optional< std::array< double, 3 > > &extent, const std::array< long, 3 > &cells, const char *who)
template<class T>
void bindOctreeCommon (nb::class_< T > &c)

Typedef Documentation

◆ BO

Definition at line 73 of file amr_bindings.cpp.

◆ DO

Definition at line 74 of file amr_bindings.cpp.

◆ Code

Definition at line 75 of file amr_bindings.cpp.

◆ Coord

Definition at line 76 of file amr_bindings.cpp.

◆ DArray

using peclet::amr::pybind::DArray = nb::ndarray<double, nb::c_contig>

Definition at line 77 of file amr_bindings.cpp.

◆ SpacingArg

using peclet::amr::pybind::SpacingArg = std::variant<double, std::array<double, 3>>

Definition at line 201 of file amr_bindings.cpp.

Function Documentation

◆ vec1()

◆ vec2()

template<class T>
nb::ndarray< nb::numpy, T > peclet::amr::pybind::vec2 ( std::vector< T > v,
std::size_t cols )

◆ leafCenters()

◆ leafSizes()

nb::ndarray< nb::numpy, double > peclet::amr::pybind::leafSizes ( const BO & t,
const amr::AmrGeometry< 3 > & geo,
int axis )

◆ leafLevels()

nb::ndarray< nb::numpy, std::int32_t > peclet::amr::pybind::leafLevels ( const BO & t)

◆ leafCodes()

nb::ndarray< nb::numpy, std::uint64_t > peclet::amr::pybind::leafCodes ( const BO & t)

◆ vecToArray()

nb::ndarray< nb::numpy, double > peclet::amr::pybind::vecToArray ( std::vector< double > v)

◆ asField()

◆ spacingsFromExtent()

std::array< double, 3 > peclet::amr::pybind::spacingsFromExtent ( const std::array< double, 3 > & extent,
const std::array< long, 3 > & cells )
inline

Definition at line 168 of file amr_bindings.cpp.

Referenced by NB_MODULE(), resolveSpacing(), and spacingFromExtent().

◆ spacingFromExtent()

double peclet::amr::pybind::spacingFromExtent ( const std::array< double, 3 > & extent,
const std::array< long, 3 > & cells )
inline

Definition at line 184 of file amr_bindings.cpp.

References spacingsFromExtent().

Referenced by NB_MODULE().

◆ spacingOf()

std::array< double, 3 > peclet::amr::pybind::spacingOf ( const SpacingArg & sp)
inline

Definition at line 202 of file amr_bindings.cpp.

Referenced by resolveSpacing().

◆ rootCellsOf()

std::array< long, 3 > peclet::amr::pybind::rootCellsOf ( const std::array< long, 3 > & cells,
unsigned lmax,
const char * who )
inline

Definition at line 210 of file amr_bindings.cpp.

Referenced by NB_MODULE().

◆ resolveSpacing()

std::array< double, 3 > peclet::amr::pybind::resolveSpacing ( const std::optional< SpacingArg > & spacing,
const std::optional< std::array< double, 3 > > & extent,
const std::array< long, 3 > & cells,
const char * who )
inline

Definition at line 229 of file amr_bindings.cpp.

References spacingOf(), and spacingsFromExtent().

Referenced by NB_MODULE().

◆ bindOctreeCommon()

template<class T>
void peclet::amr::pybind::bindOctreeCommon ( nb::class_< T > & c)

Definition at line 896 of file amr_bindings.cpp.

Referenced by NB_MODULE().