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