1 /*---------------------------------------------------------------------------*\
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 -------------------------------------------------------------------------------
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/>.
25 Foam::pointFieldReconstructor
28 Point field reconstructor.
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class pointFieldReconstructor Declaration
50 \*---------------------------------------------------------------------------*/
52 class pointFieldReconstructor
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
77 const pointFieldReconstructor&
80 //- Disallow default bitwise assignment
81 void operator=(const pointFieldReconstructor&);
86 class pointPatchFieldReconstructor
88 public PointPatchFieldMapper
91 label sizeBeforeMapping_;
98 //- Construct given size
99 pointPatchFieldReconstructor
102 const label sizeBeforeMapping
106 sizeBeforeMapping_(sizeBeforeMapping)
112 virtual label size() const
117 virtual label sizeBeforeMapping() const
119 return sizeBeforeMapping_;
122 virtual bool direct() const
127 virtual const unallocLabelList& directAddressing() const
129 return unallocLabelList::null();
136 //- Construct from components
137 pointFieldReconstructor
139 const pointMesh& mesh,
140 const PtrList<pointMesh>& procMeshes,
141 const PtrList<labelIOList>& pointProcAddressing,
142 const PtrList<labelIOList>& boundaryProcAddressing
148 //- Reconstruct field
150 tmp<GeometricField<Type, pointPatchField, pointMesh> >
151 reconstructField(const IOobject& fieldIoObject);
153 //- Reconstruct and write all fields
155 void reconstructFields(const IOobjectList& objects);
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 } // End namespace Foam
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 # include "pointFieldReconstructorReconstructFields.C"
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 // ************************************************************************* //