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::lagrangianFieldDecomposer
29 Lagrangian field decomposer.
32 lagrangianFieldDecomposer.C
33 lagrangianFieldDecomposerDecomposeFields.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef lagrangianFieldDecomposer_H
38 #define lagrangianFieldDecomposer_H
41 #include "indexedParticle.H"
42 #include "passiveParticle.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 /*---------------------------------------------------------------------------*\
52 Class lagrangianFieldDecomposer Declaration
53 \*---------------------------------------------------------------------------*/
55 class lagrangianFieldDecomposer
59 //- Reference to processor mesh
60 const polyMesh& procMesh_;
62 //- Lagrangian positions for this processor
63 Cloud<passiveParticle> positions_;
65 //- The indices of the particles on this processor
66 labelList particleIndices_;
69 // Private Member Functions
71 //- Disallow default bitwise copy construct
72 lagrangianFieldDecomposer(const lagrangianFieldDecomposer&);
74 //- Disallow default bitwise assignment
75 void operator=(const lagrangianFieldDecomposer&);
82 //- Construct from components
83 lagrangianFieldDecomposer
86 const polyMesh& procMesh,
87 const labelList& cellProcAddressing,
88 const word& cloudName,
89 const Cloud<indexedParticle>& lagrangianPositions,
90 const List<SLList<indexedParticle*>*>& cellParticles
96 // Read the fields and hold on the pointer list
98 static void readFields
101 const IOobjectList& lagrangianObjects,
102 PtrList<PtrList<IOField<Type> > >& lagrangianFields
103 // PtrList<IOField<Type> >& lagrangianFields
106 //- Decompose volume field
108 tmp<IOField<Type> > decomposeField
110 const word& cloudName,
111 const IOField<Type>& field
114 template<class GeoField>
117 const word& cloudName,
118 const PtrList<GeoField>& fields
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 } // End namespace Foam
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 # include "lagrangianFieldDecomposerDecomposeFields.C"
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 // ************************************************************************* //