1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM 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 2 of the License, or (at your
14 option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 Foam::fvFieldReconstructor
29 FV volume and surface field reconstructor.
32 fvFieldReconstructor.C
33 fvFieldReconstructorReconstructFields.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef fvFieldReconstructor_H
38 #define fvFieldReconstructor_H
42 #include "IOobjectList.H"
43 #include "fvPatchFieldMapper.H"
44 #include "labelIOList.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 /*---------------------------------------------------------------------------*\
53 Class fvFieldReconstructor Declaration
54 \*---------------------------------------------------------------------------*/
56 class fvFieldReconstructor
60 //- Reconstructed mesh reference
63 //- List of processor meshes
64 const PtrList<fvMesh>& procMeshes_;
66 //- List of processor face addressing lists
67 const PtrList<labelIOList>& faceProcAddressing_;
69 //- List of processor cell addressing lists
70 const PtrList<labelIOList>& cellProcAddressing_;
72 //- List of processor boundary addressing lists
73 const PtrList<labelIOList>& boundaryProcAddressing_;
76 // Private Member Functions
78 //- Disallow default bitwise copy construct
79 fvFieldReconstructor(const fvFieldReconstructor&);
81 //- Disallow default bitwise assignment
82 void operator=(const fvFieldReconstructor&);
87 class fvPatchFieldReconstructor
89 public fvPatchFieldMapper
97 //- Construct given size
98 fvPatchFieldReconstructor(const label size)
116 const unallocLabelList& directAddressing() const
118 return unallocLabelList::null();
125 //- Construct from components
129 const PtrList<fvMesh>& procMeshes,
130 const PtrList<labelIOList>& faceProcAddressing,
131 const PtrList<labelIOList>& cellProcAddressing,
132 const PtrList<labelIOList>& boundaryProcAddressing
138 //- Reconstruct volume field
140 tmp<GeometricField<Type, fvPatchField, volMesh> >
141 reconstructFvVolumeField
143 const IOobject& fieldIoObject
146 //- Reconstruct surface field
148 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
149 reconstructFvSurfaceField
151 const IOobject& fieldIoObject
154 //- Reconstruct and write all/selected volume fields
156 void reconstructFvVolumeFields
158 const IOobjectList& objects,
159 const HashSet<word>& selectedFields
162 //- Reconstruct and write all/selected volume fields
164 void reconstructFvSurfaceFields
166 const IOobjectList& objects,
167 const HashSet<word>& selectedFields
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 } // End namespace Foam
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 # include "fvFieldReconstructorReconstructFields.C"
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 // ************************************************************************* //