faGlobalMeshData.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2016-2017 Wikki Ltd
9  Copyright (C) 2022 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::faGlobalMeshData
29 
30 Description
31  Various mesh related information for a parallel run
32 
33 Author
34  Zeljko Tukovic, FMENA
35  Hrvoje Jasak, Wikki Ltd.
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef Foam_faGlobalMeshData_H
40 #define Foam_faGlobalMeshData_H
41 
42 #include "processorTopology.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 // Class Declarations
50 class faMesh;
51 
52 /*---------------------------------------------------------------------------*\
53  Class faGlobalMeshData Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class faGlobalMeshData
57 {
58  // Private Data
59 
60  //- Reference to mesh
61  const faMesh& mesh_;
62 
63  //- The processor/processor topology
64  processorTopology processorTopology_;
65 
66 
67  // Globally shared point addressing
68 
69  //- Total number of global points
70  label nGlobalPoints_;
71 
72  //- Indices of local points that are globally shared
73  labelList sharedPointLabels_;
74 
75  //- Indices of globally shared points in the master list
76  // This list contains all the shared points in the mesh
77  labelList sharedPointAddr_;
78 
79 
80  // Private Member Functions
81 
82  //- No copy construct
83  faGlobalMeshData(const faGlobalMeshData&) = delete;
84 
85  //- No copy assignment
86  void operator=(const faGlobalMeshData&) = delete;
87 
88 
89 public:
90 
91  //- Runtime type information
92  ClassName("faGlobalMeshData");
93 
94 
95  // Constructors
96 
97  //- Construct from mesh
98  explicit faGlobalMeshData(const faMesh& mesh);
99 
100 
101  //- Destructor
103 
104 
105  // Member Functions
106 
107  // Access
108 
109  //- Return mesh reference
110  const faMesh& mesh() const noexcept;
111 
112 
113  // Processor-Topology
114 
115  //- The processor to processor topology.
116  const processorTopology& topology() const noexcept
117  {
118  return processorTopology_;
119  }
120 
121  //- Order in which the patches should be initialised/evaluated
122  //- corresponding to the schedule
123  const lduSchedule& patchSchedule() const noexcept
124  {
125  return processorTopology_.patchSchedule();
126  }
127 
128 
129  // Globally shared point addressing
130 
131  //- Return number of globally shared points
132  label nGlobalPoints() const noexcept
133  {
134  return nGlobalPoints_;
135  }
136 
137  //- Return indices of local points that are globally shared
138  const labelList& sharedPointLabels() const noexcept
139  {
140  return sharedPointLabels_;
141  }
142 
143  //- Return addressing into the complete globally shared points list
144  const labelList& sharedPointAddr() const noexcept
145  {
146  return sharedPointAddr_;
147  }
148 
149  //- Change global mesh data given a topological change.
150  void updateMesh();
151 };
152 
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 } // End namespace Foam
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 #endif
161 
162 // ************************************************************************* //
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Definition: faMesh.H:87
label nGlobalPoints() const noexcept
Return number of globally shared points.
const labelList & sharedPointLabels() const noexcept
Return indices of local points that are globally shared.
Various mesh related information for a parallel run.
const lduSchedule & patchSchedule() const noexcept
Order in which the patches should be initialised/evaluated corresponding to the schedule.
const faMesh & mesh() const noexcept
Return mesh reference.
~faGlobalMeshData()
Destructor.
const lduSchedule & patchSchedule() const noexcept
Order in which the patches should be initialised/evaluated corresponding to the schedule.
const labelList & sharedPointAddr() const noexcept
Return addressing into the complete globally shared points list.
ClassName("faGlobalMeshData")
Runtime type information.
const direction noexcept
Definition: Scalar.H:258
Determines/represents processor-processor connection. After instantiation contains the processor-proc...
void updateMesh()
Change global mesh data given a topological change.
const processorTopology & topology() const noexcept
The processor to processor topology.
Namespace for OpenFOAM.