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 processorMeshes_H
39 #define 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
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  //- Helper: remove all procAddressing files from mesh instance
143  static void removeFiles(const polyMesh& mesh);
144 };
145 
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 } // End namespace Foam
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 #endif
154 
155 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::processorMeshes::meshes
const PtrList< fvMesh > & meshes() const
Definition: processorMeshes.H:111
Foam::processorMeshes
Container for processor mesh addressing.
Definition: processorMeshes.H:54
IOobjectList.H
Foam::processorMeshes::reconstructPoints
void reconstructPoints(fvMesh &)
Reconstruct point position after motion in parallel.
Definition: processorMeshes.C:217
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::processorMeshes::boundaryProcAddressing
const PtrList< labelIOList > & boundaryProcAddressing() const
Definition: processorMeshes.H:136
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:59
Foam::processorMeshes::faceProcAddressing
PtrList< labelIOList > & faceProcAddressing()
Definition: processorMeshes.H:126
Foam::processorMeshes::cellProcAddressing
const PtrList< labelIOList > & cellProcAddressing() const
Definition: processorMeshes.H:131
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::processorMeshes::meshes
PtrList< fvMesh > & meshes()
Definition: processorMeshes.H:116
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::processorMeshes::readUpdate
fvMesh::readUpdateState readUpdate()
Update the meshes based on the mesh files saved in time directories.
Definition: processorMeshes.C:166
Foam::polyMesh::readUpdateState
readUpdateState
Enumeration defining the state of the mesh after a read update.
Definition: polyMesh.H:90
Foam::processorMeshes::ClassName
ClassName("processorMeshes")
Runtime type information.
labelIOList.H
Foam::processorMeshes::removeFiles
static void removeFiles(const polyMesh &mesh)
Helper: remove all procAddressing files from mesh instance.
Definition: processorMeshes.C:274
Foam::processorMeshes::pointProcAddressing
const PtrList< labelIOList > & pointProcAddressing() const
Definition: processorMeshes.H:121
PtrList.H