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::DistributedOctree Class Reference
Inheritance diagram for peclet::amr::pybind::DistributedOctree:

Public Member Functions

 DistributedOctree (std::array< long, 3 > global_root, unsigned lmax, std::array< double, 3 > origin, std::array< double, 3 > spacing, std::array< bool, 3 > periodic)
void release () noexcept override
int rank () const
int size () const
Index num_leaves () const
unsigned lmax () const
std::array< double, 3 > spacing () const
std::array< long, 3 > cells () const
 The GLOBAL finest grid: global root cells * 2**lmax per axis (what the constructor took).
std::array< double, 3 > extent () const
 The global box side lengths, cells * spacing.
std::array< double, 3 > origin () const
 The global lower corner.
std::array< long, 3 > block_origin_root () const
std::array< long, 3 > block_brick () const
std::array< long, 3 > global_root_size () const
nb::ndarray< nb::numpy, double > centers () const
nb::ndarray< nb::numpy, double > sizes (int axis) const
nb::ndarray< nb::numpy, std::int32_t > levels () const
nb::ndarray< nb::numpy, std::uint64_t > codes () const
Index refine_to_sphere (std::array< double, 3 > center, double radius, unsigned target_level, double band, bool balance)
Index refine_to_sdf (std::function< double(double, double, double)> sdf, unsigned target_level, double band, bool balance)
Index balance ()
nb::ndarray< nb::numpy, double > rebalance (DArray fields)
nb::ndarray< nb::numpy, double > face_neighbor_gather (DArray field, double sentinel)
nb::ndarray< nb::numpy, double > lohner_indicator (DArray field, double eps)
nb::ndarray< nb::numpy, double > adapt (DArray field, double refine_thresh, double coarsen_thresh, unsigned finest_level, double eps, bool linear)
void write_vtu (const std::string &path, const std::string &name, DArray field)
DO & ref ()
 The wrapped core octree (the distributed Flow constructor hooks into it).

Detailed Description

Definition at line 637 of file amr_bindings.cpp.

Constructor & Destructor Documentation

◆ DistributedOctree()

peclet::amr::pybind::DistributedOctree::DistributedOctree ( std::array< long, 3 > global_root,
unsigned lmax,
std::array< double, 3 > origin,
std::array< double, 3 > spacing,
std::array< bool, 3 > periodic )
inline

Member Function Documentation

◆ release()

void peclet::amr::pybind::DistributedOctree::release ( )
inlineoverridenoexcept

Definition at line 647 of file amr_bindings.cpp.

◆ rank()

int peclet::amr::pybind::DistributedOctree::rank ( ) const
inline

Definition at line 650 of file amr_bindings.cpp.

Referenced by NB_MODULE().

◆ size()

int peclet::amr::pybind::DistributedOctree::size ( ) const
inline

Definition at line 651 of file amr_bindings.cpp.

Referenced by NB_MODULE().

◆ num_leaves()

Index peclet::amr::pybind::DistributedOctree::num_leaves ( ) const
inline

Definition at line 652 of file amr_bindings.cpp.

◆ lmax()

unsigned peclet::amr::pybind::DistributedOctree::lmax ( ) const
inline

Definition at line 653 of file amr_bindings.cpp.

Referenced by DistributedOctree().

◆ spacing()

std::array< double, 3 > peclet::amr::pybind::DistributedOctree::spacing ( ) const
inline

Definition at line 654 of file amr_bindings.cpp.

Referenced by DistributedOctree().

◆ cells()

std::array< long, 3 > peclet::amr::pybind::DistributedOctree::cells ( ) const
inline

The GLOBAL finest grid: global root cells * 2**lmax per axis (what the constructor took).

Definition at line 659 of file amr_bindings.cpp.

Referenced by extent().

◆ extent()

std::array< double, 3 > peclet::amr::pybind::DistributedOctree::extent ( ) const
inline

The global box side lengths, cells * spacing.

Definition at line 664 of file amr_bindings.cpp.

References cells().

◆ origin()

std::array< double, 3 > peclet::amr::pybind::DistributedOctree::origin ( ) const
inline

The global lower corner.

Definition at line 670 of file amr_bindings.cpp.

Referenced by DistributedOctree().

