1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
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
13 the Free Software Foundation, either version 3 of the License, or
14 (at your 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, 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
64 labelList directAddressing_;
70 //- Construct given addressing
73 const pointPatch& completeMeshPatch,
74 const pointPatch& procMeshPatch,
75 const labelList& directAddr
83 return directAddressing_.size();
91 const labelUList& directAddressing() const
93 return directAddressing_;
102 //- Reference to complete mesh
103 const pointMesh& completeMesh_;
105 //- Reference to processor mesh
106 const pointMesh& procMesh_;
108 //- Reference to point addressing
109 const labelList& pointAddressing_;
111 //- Reference to boundary addressing
112 const labelList& boundaryAddressing_;
114 //- List of patch field decomposers
115 List<patchFieldDecomposer*> patchFieldDecomposerPtrs_;
118 // Private Member Functions
120 //- Disallow default bitwise copy construct
121 pointFieldDecomposer(const pointFieldDecomposer&);
123 //- Disallow default bitwise assignment
124 void operator=(const pointFieldDecomposer&);
131 //- Construct from components
134 const pointMesh& completeMesh,
135 const pointMesh& procMesh,
136 const labelList& pointAddressing,
137 const labelList& boundaryAddressing
142 ~pointFieldDecomposer();
147 //- Decompose point field
149 tmp<GeometricField<Type, pointPatchField, pointMesh> >
152 const GeometricField<Type, pointPatchField, pointMesh>&
155 template<class GeoField>
156 void decomposeFields(const PtrList<GeoField>& fields) const;
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 } // End namespace Foam
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 # include "pointFieldDecomposerDecomposeFields.C"
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 // ************************************************************************* //