GEOSX
CellElementRegion.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_CELLELEMENTREGION_HPP_
20 #define GEOS_MESH_CELLELEMENTREGION_HPP_
21 
22 #include "ElementRegionBase.hpp"
23 
24 namespace geos
25 {
26 
34 {
35 public:
36 
41 
42 
48  CellElementRegion( string const & name, Group * const parent );
49 
53  CellElementRegion() = delete;
54 
58  virtual ~CellElementRegion() override;
59 
64 
69  static string catalogName()
70  { return "CellElementRegion"; }
71 
75  virtual string getCatalogName() const override final
76  { return catalogName(); }
77 
79 
84 
85 
91  {
92  return m_cellBlockNames.toViewConst();
93  }
94 
99  void addCellBlockName( string const & cellBlockName )
100  {
101  m_cellBlockNames.emplace_back( cellBlockName );
102  }
103 
108  void addCellBlockNames( arrayView1d< string const > const & cellBlockNames )
109  {
110  for( auto const & name: cellBlockNames )
111  {
112  m_cellBlockNames.emplace_back( name );
113  }
114  }
115 
116  virtual void generateMesh( Group const & cellBlocks ) override;
117 
119 
125  {
127  static constexpr char const * coarseningRatioString() {return "coarseningRatio"; }
128 
130  static constexpr char const * sourceCellBlockNamesString() {return "cellBlocks"; }
131  };
132 
133 
134 private:
135 
136  // Cell block names
137  string_array m_cellBlockNames;
138 
139  // Coarsening ratio
140  real64 m_coarseningRatio;
141 
142 };
143 
144 } /* namespace geos */
145 
146 #endif /* GEOS_MESH_CELLELEMENTREGION_HPP_ */
void addCellBlockName(string const &cellBlockName)
Add a cellBlockRegion name to the list.
void addCellBlockNames(arrayView1d< string const > const &cellBlockNames)
Add an array cellBlockRegion name to the list.
arrayView1d< string const > getCellBlockNames() const
Getter for m_cellBlockNames.
static string catalogName()
The key name for the FaceElementRegion in the object catalog.
virtual string getCatalogName() const override final
The key name for the FaceElementRegion in the object catalog.
virtual void generateMesh(Group const &cellBlocks) override
Generate mesh.
CellElementRegion(string const &name, Group *const parent)
Constructor.
CellElementRegion()=delete
Deleted default constructor.
virtual ~CellElementRegion() override
Destructor.
The ElementRegionBase is the base class to manage the data stored at the element level.
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Definition: DataTypes.hpp:220
array1d< string > string_array
A 1-dimensional array of geos::string types.
Definition: DataTypes.hpp:432
double real64
64-bit floating point type.
Definition: DataTypes.hpp:139
A struct to serve as a container for variable strings and keys.
static constexpr char const * sourceCellBlockNamesString()
static constexpr char const * coarseningRatioString()
Struct to serve as a container for variable strings and keys.