Loading...
Searching...
No Matches
processorFaMeshes.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) 2025 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::processorFaMeshes
29
30Description
31 Container for finite-area processor mesh addressing.
32
33Author
34 Zeljko Tukovic, FSB Zagreb
35
36SourceFiles
37 processorFaMeshes.cxx
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef Foam_processorFaMeshes_H
42#define Foam_processorFaMeshes_H
43
44#include "PtrList.H"
45#include "faMesh.H"
46#include "fvMesh.H"
47#include "IOobjectList.H"
48#include "labelIOList.H"
49
50// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51
52namespace Foam
53{
55/*---------------------------------------------------------------------------*\
56 Class processorFaMeshes Declaration
57\*---------------------------------------------------------------------------*/
58
59class processorFaMeshes
60{
61 // Private Data
62
63 //- The area-region name
64 const word areaName_;
65
66 //- List of processor volume meshes (could/should be polyMesh)
67 const UPtrList<fvMesh>& volMeshes_;
68
69 //- List of processor finite area meshes
70 PtrList<faMesh> meshes_;
71
72 //- List of processor point addressing lists
73 PtrList<labelIOList> pointProcAddressing_;
74
75 //- List of processor face addressing lists
76 PtrList<labelIOList> edgeProcAddressing_;
77
78 //- List of processor cell addressing lists
79 PtrList<labelIOList> faceProcAddressing_;
80
81 //- List of processor boundary addressing lists
82 PtrList<labelIOList> boundaryProcAddressing_;
83
84
85 // Private Member Functions
86
87 //- Read all meshes
88 void read();
89
90 //- No copy construct
91 processorFaMeshes(const processorFaMeshes&) = delete;
92
93 //- No copy assignment
94 void operator=(const processorFaMeshes&) = delete;
95
96
97public:
98
99 // Constructors
100
101 //- Construct from components
102 explicit processorFaMeshes
103 (
105 const UPtrList<fvMesh>& procVolMeshes,
107 const word& areaName = word()
108 );
109
110
111 // Member Functions
112
113 //- The area-region name
114 const word& name() const noexcept { return areaName_; }
115
116 //- The number of processors used
117 label nProcs() const noexcept { return volMeshes_.size(); }
118
119 //- The processor finite-area meshes
120 const PtrList<faMesh>& meshes() const noexcept
121 {
122 return meshes_;
123 }
124
125 //- The processor finite-area meshes
127 {
128 return meshes_;
129 }
130
131 const PtrList<labelIOList>& pointProcAddressing() const noexcept
132 {
133 return pointProcAddressing_;
134 }
135
137 {
138 return edgeProcAddressing_;
139 }
140
142 {
143 return faceProcAddressing_;
144 }
145
147 {
148 return boundaryProcAddressing_;
149 }
150
152 //- Helper: remove all procAddressing files from mesh instance
153 static void removeFiles(const faMesh& mesh);
154};
155
157// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158
159} // End namespace Foam
160
161// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162
163#endif
164
165// ************************************************************************* //
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
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Definition faMesh.H:140
const PtrList< labelIOList > & boundaryProcAddressing() const noexcept
processorFaMeshes(const UPtrList< fvMesh > &procVolMeshes, const word &areaName=word())
Construct from components.
const PtrList< faMesh > & meshes() const noexcept
The processor finite-area meshes.
const PtrList< labelIOList > & pointProcAddressing() const noexcept
label nProcs() const noexcept
The number of processors used.
const PtrList< labelIOList > & faceProcAddressing() const noexcept
static void removeFiles(const faMesh &mesh)
Helper: remove all procAddressing files from mesh instance.
const word & name() const noexcept
The area-region name.
PtrList< faMesh > & meshes() noexcept
The processor finite-area meshes.
PtrList< labelIOList > & edgeProcAddressing() noexcept
A class for handling words, derived from Foam::string.
Definition word.H:66
dynamicFvMesh & mesh
Namespace for OpenFOAM.
const direction noexcept
Definition scalarImpl.H:265