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  DistributedOctree
 
class  Flow
 
class  FlowDiagnostics
 
class  Octree
 
class  Poisson
 

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

◆ DO

◆ Code

◆ Coord

◆ DArray

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

Definition at line 76 of file amr_bindings.cpp.

◆ SpacingArg

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

Definition at line 200 of file amr_bindings.cpp.

Function Documentation

◆ vec1()

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

◆ vec2()

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

Definition at line 86 of file amr_bindings.cpp.

References peclet::amr::transferFieldGradients().

◆ leafCenters()

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

◆ 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()

◆ 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 167 of file amr_bindings.cpp.

References peclet::amr::transferFieldGradients().

Referenced by resolveSpacing(), and spacingFromExtent().

◆ spacingFromExtent()

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

◆ spacingOf()

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

Definition at line 201 of file amr_bindings.cpp.

References peclet::amr::transferFieldGradients().

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 209 of file amr_bindings.cpp.

References peclet::amr::transferFieldGradients().

◆ 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

◆ bindOctreeCommon()

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

Definition at line 888 of file amr_bindings.cpp.

References peclet::amr::transferFieldGradients().