1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
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
65 labelList directAddressing_;
71 //- Construct given addressing
74 const pointPatch& completeMeshPatch,
75 const pointPatch& procMeshPatch,
76 const labelList& directAddr
84 return directAddressing_.size();
92 const unallocLabelList& directAddressing() const
94 return directAddressing_;
103 //- Reference to complete mesh
104 const pointMesh& completeMesh_;
106 //- Reference to processor mesh
107 const pointMesh& procMesh_;
109 //- Reference to point addressing
110 const labelList& pointAddressing_;
112 //- Reference to boundary addressing
113 const labelList& boundaryAddressing_;
115 //- List of patch field decomposers
116 List<patchFieldDecomposer*> patchFieldDecomposerPtrs_;
119 // Private Member Functions
121 //- Disallow default bitwise copy construct
122 pointFieldDecomposer(const pointFieldDecomposer&);
124 //- Disallow default bitwise assignment
125 void operator=(const pointFieldDecomposer&);
132 //- Construct from components
135 const pointMesh& completeMesh,
136 const pointMesh& procMesh,
137 const labelList& pointAddressing,
138 const labelList& boundaryAddressing
144 ~pointFieldDecomposer();
149 //- Decompose point field
151 tmp<GeometricField<Type, pointPatchField, pointMesh> >
154 const GeometricField<Type, pointPatchField, pointMesh>&
157 template<class GeoField>
158 void decomposeFields(const PtrList<GeoField>& fields) const;
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 } // End namespace Foam
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 # include "pointFieldDecomposerDecomposeFields.C"
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 // ************************************************************************* //