GEOS
CellElementRegionSelector.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University
7  * Copyright (c) 2018-2020 TotalEnergies
8  * Copyright (c) 2019- GEOSX Contributors
9  * All rights reserved
10  *
11  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
12  * ------------------------------------------------------------------------------------------------------------
13  */
14 
19 #ifndef GEOS_MESH_CELLELEMENTREGIONSELECTOR_HPP_
20 #define GEOS_MESH_CELLELEMENTREGIONSELECTOR_HPP_
21 
23 
24 namespace geos
25 {
26 
34 {
35 public:
36 
43  std::map< integer, std::set< string > > const & cellBlocksRegion );
44 
51  std::set< string > buildCellBlocksSelection( CellElementRegion const & region );
52 
62 
63 private:
64 
66  static constexpr string_view cellBlockTypeSeparator = "_";
67 
69  std::map< string, std::vector< CellElementRegion const * > > m_cellBlocksOwners;
70 
72  std::map< string, std::vector< CellElementRegion const * > > m_regionAttributesOwners;
73 
78  std::map< string, std::set< string > const & > m_regionAttributesCellBlocks;
79 
88  std::set< string > buildMatchPatterns( CellElementRegion const & region,
89  std::set< string > const & attributeValues,
90  std::set< string > const & matchPatterns ) const;
91 
98  std::set< string > getMatchingCellblocks( CellElementRegion const & region,
99  string_view matchPattern ) const;
100 
107  void verifyRequestedCellBlocks( CellElementRegion const & region,
108  std::set< string > const & cellBlockNames ) const;
109 
116  void registerRegionSelection( CellElementRegion const & region,
117  std::set< string > const & cellBlockNames,
118  std::set< string > const & attributeValues );
119 
120 };
121 
122 } /* namespace geos */
123 
124 #endif /* GEOS_MESH_CELLELEMENTREGIONSELECTOR_HPP_ */
CellElementRegionSelector(dataRepository::Group const &cellBlocks, std::map< integer, std::set< string > > const &cellBlocksRegion)
Construct a new CellElementRegionSelector.
std::set< string > buildCellBlocksSelection(CellElementRegion const &region)
Select the mesh cell-blocks for the specified region following the user inputs.
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:82
mapBase< TKEY, TVAL, std::integral_constant< bool, true > > map
Ordered map type.
Definition: DataTypes.hpp:369
std::string_view string_view
String type.
Definition: DataTypes.hpp:94