GEOSX
WellElementRegion.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 Total, S.A
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 
20 #ifndef GEOSX_MESH_WELLELEMENTREGION_HPP_
21 #define GEOSX_MESH_WELLELEMENTREGION_HPP_
22 
23 #include "mesh/ElementRegionBase.hpp"
24 #include "meshUtilities/InternalWellGenerator.hpp"
25 
26 namespace geosx
27 {
28 
29 class MeshLevel;
30 
38 {
39 public:
40 
44 
51  WellElementRegion( string const & name, Group * const parent );
52 
56  virtual ~WellElementRegion() override;
57 
61  WellElementRegion() = delete;
62 
64 
68 
74  static const string CatalogName()
75  { return "WellElementRegion"; }
76 
80  virtual const string getCatalogName() const override final
81  { return WellElementRegion::CatalogName(); }
82 
84 
88 
94  void SetWellGeneratorName( string const & name ) { m_wellGeneratorName = name; }
95 
100  string const & GetWellGeneratorName() const { return m_wellGeneratorName; }
101 
106  void SetWellControlsName( string const & name ) { m_wellControlsName = name; }
107 
112  string const & GetSubRegionName() const { return m_subRegionName; }
113 
115 
119 
124  virtual void GenerateMesh( Group * ) override {}
125 
133  void GenerateWell( MeshLevel & mesh,
134  InternalWellGenerator const & wellGeometry,
135  globalIndex nodeOffsetGlobal,
136  globalIndex elemOffsetGlobal );
137 
139 
145  {
147  static constexpr auto wellControlsString = "wellControlsName";
149  static constexpr auto wellGeneratorString = "wellGeneratorName";
150 
152  dataRepository::ViewKey wellControlsName = { wellControlsString };
154  dataRepository::ViewKey wellGeneratorName = { wellGeneratorString };
155 
156  }
159 
164  struct groupKeyStruct : public ElementRegionBase::groupKeyStruct
165  {}
168 
169 private:
170 
172  const string m_subRegionName;
173 
175  string m_wellControlsName;
176 
178  string m_wellGeneratorName;
179 
180 };
181 
182 } /* namespace geosx */
183 
184 #endif /* GEOSX_MESH_WELLELEMENTREGION_HPP_ */
Struct to serve as a container for variable strings and keys.
long long int globalIndex
Global index type (for indexing objects across MPI partitions).
Definition: DataTypes.hpp:128
This class specializes the element region for the case of a well. This class is also in charge of sta...
void SetWellControlsName(string const &name)
Set the name of the WellControls object of this well.
geosx::WellElementRegion::groupKeyStruct groupKeysWellElementRegion
groupKey struct for the WellElementRegion class
Class facilitating the representation of a multi-level discretization of a MeshBody.
Definition: MeshLevel.hpp:38
virtual const string getCatalogName() const override final
Get the catalog name.
geosx::WellElementRegion::viewKeyStruct viewKeysWellElementRegion
ViewKey struct for the WellElementRegion class.
WellElementRegion()=delete
Deleted default constructor.
dataRepository::ViewKey wellControlsName
ViewKey for the well control name.
static constexpr auto wellControlsString
String key for the well control name.
dataRepository::ViewKey wellGeneratorName
ViewKey for the well generator name.
Group::wrapperMap::KeyIndex ViewKey
Type alias for KeyIndexT type used for wrapper lookups.
Definition: Group.hpp:1545
The ElementRegionBase is the base class to manage the data stored at the element level.
virtual ~WellElementRegion() override
Default destructor.
struct to serve as a container for group strings and keys
void SetWellGeneratorName(string const &name)
Set the name of the InternalWellGenerator object of this well.
virtual void GenerateMesh(Group *) override
Not implemented, this task is performed in GenerateWell.
static constexpr auto wellGeneratorString
String key for the well generator name.
string const & GetSubRegionName() const
Get the name of the subRegion.
void GenerateWell(MeshLevel &mesh, InternalWellGenerator const &wellGeometry, globalIndex nodeOffsetGlobal, globalIndex elemOffsetGlobal)
Build the local well elements and perforations from global well geometry.
static const string CatalogName()
Get the catalog name.
Struct to serve as a container for variable strings and keys.
string const & GetWellGeneratorName() const
Get the name of the InternalWellGenerator object of this well.