GEOS
Public Member Functions | List of all members
geos::CellElementRegionSelector Class Reference

#include <CellElementRegionSelector.hpp>

Public Member Functions

 CellElementRegionSelector (dataRepository::Group const &cellBlocks, std::map< integer, std::set< string > > const &cellBlocksRegion)
 Construct a new CellElementRegionSelector. More...
 
std::set< stringbuildCellBlocksSelection (CellElementRegion const &region)
 Select the mesh cell-blocks for the specified region following the user inputs. More...
 
void checkSelectionConsistency () const
 

Detailed Description

CellElementRegionSelector allows a CellElementRegion to safely select cell-blocks according to the user input. It handles all user input checks and throws an exception in the event of inconsistency.

Definition at line 33 of file CellElementRegionSelector.hpp.

Constructor & Destructor Documentation

◆ CellElementRegionSelector()

geos::CellElementRegionSelector::CellElementRegionSelector ( dataRepository::Group const &  cellBlocks,
std::map< integer, std::set< string > > const &  cellBlocksRegion 
)

Construct a new CellElementRegionSelector.

Parameters
cellBlocksa Group containing all the available cell-blocks.
cellBlocksRegionA map of the cellblocks name lists for each region attributes value.

Member Function Documentation

◆ buildCellBlocksSelection()

std::set< string > geos::CellElementRegionSelector::buildCellBlocksSelection ( CellElementRegion const &  region)

Select the mesh cell-blocks for the specified region following the user inputs.

Exceptions
anInputError if the user setting are inconsistant.
Parameters
regionthe region for which we want to select the cell-blocks.
Returns
the selected cell-blocks names.

◆ checkSelectionConsistency()

void geos::CellElementRegionSelector::checkSelectionConsistency ( ) const
Exceptions
AnInputError if region cell-blocks selections is inconsistent:
  • cell-block is in more than one region,
  • orphan cell-block
Todo:
For now, multiple regions per cell is not supported (ElementRegionManager::getCellBlockToSubRegionMap()). We could refactor the CellElementRegion & Mesh classes so regions are mapped to cell-blocks IN the mesh (and potentially to multiple regions per cell). So, for external meshes, the cell-blocks would no longer be exposed to the final user.

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