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::fvFieldReconstructor
28 FV volume and surface field reconstructor.
31 fvFieldReconstructor.C
32 fvFieldReconstructorReconstructFields.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef fvFieldReconstructor_H
37 #define fvFieldReconstructor_H
41 #include "IOobjectList.H"
42 #include "fvPatchFieldMapper.H"
43 #include "labelIOList.H"
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 /*---------------------------------------------------------------------------*\
52 Class fvFieldReconstructor Declaration
53 \*---------------------------------------------------------------------------*/
55 class fvFieldReconstructor
59 //- Reconstructed mesh reference
62 //- List of processor meshes
63 const PtrList<fvMesh>& procMeshes_;
65 //- List of processor face addressing lists
66 const PtrList<labelIOList>& faceProcAddressing_;
68 //- List of processor cell addressing lists
69 const PtrList<labelIOList>& cellProcAddressing_;
71 //- List of processor boundary addressing lists
72 const PtrList<labelIOList>& boundaryProcAddressing_;
75 // Private Member Functions
77 //- Disallow default bitwise copy construct
78 fvFieldReconstructor(const fvFieldReconstructor&);
80 //- Disallow default bitwise assignment
81 void operator=(const fvFieldReconstructor&);
86 class fvPatchFieldReconstructor
88 public fvPatchFieldMapper
91 label sizeBeforeMapping_;
97 //- Construct given size
98 fvPatchFieldReconstructor
101 const label sizeBeforeMapping
105 sizeBeforeMapping_(sizeBeforeMapping)
111 virtual label size() const
116 virtual label sizeBeforeMapping() const
118 return sizeBeforeMapping_;
121 virtual bool direct() const
126 virtual const unallocLabelList& directAddressing() const
128 return unallocLabelList::null();
135 //- Construct from components
139 const PtrList<fvMesh>& procMeshes,
140 const PtrList<labelIOList>& faceProcAddressing,
141 const PtrList<labelIOList>& cellProcAddressing,
142 const PtrList<labelIOList>& boundaryProcAddressing
148 //- Reconstruct volume field
150 tmp<GeometricField<Type, fvPatchField, volMesh> >
151 reconstructFvVolumeField
153 const IOobject& fieldIoObject
156 //- Reconstruct surface field
158 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
159 reconstructFvSurfaceField
161 const IOobject& fieldIoObject
164 //- Reconstruct and write all/selected volume fields
166 void reconstructFvVolumeFields
168 const IOobjectList& objects,
169 const HashSet<word>& selectedFields
172 //- Reconstruct and write all/selected volume fields
174 void reconstructFvSurfaceFields
176 const IOobjectList& objects,
177 const HashSet<word>& selectedFields
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 } // End namespace Foam
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 # include "fvFieldReconstructorReconstructFields.C"
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196 // ************************************************************************* //