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 Foam::pointFieldDecomposer
28 Point field decomposer.
31 pointFieldDecomposer.C
32 pointFieldDecomposerDecomposeFields.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef pointFieldDecomposer_H
37 #define pointFieldDecomposer_H
39 #include "pointMesh.H"
40 #include "PointPatchFieldMapperPatchRef.H"
41 #include "pointFields.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class pointFieldDecomposer Declaration
50 \*---------------------------------------------------------------------------*/
52 class pointFieldDecomposer
57 //- Point patch field decomposer class
58 class patchFieldDecomposer
60 public PointPatchFieldMapperPatchRef<pointPatch>
64 //- Size before mapping
65 label sizeBeforeMapping_;
67 //- Reference to direct addressing
68 labelList directAddressing_;
75 //- Construct given addressing
78 const pointPatch& completeMeshPatch,
79 const pointPatch& procMeshPatch,
80 const labelList& directAddr
88 return directAddressing_.size();
91 virtual label sizeBeforeMapping() const
93 return sizeBeforeMapping_;
101 const unallocLabelList& directAddressing() const
103 return directAddressing_;
112 //- Reference to complete mesh
113 const pointMesh& completeMesh_;
115 //- Reference to processor mesh
116 const pointMesh& procMesh_;
118 //- Reference to point addressing
119 const labelList& pointAddressing_;
121 //- Reference to boundary addressing
122 const labelList& boundaryAddressing_;
124 //- List of patch field decomposers
125 List<patchFieldDecomposer*> patchFieldDecomposerPtrs_;
128 // Private Member Functions
130 //- Disallow default bitwise copy construct
131 pointFieldDecomposer(const pointFieldDecomposer&);
133 //- Disallow default bitwise assignment
134 void operator=(const pointFieldDecomposer&);
141 //- Construct from components
144 const pointMesh& completeMesh,
145 const pointMesh& procMesh,
146 const labelList& pointAddressing,
147 const labelList& boundaryAddressing
153 ~pointFieldDecomposer();
158 //- Decompose point field
160 tmp<GeometricField<Type, pointPatchField, pointMesh> >
163 const GeometricField<Type, pointPatchField, pointMesh>&
166 template<class GeoField>
167 void decomposeFields(const PtrList<GeoField>& fields) const;
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 } // End namespace Foam
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 # include "pointFieldDecomposerDecomposeFields.C"
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 // ************************************************************************* //