waLBerla 7.3
Loading...
Searching...
No Matches
walberla::blockforest::PhantomBlockForest Class Reference

#include <PhantomBlockForest.h>

Public Types

using BlockStateDeterminationFunction = std::function<Set<SUID> (const std::vector<std::pair<BlockID, Set<SUID>>> &, const BlockID &)>
using PhantomBlockDataAssignmentFunction = std::function<void (std::vector<std::pair<const PhantomBlock *, std::any>> &, const PhantomBlockForest &)>
using MigrationPreparationFunction = std::function<bool (std::vector<std::pair<const PhantomBlock *, uint_t>> &, std::set<uint_t> &, const PhantomBlockForest &, const uint_t)>
using PhantomBlockDataPackFunction = std::function<void (mpi::SendBuffer &, const PhantomBlock &)>
using PhantomBlockDataUnpackFunction = std::function<void (mpi::RecvBuffer &, const PhantomBlock &, std::any &)>

Public Member Functions

 PhantomBlockForest (BlockForest &blockforest)
const BlockForestgetBlockForest () const
uint_t getDepth () const
uint_t getNumberOfLevels () const
uint_t getNumberOfBlocks () const
bool blockExists (const BlockID &id) const
shared_ptr< const PhantomBlockgetBlock (const BlockID &id) const
shared_ptr< PhantomBlockgetBlock (const BlockID &id)
const std::map< BlockID, shared_ptr< PhantomBlock > > & getBlockMap () const
const std::vector< uint_t > & getNeighborhood () const
const std::vector< uint_t > & getNeighboringProcesses () const
void initialize (const BlockStateDeterminationFunction &function, const bool recalculateDepth)
void assignBlockData (const PhantomBlockDataAssignmentFunction &function)
bool calculateMigrationInformation (const MigrationPreparationFunction &function, const uint_t iteration)
void migrate (const PhantomBlockDataPackFunction &packBlockData, const PhantomBlockDataUnpackFunction &unpackBlockData)

Private Member Functions

void updateNeighborhood ()
void prepareMigration ()

Private Attributes

BlockForestblockforest_
uint_t depth_
std::map< BlockID, shared_ptr< PhantomBlock > > blocks_
std::vector< uint_tneighborhood_
std::set< uint_tprocessesToRecvFrom_

Member Typedef Documentation

◆ BlockStateDeterminationFunction

using walberla::blockforest::PhantomBlockForest::BlockStateDeterminationFunction = std::function<Set<SUID> (const std::vector<std::pair<BlockID, Set<SUID>>> &, const BlockID &)>

◆ MigrationPreparationFunction

using walberla::blockforest::PhantomBlockForest::MigrationPreparationFunction = std::function<bool (std::vector<std::pair<const PhantomBlock *, uint_t>> &, std::set<uint_t> &, const PhantomBlockForest &, const uint_t)>
Parameters
iterationexecution counter of this callback
Returns
should the callback rerun after phantom block migration?

◆ PhantomBlockDataAssignmentFunction

using walberla::blockforest::PhantomBlockForest::PhantomBlockDataAssignmentFunction = std::function<void (std::vector<std::pair<const PhantomBlock *, std::any>> &, const PhantomBlockForest &)>

◆ PhantomBlockDataPackFunction

◆ PhantomBlockDataUnpackFunction

Constructor & Destructor Documentation

◆ PhantomBlockForest()

walberla::blockforest::PhantomBlockForest::PhantomBlockForest ( BlockForest & blockforest)

Member Function Documentation

◆ assignBlockData()

void walberla::blockforest::PhantomBlockForest::assignBlockData ( const PhantomBlockDataAssignmentFunction & function)

◆ blockExists()

bool walberla::blockforest::PhantomBlockForest::blockExists ( const BlockID & id) const
inline

◆ calculateMigrationInformation()

bool walberla::blockforest::PhantomBlockForest::calculateMigrationInformation ( const MigrationPreparationFunction & function,
const uint_t iteration )

◆ getBlock() [1/2]

shared_ptr< PhantomBlock > walberla::blockforest::PhantomBlockForest::getBlock ( const BlockID & id)
inline

◆ getBlock() [2/2]

shared_ptr< const PhantomBlock > walberla::blockforest::PhantomBlockForest::getBlock ( const BlockID & id) const
inline

◆ getBlockForest()

const BlockForest & walberla::blockforest::PhantomBlockForest::getBlockForest ( ) const
inline

◆ getBlockMap()

const std::map< BlockID, shared_ptr< PhantomBlock > > & walberla::blockforest::PhantomBlockForest::getBlockMap ( ) const
inline

◆ getDepth()

uint_t walberla::blockforest::PhantomBlockForest::getDepth ( ) const
inline

◆ getNeighborhood()

const std::vector< uint_t > & walberla::blockforest::PhantomBlockForest::getNeighborhood ( ) const
inline

◆ getNeighboringProcesses()

const std::vector< uint_t > & walberla::blockforest::PhantomBlockForest::getNeighboringProcesses ( ) const
inline

◆ getNumberOfBlocks()

uint_t walberla::blockforest::PhantomBlockForest::getNumberOfBlocks ( ) const
inline

◆ getNumberOfLevels()

uint_t walberla::blockforest::PhantomBlockForest::getNumberOfLevels ( ) const
inline

◆ initialize()

void walberla::blockforest::PhantomBlockForest::initialize ( const BlockStateDeterminationFunction & function,
const bool recalculateDepth )

◆ migrate()

void walberla::blockforest::PhantomBlockForest::migrate ( const PhantomBlockDataPackFunction & packBlockData,
const PhantomBlockDataUnpackFunction & unpackBlockData )

◆ prepareMigration()

void walberla::blockforest::PhantomBlockForest::prepareMigration ( )
private

◆ updateNeighborhood()

void walberla::blockforest::PhantomBlockForest::updateNeighborhood ( )
private

Member Data Documentation

◆ blockforest_

BlockForest& walberla::blockforest::PhantomBlockForest::blockforest_
private

◆ blocks_

std::map< BlockID, shared_ptr< PhantomBlock > > walberla::blockforest::PhantomBlockForest::blocks_
private

◆ depth_

uint_t walberla::blockforest::PhantomBlockForest::depth_
private

◆ neighborhood_

std::vector< uint_t > walberla::blockforest::PhantomBlockForest::neighborhood_
private

◆ processesToRecvFrom_

std::set< uint_t > walberla::blockforest::PhantomBlockForest::processesToRecvFrom_
private

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