walberla::domain_decomposition::BlockCounter Class Reference

Detailed Description

Class/functor for counting the blocks stored in parallel on all processes in a structured block storage.

Returns the total number of blocks stored in a 'StructuredBlockStorage'. Can also return the number of blocks that are contained only on a specific level.

#include <BlockCounter.h>

Public Member Functions

 BlockCounter (const weak_ptr< StructuredBlockStorage > &blocks, const Set< SUID > &requiredSelectors=Set< SUID >::emptySet(), const Set< SUID > &incompatibleSelectors=Set< SUID >::emptySet())
 
uint_t numberOfBlocks () const
 
uint_t numberOfBlocks (const uint_t level) const
 
void operator() ()
 

Private Attributes

uint_t totalNumberOfBlocks_
 
std::vector< uint_tnumberOfBlocks_
 
weak_ptr< StructuredBlockStorageblocks_
 
Set< SUID > requiredSelectors_
 
Set< SUID > incompatibleSelectors_
 

Constructor & Destructor Documentation

◆ BlockCounter()

walberla::domain_decomposition::BlockCounter::BlockCounter ( const weak_ptr< StructuredBlockStorage > &  blocks,
const Set< SUID > &  requiredSelectors = Set<SUID>::emptySet(),
const Set< SUID > &  incompatibleSelectors = Set<SUID>::emptySet() 
)
inline

Member Function Documentation

◆ numberOfBlocks() [1/2]

uint_t walberla::domain_decomposition::BlockCounter::numberOfBlocks ( ) const
inline

◆ numberOfBlocks() [2/2]

uint_t walberla::domain_decomposition::BlockCounter::numberOfBlocks ( const uint_t  level) const
inline

◆ operator()()

void walberla::domain_decomposition::BlockCounter::operator() ( )
inline

Member Data Documentation

◆ blocks_

weak_ptr< StructuredBlockStorage > walberla::domain_decomposition::BlockCounter::blocks_
private

◆ incompatibleSelectors_

Set<SUID> walberla::domain_decomposition::BlockCounter::incompatibleSelectors_
private

◆ numberOfBlocks_

std::vector< uint_t > walberla::domain_decomposition::BlockCounter::numberOfBlocks_
private

◆ requiredSelectors_

Set<SUID> walberla::domain_decomposition::BlockCounter::requiredSelectors_
private

◆ totalNumberOfBlocks_

uint_t walberla::domain_decomposition::BlockCounter::totalNumberOfBlocks_
private

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