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::pointFieldDecomposer
29 Point field decomposer.
32 pointFieldDecomposer.C
33 pointFieldDecomposerDecomposeFields.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef pointFieldDecomposer_H
38 #define pointFieldDecomposer_H
40 #include "pointMesh.H"
41 #include "PointPatchFieldMapperPatchRef.H"
42 #include "pointFields.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class pointFieldDecomposer Declaration
51 \*---------------------------------------------------------------------------*/
53 class pointFieldDecomposer
58 //- Point patch field decomposer class
59 class patchFieldDecomposer
61 public PointPatchFieldMapperPatchRef<pointPatch>
65 //- Size before mapping
66 label sizeBeforeMapping_;
68 //- Reference to direct addressing
69 labelList directAddressing_;
76 //- Construct given addressing
79 const pointPatch& completeMeshPatch,
80 const pointPatch& procMeshPatch,
81 const labelList& directAddr
89 return directAddressing_.size();
92 virtual label sizeBeforeMapping() const
94 return sizeBeforeMapping_;
102 const unallocLabelList& directAddressing() const
104 return directAddressing_;
113 //- Reference to complete mesh
114 const pointMesh& completeMesh_;
116 //- Reference to processor mesh
117 const pointMesh& procMesh_;
119 //- Reference to point addressing
120 const labelList& pointAddressing_;
122 //- Reference to boundary addressing
123 const labelList& boundaryAddressing_;
125 //- List of patch field decomposers
126 List<patchFieldDecomposer*> patchFieldDecomposerPtrs_;
129 // Private Member Functions
131 //- Disallow default bitwise copy construct
132 pointFieldDecomposer(const pointFieldDecomposer&);
134 //- Disallow default bitwise assignment
135 void operator=(const pointFieldDecomposer&);
142 //- Construct from components
145 const pointMesh& completeMesh,
146 const pointMesh& procMesh,
147 const labelList& pointAddressing,
148 const labelList& boundaryAddressing
154 ~pointFieldDecomposer();
159 //- Decompose point field
161 tmp<GeometricField<Type, pointPatchField, pointMesh> >
164 const GeometricField<Type, pointPatchField, pointMesh>&
167 template<class GeoField>
168 void decomposeFields(const PtrList<GeoField>& fields) const;
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 } // End namespace Foam
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 # include "pointFieldDecomposerDecomposeFields.C"
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 // ************************************************************************* //