22#include <blockforest/StructuredBlockForest.h>
23#include <core/DataTypes.h>
24#include <core/cell/Cell.h>
25#include <domain_decomposition/IBlock.h>
42 unsigned int n_ghost_layers) {
44 for (
auto &
block : cached_blocks) {
46 .getExtended(real_c(n_ghost_layers))
47 .contains(real_c(pos[0]), real_c(pos[1]), real_c(pos[2]))) {
55inline std::optional<BlockAndCell>
59 auto n_ghost_layers = 0u;
60 if (consider_ghost_layers) {
71 Cell global_cell{uint_c(node[0]), uint_c(node[1]), uint_c(node[2])};
72 blocks->transformGlobalToBlockLocalCell(local_cell, *
block, global_cell);
73 return {{
block, local_cell}};
78 bool consider_ghost_layers) {
81 auto block = blocks->getBlock(real_c(pos[0]), real_c(pos[1]), real_c(pos[2]));
82 if (consider_ghost_layers and !
block) {
Class that runs and controls the BlockForest in waLBerla.
auto get_ghost_layers() const
auto const & get_cached_blocks() const
static double * block(double *p, std::size_t index, std::size_t size)
\file PackInfoPdfDoublePrecision.cpp \author pystencils
std::optional< BlockAndCell > get_block_and_cell(::LatticeWalberla const &lattice, Utils::Vector3i const &node, bool consider_ghost_layers)
IBlock * get_block_extended(LatticeWalberla const &lattice, Utils::Vector< T, 3 > const &pos, unsigned int n_ghost_layers)
IBlock * get_block(::LatticeWalberla const &lattice, Utils::Vector3d const &pos, bool consider_ghost_layers)