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 tetPointFieldReconstructor
28 Tet point field reconstructor.
31 tetPointFieldReconstructor.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef tetPointFieldReconstructor_H
36 #define tetPointFieldReconstructor_H
39 #include "objectRegistry.H"
41 #include "tetPolyMesh.H"
42 #include "tetPointMesh.H"
43 #include "elementMesh.H"
44 #include "IOobjectList.H"
45 #include "tetPolyPatchFields.H"
46 #include "elementPatchFields.H"
47 #include "PointPatchFieldMapper.H"
48 #include "GeometricField.H"
49 #include "labelIOList.H"
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 /*---------------------------------------------------------------------------*\
57 Class tetPointFieldReconstructor Declaration
58 \*---------------------------------------------------------------------------*/
60 class tetPointFieldReconstructor
64 //- Reconstructed mesh reference
65 const tetPolyMesh& mesh_;
67 //- List of processor meshes
68 const PtrList<tetPolyMesh>& procMeshes_;
70 //- List of processor point addressing lists
71 const PtrList<labelIOList>& pointProcAddressing_;
73 //- List of processor face addressing lists
74 const PtrList<labelIOList>& faceProcAddressing_;
76 //- List of processor cell addressing lists
77 const PtrList<labelIOList>& cellProcAddressing_;
79 //- List of processor boundary addressing lists
80 const PtrList<labelIOList>& boundaryProcAddressing_;
83 // Private Member Functions
85 //- Disallow default bitwise copy construct
86 tetPointFieldReconstructor
88 const tetPointFieldReconstructor&
91 //- Disallow default bitwise assignment
92 void operator=(const tetPointFieldReconstructor&);
94 //- Processor-to-global addressing for all points
95 labelList procAddressing(const label procNo) const;
97 //- Patch-to-patch addressing
98 labelList procPatchAddressing
100 const labelList& procToGlobalAddr,
108 class tetPolyPatchFieldReconstructor
110 public PointPatchFieldMapper
113 label sizeBeforeMapping_;
119 //- Construct given addressing
120 tetPolyPatchFieldReconstructor
123 const label sizeBeforeMapping
127 sizeBeforeMapping_(sizeBeforeMapping)
133 virtual label size() const
138 virtual label sizeBeforeMapping() const
140 return sizeBeforeMapping_;
143 virtual bool direct() const
148 virtual const unallocLabelList& directAddressing() const
150 return unallocLabelList::null();
157 //- Construct from components
158 tetPointFieldReconstructor
161 const PtrList<tetPolyMesh>& procMeshes,
162 const PtrList<labelIOList>& pointProcAddressing,
163 const PtrList<labelIOList>& faceProcAddressing,
164 const PtrList<labelIOList>& cellProcAddressing,
165 const PtrList<labelIOList>& boundaryProcAddressing
171 //- Reconstruct point field
173 tmp<GeometricField<Type, tetPolyPatchField, tetPointMesh> >
174 reconstructTetPointField
176 const IOobject& fieldIoObject
179 //- Reconstruct element field
181 tmp<GeometricField<Type, elementPatchField, elementMesh> >
182 reconstructElementField
184 const IOobject& fieldIoObject
187 //- Reconstruct and write all point fields
189 void reconstructTetPointFields
191 const IOobjectList& objects
194 //- Reconstruct and write all element fields
196 void reconstructElementFields
198 const IOobjectList& objects
203 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
205 } // End namespace Foam
207 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 # include "tetPointFieldReconstructorReconstructFields.C"
213 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
217 // ************************************************************************* //