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

◆ rank()

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

◆ size()

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

◆ num_leaves()

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

◆ lmax()

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

Definition at line 647 of file amr_bindings.cpp.

References peclet::amr::DistributedOctree< Dim, Bits >::lmax().

Referenced by DistributedOctree().

◆ spacing()

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

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

References peclet::amr::DistributedOctree< Dim, Bits >::globalFineSize(), and peclet::amr::transferFieldGradients().

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

References cells(), peclet::amr::DistributedOctree< Dim, Bits >::h0(), and peclet::amr::transferFieldGradients().

◆ origin()

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

The global lower corner.

Definition at line 664 of file amr_bindings.cpp.

References peclet::amr::DistributedOctree< Dim, Bits >::globalGeometry(), and peclet::amr::transferFieldGradients().

Referenced by DistributedOctree().

◆ block_origin_root()

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

◆ block_brick()

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

◆ global_root_size()

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

◆ centers()

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

◆ sizes()

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

◆ levels()

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

◆ codes()

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

◆ 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

◆ refine_to_sdf()

◆ balance()

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

◆ rebalance()

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

◆ face_neighbor_gather()

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

◆ 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

◆ ref()

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

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

Definition at line 789 of file amr_bindings.cpp.

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


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