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
26 Foam::pointFieldReconstructor
29 Point field reconstructor.
32 pointFieldReconstructor.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef pointFieldReconstructor_H
37 #define pointFieldReconstructor_H
39 #include "pointMesh.H"
40 #include "pointFields.H"
41 #include "PointPatchFieldMapperPatchRef.H"
42 #include "IOobjectList.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class pointFieldReconstructor Declaration
51 \*---------------------------------------------------------------------------*/
53 class pointFieldReconstructor
57 //- Reconstructed mesh reference
58 const pointMesh& mesh_;
60 //- List of processor meshes
61 const PtrList<pointMesh>& procMeshes_;
63 //- List of processor point addressing lists
64 const PtrList<labelIOList>& pointProcAddressing_;
66 //- List of processor boundary addressing lists
67 const PtrList<labelIOList>& boundaryProcAddressing_;
69 //- Point patch addressing
70 labelListListList patchPointAddressing_;
73 // Private Member Functions
75 //- Disallow default bitwise copy construct
76 pointFieldReconstructor
78 const pointFieldReconstructor&
81 //- Disallow default bitwise assignment
82 void operator=(const pointFieldReconstructor&);
87 class pointPatchFieldReconstructor
89 public PointPatchFieldMapper
92 label sizeBeforeMapping_;
99 //- Construct given size
100 pointPatchFieldReconstructor
103 const label sizeBeforeMapping
107 sizeBeforeMapping_(sizeBeforeMapping)
113 virtual label size() const
118 virtual label sizeBeforeMapping() const
120 return sizeBeforeMapping_;
123 virtual bool direct() const
128 virtual const unallocLabelList& directAddressing() const
130 return unallocLabelList::null();
137 //- Construct from components
138 pointFieldReconstructor
140 const pointMesh& mesh,
141 const PtrList<pointMesh>& procMeshes,
142 const PtrList<labelIOList>& pointProcAddressing,
143 const PtrList<labelIOList>& boundaryProcAddressing
149 //- Reconstruct field
151 tmp<GeometricField<Type, pointPatchField, pointMesh> >
152 reconstructField(const IOobject& fieldIoObject);
154 //- Reconstruct and write all fields
156 void reconstructFields(const IOobjectList& objects);
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 } // End namespace Foam
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 # include "pointFieldReconstructorReconstructFields.C"
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 // ************************************************************************* //