Upgrade case file headers
[foam-extend-3.2.git] / applications / utilities / parallelProcessing / reconstructPar / pointFieldReconstructor.H
blob67593576190189385a1cbe8e4bf6c2dc5fc0e73d
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation, either version 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::pointFieldReconstructor
27 Description
28     Point field reconstructor.
30 SourceFiles
31     pointFieldReconstructor.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef pointFieldReconstructor_H
36 #define pointFieldReconstructor_H
38 #include "pointMesh.H"
39 #include "pointFields.H"
40 #include "PointPatchFieldMapperPatchRef.H"
41 #include "IOobjectList.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 /*---------------------------------------------------------------------------*\
49                      Class pointFieldReconstructor Declaration
50 \*---------------------------------------------------------------------------*/
52 class pointFieldReconstructor
54     // Private data
56         //- Reconstructed mesh reference
57         const pointMesh& mesh_;
59         //- List of processor meshes
60         const PtrList<pointMesh>& procMeshes_;
62         //- List of processor point addressing lists
63         const PtrList<labelIOList>& pointProcAddressing_;
65         //- List of processor boundary addressing lists
66         const PtrList<labelIOList>& boundaryProcAddressing_;
68         //- Point patch addressing
69         labelListListList patchPointAddressing_;
72     // Private Member Functions
74         //- Disallow default bitwise copy construct
75         pointFieldReconstructor
76         (
77             const pointFieldReconstructor&
78         );
80         //- Disallow default bitwise assignment
81         void operator=(const pointFieldReconstructor&);
84 public:
86         class pointPatchFieldReconstructor
87         :
88             public PointPatchFieldMapper
89         {
90             label size_;
91             label sizeBeforeMapping_;
94         public:
96             // Constructors
98                 //- Construct given size
99                 pointPatchFieldReconstructor
100                 (
101                     const label size,
102                     const label sizeBeforeMapping
103                 )
104                 :
105                     size_(size),
106                     sizeBeforeMapping_(sizeBeforeMapping)
107                 {}
110             // Member functions
112                 virtual label size() const
113                 {
114                     return size_;
115                 }
117                 virtual label sizeBeforeMapping() const
118                 {
119                     return sizeBeforeMapping_;
120                 }
122                 virtual bool direct() const
123                 {
124                     return true;
125                 }
127                 virtual const unallocLabelList& directAddressing() const
128                 {
129                     return unallocLabelList::null();
130                 }
131         };
134     // Constructors
136         //- Construct from components
137         pointFieldReconstructor
138         (
139             const pointMesh& mesh,
140             const PtrList<pointMesh>& procMeshes,
141             const PtrList<labelIOList>& pointProcAddressing,
142             const PtrList<labelIOList>& boundaryProcAddressing
143         );
146     // Member Functions
148         //- Reconstruct field
149         template<class Type>
150         tmp<GeometricField<Type, pointPatchField, pointMesh> >
151         reconstructField(const IOobject& fieldIoObject);
153         //- Reconstruct and write all fields
154         template<class Type>
155         void reconstructFields(const IOobjectList& objects);
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 } // End namespace Foam
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 #ifdef NoRepository
166 #   include "pointFieldReconstructorReconstructFields.C"
167 #endif
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 #endif
173 // ************************************************************************* //