1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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
29 FA area and edge field reconstructor.
32 Zeljko Tukovic, FSB Zagreb. All rights reserved
35 faFieldReconstructor.C
36 faFieldReconstructorReconstructFields.C
38 \*---------------------------------------------------------------------------*/
40 #ifndef faFieldReconstructor_H
41 #define faFieldReconstructor_H
45 #include "IOobjectList.H"
46 #include "faPatchFieldMapper.H"
47 #include "labelIOList.H"
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 /*---------------------------------------------------------------------------*\
56 Class faFieldReconstructor Declaration
57 \*---------------------------------------------------------------------------*/
59 class faFieldReconstructor
63 //- Reconstructed mesh reference
66 //- List of processor meshes
67 const PtrList<faMesh>& procMeshes_;
69 //- List of processor edge addressing lists
70 const PtrList<labelIOList>& edgeProcAddressing_;
72 //- List of processor face addressing lists
73 const PtrList<labelIOList>& faceProcAddressing_;
75 //- List of processor boundary addressing lists
76 const PtrList<labelIOList>& boundaryProcAddressing_;
79 // Private Member Functions
81 //- Disallow default bitwise copy construct
82 faFieldReconstructor(const faFieldReconstructor&);
84 //- Disallow default bitwise assignment
85 void operator=(const faFieldReconstructor&);
90 class faPatchFieldReconstructor
92 public faPatchFieldMapper
95 label sizeBeforeMapping_;
101 //- Construct given size
102 faPatchFieldReconstructor
105 const label sizeBeforeMapping
109 sizeBeforeMapping_(sizeBeforeMapping)
115 virtual label size() const
120 virtual label sizeBeforeMapping() const
122 return sizeBeforeMapping_;
125 virtual bool direct() const
130 virtual const unallocLabelList& directAddressing() const
132 return unallocLabelList::null();
139 //- Construct from components
143 const PtrList<faMesh>& procMeshes,
144 const PtrList<labelIOList>& edgeProcAddressing,
145 const PtrList<labelIOList>& faceProcAddressing,
146 const PtrList<labelIOList>& boundaryProcAddressing
152 //- Reconstruct area field
154 tmp<GeometricField<Type, faPatchField, areaMesh> >
155 reconstructFaAreaField
157 const IOobject& fieldIoObject
160 //- Reconstruct edge field
162 tmp<GeometricField<Type, faePatchField, edgeMesh> >
163 reconstructFaEdgeField
165 const IOobject& fieldIoObject
168 //- Reconstruct and write all area fields
170 void reconstructFaAreaFields
172 const IOobjectList& objects
175 //- Reconstruct and write all area fields
177 void reconstructFaEdgeFields
179 const IOobjectList& objects
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 } // End namespace Foam
188 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 # include "faFieldReconstructorReconstructFields.C"
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
198 // ************************************************************************* //