version 3.11-dev
Loading...
Searching...
No Matches
Dumux::DistributedBoundingBoxTree< GeometricEntitySet > Class Template Reference

An MPI-parallel axis-aligned bounding box volume tree. More...

#include <dumux/geometry/distributedboundingboxtree.hh>

Inheritance diagram for Dumux::DistributedBoundingBoxTree< GeometricEntitySet >:

Description

template<class GeometricEntitySet>
requires requires(const GeometricEntitySet& set) { { set.comm() }; }
class Dumux::DistributedBoundingBoxTree< GeometricEntitySet >

A composition of a process-local Dumux::BoundingBoxTree and a replicated Dumux::BoundingBoxTree over the per-process bounding boxes (the "process tree"). The latter forms the upper, cross-process level of the hierarchy and is identical on all ranks. Query it (processTree()) to find candidate processes for a point or box, mapping the resulting leaves to ranks via processForLeaf(), before querying the (process-local) tree of those candidates.

Template Parameters
GeometricEntitySethas the same requirements as for Dumux::BoundingBoxTree and additionally has to export a communicator via a comm() member function (e.g. Dumux::GridViewGeometricEntitySet).

Public Types

using LocalTree = BoundingBoxTree<GeometricEntitySet>
 the type of the process-local bounding box tree
using EntitySet = GeometricEntitySet
 the type of entity set this tree was built with
using Communication = std::decay_t<decltype(std::declval<const GeometricEntitySet>().comm())>
 the communicator type
using ProcessTree = BoundingBoxTree<ProcessEntitySet>
 the type of the replicated process tree

Public Member Functions

 DistributedBoundingBoxTree ()=default
 Default constructor.
 DistributedBoundingBoxTree (std::shared_ptr< const GeometricEntitySet > set)
 Constructor with an entity set.
void build (std::shared_ptr< const GeometricEntitySet > set)
 Build the distributed bounding box tree for the given entity set.
const EntitySetentitySet () const
 the entity set this tree was built with
const Communicationcomm () const
 the communicator this tree was built with
int rank () const
 the rank of this process
bool hasLocalEntities () const
 whether this process holds any local entities
const LocalTreelocalTree () const
 the process-local bounding box tree (only valid if hasLocalEntities())
const ProcessTreeprocessTree () const
 the replicated process tree over the per-process boxes
int processForLeaf (std::size_t leafIdx) const
 the rank owning the given leaf of the process tree
std::span< const ctype, 2 *dimworld > localBoundingBox () const
 the bounding box (min then max) of this process' partition (only valid if hasLocalEntities())

Member Typedef Documentation

◆ Communication

template<class GeometricEntitySet>
using Dumux::DistributedBoundingBoxTree< GeometricEntitySet >::Communication = std::decay_t<decltype(std::declval<const GeometricEntitySet>().comm())>

◆ EntitySet

template<class GeometricEntitySet>
using Dumux::DistributedBoundingBoxTree< GeometricEntitySet >::EntitySet = GeometricEntitySet

◆ LocalTree

template<class GeometricEntitySet>
using Dumux::DistributedBoundingBoxTree< GeometricEntitySet >::LocalTree = BoundingBoxTree<GeometricEntitySet>

◆ ProcessTree

template<class GeometricEntitySet>
using Dumux::DistributedBoundingBoxTree< GeometricEntitySet >::ProcessTree = BoundingBoxTree<ProcessEntitySet>

Constructor & Destructor Documentation

◆ DistributedBoundingBoxTree() [1/2]

template<class GeometricEntitySet>
Dumux::DistributedBoundingBoxTree< GeometricEntitySet >::DistributedBoundingBoxTree ( )
default

◆ DistributedBoundingBoxTree() [2/2]

template<class GeometricEntitySet>
Dumux::DistributedBoundingBoxTree< GeometricEntitySet >::DistributedBoundingBoxTree ( std::shared_ptr< const GeometricEntitySet > set)
inlineexplicit

Member Function Documentation

◆ build()

template<class GeometricEntitySet>
void Dumux::DistributedBoundingBoxTree< GeometricEntitySet >::build ( std::shared_ptr< const GeometricEntitySet > set)
inline

◆ comm()

template<class GeometricEntitySet>
const Communication & Dumux::DistributedBoundingBoxTree< GeometricEntitySet >::comm ( ) const
inline

◆ entitySet()

template<class GeometricEntitySet>
const EntitySet & Dumux::DistributedBoundingBoxTree< GeometricEntitySet >::entitySet ( ) const
inline

◆ hasLocalEntities()

template<class GeometricEntitySet>
bool Dumux::DistributedBoundingBoxTree< GeometricEntitySet >::hasLocalEntities ( ) const
inline

◆ localBoundingBox()

template<class GeometricEntitySet>
std::span< const ctype, 2 *dimworld > Dumux::DistributedBoundingBoxTree< GeometricEntitySet >::localBoundingBox ( ) const
inline

◆ localTree()

template<class GeometricEntitySet>
const LocalTree & Dumux::DistributedBoundingBoxTree< GeometricEntitySet >::localTree ( ) const
inline

◆ processForLeaf()

template<class GeometricEntitySet>
int Dumux::DistributedBoundingBoxTree< GeometricEntitySet >::processForLeaf ( std::size_t leafIdx) const
inline

◆ processTree()

template<class GeometricEntitySet>
const ProcessTree & Dumux::DistributedBoundingBoxTree< GeometricEntitySet >::processTree ( ) const
inline

◆ rank()

template<class GeometricEntitySet>
int Dumux::DistributedBoundingBoxTree< GeometricEntitySet >::rank ( ) const
inline

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