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/>.
28 FA area and edge field reconstructor.
31 Zeljko Tukovic, FSB Zagreb. All rights reserved
34 faFieldReconstructor.C
35 faFieldReconstructorReconstructFields.C
37 \*---------------------------------------------------------------------------*/
39 #ifndef faFieldReconstructor_H
40 #define faFieldReconstructor_H
44 #include "IOobjectList.H"
45 #include "faPatchFieldMapper.H"
46 #include "labelIOList.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
54 /*---------------------------------------------------------------------------*\
55 Class faFieldReconstructor Declaration
56 \*---------------------------------------------------------------------------*/
58 class faFieldReconstructor
62 //- Reconstructed mesh reference
65 //- List of processor meshes
66 const PtrList<faMesh>& procMeshes_;
68 //- List of processor edge addressing lists
69 const PtrList<labelIOList>& edgeProcAddressing_;
71 //- List of processor face addressing lists
72 const PtrList<labelIOList>& faceProcAddressing_;
74 //- List of processor boundary addressing lists
75 const PtrList<labelIOList>& boundaryProcAddressing_;
78 // Private Member Functions
80 //- Disallow default bitwise copy construct
81 faFieldReconstructor(const faFieldReconstructor&);
83 //- Disallow default bitwise assignment
84 void operator=(const faFieldReconstructor&);
89 class faPatchFieldReconstructor
91 public faPatchFieldMapper
94 label sizeBeforeMapping_;
100 //- Construct given size
101 faPatchFieldReconstructor
104 const label sizeBeforeMapping
108 sizeBeforeMapping_(sizeBeforeMapping)
114 virtual label size() const
119 virtual label sizeBeforeMapping() const
121 return sizeBeforeMapping_;
124 virtual bool direct() const
129 virtual const unallocLabelList& directAddressing() const
131 return unallocLabelList::null();
138 //- Construct from components
142 const PtrList<faMesh>& procMeshes,
143 const PtrList<labelIOList>& edgeProcAddressing,
144 const PtrList<labelIOList>& faceProcAddressing,
145 const PtrList<labelIOList>& boundaryProcAddressing
151 //- Reconstruct area field
153 tmp<GeometricField<Type, faPatchField, areaMesh> >
154 reconstructFaAreaField
156 const IOobject& fieldIoObject
159 //- Reconstruct edge field
161 tmp<GeometricField<Type, faePatchField, edgeMesh> >
162 reconstructFaEdgeField
164 const IOobject& fieldIoObject
167 //- Reconstruct and write all area fields
169 void reconstructFaAreaFields
171 const IOobjectList& objects
174 //- Reconstruct and write all area fields
176 void reconstructFaEdgeFields
178 const IOobjectList& objects
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 } // End namespace Foam
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 # include "faFieldReconstructorReconstructFields.C"
193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
197 // ************************************************************************* //