◆ block_origin_root()

std::array< long, 3 > peclet::amr::pybind::DistributedOctree::block_origin_root ( ) const
inline

Definition at line 674 of file amr_bindings.cpp.

Referenced by NB_MODULE().

◆ block_brick()

std::array< long, 3 > peclet::amr::pybind::DistributedOctree::block_brick ( ) const
inline

Definition at line 678 of file amr_bindings.cpp.

Referenced by NB_MODULE().

◆ global_root_size()

std::array< long, 3 > peclet::amr::pybind::DistributedOctree::global_root_size ( ) const
inline

Definition at line 682 of file amr_bindings.cpp.

Referenced by NB_MODULE().

◆ centers()

nb::ndarray< nb::numpy, double > peclet::amr::pybind::DistributedOctree::centers ( ) const
inline

Definition at line 688 of file amr_bindings.cpp.

References peclet::amr::pybind::leafCenters().

◆ sizes()

nb::ndarray< nb::numpy, double > peclet::amr::pybind::DistributedOctree::sizes ( int axis) const
inline

Definition at line 691 of file amr_bindings.cpp.

References peclet::amr::pybind::leafSizes().

◆ levels()

nb::ndarray< nb::numpy, std::int32_t > peclet::amr::pybind::DistributedOctree::levels ( ) const
inline

Definition at line 694 of file amr_bindings.cpp.

References peclet::amr::pybind::leafLevels().

◆ codes()

nb::ndarray< nb::numpy, std::uint64_t > peclet::amr::pybind::DistributedOctree::codes ( ) const
inline

Definition at line 695 of file amr_bindings.cpp.

References peclet::amr::pybind::leafCodes().

◆ refine_to_sphere()

Index peclet::amr::pybind::DistributedOctree::refine_to_sphere ( std::array< double, 3 > center,
double radius,
unsigned target_level,
double band,
bool balance )
inline

Definition at line 700 of file amr_bindings.cpp.

References balance(), and peclet::amr::refineToSdf().

◆ refine_to_sdf()

Index peclet::amr::pybind::DistributedOctree::refine_to_sdf ( std::function< double(double, double, double)> sdf,
unsigned target_level,
double band,
bool balance )
inline

Definition at line 717 of file amr_bindings.cpp.

References balance(), and peclet::amr::refineToSdf().

◆ balance()

Index peclet::amr::pybind::DistributedOctree::balance ( )
inline

Definition at line 729 of file amr_bindings.cpp.

Referenced by refine_to_sdf(), and refine_to_sphere().

◆ rebalance()

nb::ndarray< nb::numpy, double > peclet::amr::pybind::DistributedOctree::rebalance ( DArray fields)
inline

Definition at line 736 of file amr_bindings.cpp.

References peclet::amr::pybind::vec2().

◆ face_neighbor_gather()

nb::ndarray< nb::numpy, double > peclet::amr::pybind::DistributedOctree::face_neighbor_gather ( DArray field,
double sentinel )
inline

Definition at line 762 of file amr_bindings.cpp.

References peclet::amr::pybind::asField(), and peclet::amr::pybind::vec2().

Referenced by NB_MODULE().

◆ lohner_indicator()

nb::ndarray< nb::numpy, double > peclet::amr::pybind::DistributedOctree::lohner_indicator ( DArray field,
double eps )
inline

◆ adapt()

nb::ndarray< nb::numpy, double > peclet::amr::pybind::DistributedOctree::adapt ( DArray field,
double refine_thresh,
double coarsen_thresh,
unsigned finest_level,
double eps,
bool linear )
inline

◆ write_vtu()

void peclet::amr::pybind::DistributedOctree::write_vtu ( const std::string & path,
const std::string & name,
DArray field )
inline

Definition at line 791 of file amr_bindings.cpp.

References peclet::amr::pybind::asField(), and peclet::amr::writeVtu().

◆ ref()

DO & peclet::amr::pybind::DistributedOctree::ref ( )
inline

The wrapped core octree (the distributed Flow constructor hooks into it).

Definition at line 797 of file amr_bindings.cpp.

Referenced by peclet::amr::pybind::Flow::Flow().


The documentation for this class was generated from the following file: