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 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  // Private Member Functions
81 
82  //- Read all meshes
83  void read();
84 
85  //- No copy construct
86  processorMeshes(const processorMeshes&) = delete;
87 
88  //- No copy assignment
89  void operator=(const processorMeshes&) = delete;
90 
91 
92 public:
93 
94  //- Runtime type information
95  ClassName("processorMeshes");
96 
97 
98  // Constructors
99 
100  //- Construct from components
101  processorMeshes(PtrList<Time>& databases, const word& meshName);
102 
103 
104  // Member Functions
105 
106  //- Update the meshes based on the mesh files saved in time directories
108 
109  //- Reconstruct point position after motion in parallel
110  void reconstructPoints(fvMesh&);
111 
112  const PtrList<fvMesh>& meshes() const noexcept
113  {
114  return meshes_;
115  }
116 
118  {
119  return meshes_;
120  }
121 
123  {
124  return pointProcAddressing_;
125  }
126 
128  {
129  return faceProcAddressing_;
130  }
131 
133  {
134  return cellProcAddressing_;
135  }
136 
138  {
139  return boundaryProcAddressing_;
140  }
141 
142 
143  //- Helper: remove all procAddressing files from mesh instance
144  static void removeFiles(const polyMesh& mesh);
145 };
146 
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 } // End namespace Foam
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 #endif
155 
156 // ************************************************************************* //
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: Scalar.H:258
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:55
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:74
readUpdateState
Enumeration defining the state of the mesh after a read update.
Definition: polyMesh.H:90
ClassName("processorMeshes")
Runtime type information.
Namespace for OpenFOAM.