processorMeshes.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) 2011-2014 OpenFOAM Foundation
9  Copyright (C) 2016,2024 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::processorMeshes
29 
30 Description
31  Container for processor mesh addressing.
32 
33 SourceFiles
34  processorMeshes.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef Foam_processorMeshes_H
39 #define Foam_processorMeshes_H
40 
41 #include "PtrList.H"
42 #include "fvMesh.H"
43 #include "IOobjectList.H"
44 #include "labelIOList.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class processorMeshes Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class processorMeshes
56 {
57  // Private Data
58 
59  const word meshName_;
60 
61  //- Processor databases
62  PtrList<Time>& databases_;
63 
64  //- List of processor meshes
65  PtrList<fvMesh> meshes_;
66 
67  //- List of processor point addressing lists
68  PtrList<labelIOList> pointProcAddressing_;
69 
70  //- List of processor face addressing lists
71  PtrList<labelIOList> faceProcAddressing_;
72 
73  //- List of processor cell addressing lists
74  PtrList<labelIOList> cellProcAddressing_;
75 
76  //- List of processor boundary addressing lists
77  PtrList<labelIOList> boundaryProcAddressing_;
78 
79 
80  // pointMesh
81 
82  //- List of processor meshes
83  PtrList<pointMesh> pMeshes_;
84 
85  //- List of processor boundary addressing lists for pointMeshes
86  PtrList<labelIOList> pBoundaryProcAddressing_;
87 
88 
89  // Private Member Functions
90 
91  //- Read all meshes
92  void read();
93 
94  //- No copy construct
95  processorMeshes(const processorMeshes&) = delete;
96 
97  //- No copy assignment
98  void operator=(const processorMeshes&) = delete;
99 
100 
101 public:
102 
103  //- Runtime type information
104  ClassName("processorMeshes");
105 
106 
107  // Constructors
108 
109  //- Construct from components
110  processorMeshes(PtrList<Time>& databases, const word& meshName);
111 
112 
113  // Member Functions
114 
115  //- Update the meshes based on the mesh files saved in time directories
117 
118  //- Reconstruct point position after motion in parallel
119  void reconstructPoints(fvMesh&);
120 
121  const PtrList<fvMesh>& meshes() const noexcept
122  {
123  return meshes_;
124  }
125 
127  {
128  return meshes_;
129  }
130 
132  {
133  return pointProcAddressing_;
134  }
135 
137  {
138  return faceProcAddressing_;
139  }
140 
142  {
143  return cellProcAddressing_;
144  }
145 
147  {
148  return boundaryProcAddressing_;
149  }
150 
152  // pointMesh
153 
155  {
156  return pMeshes_;
157  }
158 
160  const noexcept
161  {
162  return pBoundaryProcAddressing_;
163  }
164 
165 
166  //- Helper: remove all procAddressing files from mesh instance
167  static void removeFiles(const polyMesh& mesh);
168 };
169 
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 } // End namespace Foam
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 #endif
178 
179 // ************************************************************************* //
const PtrList< labelIOList > & boundaryProcAddressing() const noexcept
static void removeFiles(const polyMesh &mesh)
Helper: remove all procAddressing files from mesh instance.
polyMesh::readUpdateState readUpdate()
Update the meshes based on the mesh files saved in time directories.
PtrList< labelIOList > & faceProcAddressing() noexcept
dynamicFvMesh & mesh
A class for handling words, derived from Foam::string.
Definition: word.H:63
Container for processor mesh addressing.
void reconstructPoints(fvMesh &)
Reconstruct point position after motion in parallel.
const direction noexcept
Definition: scalarImpl.H:255
const PtrList< labelIOList > & cellProcAddressing() const noexcept
const PtrList< fvMesh > & meshes() const noexcept
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Definition: List.H:54
const PtrList< pointMesh > & pointMeshes() const noexcept
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
const PtrList< labelIOList > & pointProcAddressing() const noexcept
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:75
readUpdateState
Enumeration defining the state of the mesh after a read update.
Definition: polyMesh.H:91
ClassName("processorMeshes")
Runtime type information.
Namespace for OpenFOAM.
const PtrList< labelIOList > & pointMeshBoundaryProcAddressing() const noexcept