GEOS
MeshLevel.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2018-2019 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2019 The Board of Trustees of the Leland Stanford Junior University
7  * Copyright (c) 2018-2019 Total, S.A
8  * Copyright (c) 2019- GEOS/GEOSX Contributors
9  * All right reserved
10  *
11  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
12  * ------------------------------------------------------------------------------------------------------------
13  */
14 
19 #ifndef GEOS_LINEARALGEBRA_MULTISCALE_MULTISCALEMESHLEVEL_HPP
20 #define GEOS_LINEARALGEBRA_MULTISCALE_MULTISCALEMESHLEVEL_HPP
21 
22 #include "common/DataTypes.hpp"
24 #include "MeshObjectManager.hpp"
26 
27 namespace geos
28 {
29 
30 class DomainPartition;
31 class MeshLevel;
32 
33 namespace multiscale
34 {
35 
46 class MeshLevel
47 {
48 public:
49 
54  explicit MeshLevel( string const & name );
55 
59  MeshObjectManager & cellManager() { return m_cellManager; }
60 
64  MeshObjectManager const & cellManager() const { return m_cellManager; }
65 
69  MeshObjectManager & nodeManager() { return m_nodeManager; }
70 
74  MeshObjectManager const & nodeManager() const { return m_nodeManager; }
75 
83 
92  string_array const & boundaryNodeSets );
93 
99  void writeCellData( std::vector< string > const & fieldNames, int depth = 0 ) const;
100 
106  void writeNodeData( std::vector< string > const & fieldNames, int depth = 0 ) const;
107 
111  string const & name() const { return m_name; }
112 
116  DomainPartition * domain() const { return m_domain; }
117 
121  multiscale::MeshLevel * fineMesh() const { return m_fineMesh; }
122 
123 private:
124 
125  void writeCellDataFine( std::vector< string > const & fieldNames, int depth ) const;
126  void writeCellDataCoarse( std::vector< string > const & fieldNames, int depth ) const;
127  void writeNodeDataFine( std::vector< string > const & fieldNames, int depth ) const;
128  void writeNodeDataCoarse( std::vector< string > const & fieldNames, int depth ) const;
129 
130  string m_name;
131 
132  conduit::Node m_rootNode;
133  dataRepository::Group m_root;
134 
135  MeshObjectManager m_cellManager;
136  MeshObjectManager m_nodeManager;
137 
138  DomainPartition * m_domain{};
139  geos::DofManager::FieldSupport m_support{};
140  multiscale::MeshLevel * m_fineMesh{};
141 };
142 
143 } // namespace multiscale
144 } // namespace geos
145 
146 #endif //GEOS_LINEARALGEBRA_MULTISCALE_MULTISCALEMESHLEVEL_HPP
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
Lightweight non-owning wrapper over a contiguous range of elements.
Definition: Span.hpp:42
Multiscale mesh level.
Definition: MeshLevel.hpp:47
string const & name() const
Definition: MeshLevel.hpp:111
multiscale::MeshLevel * fineMesh() const
Definition: MeshLevel.hpp:121
MeshObjectManager const & cellManager() const
Definition: MeshLevel.hpp:64
void buildFineMesh(DomainPartition &domain, Span< geos::DofManager::FieldSupport const > const support)
Construct the finest level mesh representation at this level.
DomainPartition * domain() const
Definition: MeshLevel.hpp:116
void writeNodeData(std::vector< string > const &fieldNames, int depth=0) const
Push node data to finer levels.
MeshObjectManager & cellManager()
Definition: MeshLevel.hpp:59
void writeCellData(std::vector< string > const &fieldNames, int depth=0) const
Push cell data to finer levels.
MeshObjectManager & nodeManager()
Definition: MeshLevel.hpp:69
MeshLevel(string const &name)
Constructor.
MeshObjectManager const & nodeManager() const
Definition: MeshLevel.hpp:74
void buildCoarseMesh(multiscale::MeshLevel &fineMesh, LinearSolverParameters::Multiscale::Coarsening const &params, string_array const &boundaryNodeSets)
Construct a coarse mesh representation at this level.
Mesh object manager used in multiscale preconditioners to keep a simplified (node/cell only) represen...
stdVector< string > string_array
A 1-dimensional array of geos::string types.
Definition: DataTypes.hpp:361
Describes field support on a single mesh body/level.
Definition: DofManager.hpp:69