GEOSX
MeshBody.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 
19 #ifndef GEOSX_MESH_MESHBODY_HPP_
20 #define GEOSX_MESH_MESHBODY_HPP_
21 
22 #include "MeshLevel.hpp"
23 
24 
25 namespace geosx
26 {
27 
28 class MeshLevel;
29 
35 {
36 public:
37 
43  MeshBody( string const & name,
44  Group * const parent );
45 
49  virtual ~MeshBody();
50 
56  MeshLevel * CreateMeshLevel( localIndex const newLevel );
57 
63  MeshLevel * getMeshLevel( localIndex const level ) { return this->GetGroup< MeshLevel >( level ); }
64 
70  MeshLevel const * getMeshLevel( localIndex const level ) const { return this->GetGroup< MeshLevel >( level ); }
71 
77 
83  {
84  return m_globalLengthScale;
85  }
86 
91  {
93  dataRepository::ViewKey meshLevels = { "meshLevels" };
94  } viewKeys;
95 
100  {} groupKeys;
101 
102 private:
105  real64 m_globalLengthScale { 0. };
106 
107 
108 };
109 
110 } /* namespace geosx */
111 
112 #endif /* GEOSX_MESH_MESHBODY_HPP_ */
constexpr void scale(VECTOR &&vector, std::remove_reference_t< decltype(vector[0]) > const scale)
Multiply the entries of vector by scale.
Class facilitating the representation of a multi-level discretization of a MeshBody.
Definition: MeshLevel.hpp:38
struct geosx::MeshBody::groupStructKeys groupKeys
groupKeys
MeshLevel const * getMeshLevel(localIndex const level) const
Get mesh level.
Definition: MeshBody.hpp:70
Data repository keys.
Definition: MeshBody.hpp:90
double real64
64-bit floating point type.
Definition: DataTypes.hpp:136
Group::wrapperMap::KeyIndex ViewKey
Type alias for KeyIndexT type used for wrapper lookups.
Definition: Group.hpp:1545
void setGlobalLengthScale(real64 scale)
Set mesh length scale used to define an absolute length tolerance.
The class is used to manage mesh body.
Definition: MeshBody.hpp:34
virtual ~MeshBody()
Destructor.
MeshBody(string const &name, Group *const parent)
Constructor for MeshBody object.
MeshLevel * CreateMeshLevel(localIndex const newLevel)
Create a new mesh level.
struct geosx::MeshBody::viewKeysStruct viewKeys
viewKeys
real64 getGlobalLengthScale() const
Get mesh length scale.
Definition: MeshBody.hpp:82
std::ptrdiff_t localIndex
Local index type (for indexing objects within an MPI partition).
Definition: DataTypes.hpp:125
dataRepository::ViewKey meshLevels
The key for MeshLevel.
Definition: MeshBody.hpp:93
MeshLevel * getMeshLevel(localIndex const level)
Get mesh level.
Definition: MeshBody.hpp:63