GEOS
CellElementRegionSelector.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2024 TotalEnergies
7  * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
8  * Copyright (c) 2023-2024 Chevron
9  * Copyright (c) 2019- GEOS/GEOSX Contributors
10  * All rights reserved
11  *
12  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
13  * ------------------------------------------------------------------------------------------------------------
14  */
15 
20 #ifndef GEOS_MESH_CELLELEMENTREGIONSELECTOR_HPP_
21 #define GEOS_MESH_CELLELEMENTREGIONSELECTOR_HPP_
22 
24 
25 namespace geos
26 {
27 
35 {
36 public:
37 
44  std::map< integer, std::set< string > > const & cellBlocksRegion );
45 
52  std::set< string > buildCellBlocksSelection( CellElementRegion const & region );
53 
63 
64 private:
65 
67  static constexpr string_view cellBlockTypeSeparator = "_";
68 
70  std::map< string, std::vector< CellElementRegion const * > > m_cellBlocksOwners;
71 
73  std::map< string, std::vector< CellElementRegion const * > > m_regionAttributesOwners;
74 
79  std::map< string, std::set< string > const & > m_regionAttributesCellBlocks;
80 
89  std::set< string > buildMatchPatterns( CellElementRegion const & region,
90  std::set< string > const & attributeValues,
91  std::set< string > const & matchPatterns ) const;
92 
99  std::set< string > getMatchingCellblocks( CellElementRegion const & region,
100  string_view matchPattern ) const;
101 
108  void verifyRequestedCellBlocks( CellElementRegion const & region,
109  std::set< string > const & cellBlockNames ) const;
110 
117  void registerRegionSelection( CellElementRegion const & region,
118  std::set< string > const & cellBlockNames,
119  std::set< string > const & attributeValues );
120 
121 };
122 
123 } /* namespace geos */
124 
125 #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