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::lagrangianFieldDecomposer
28 Lagrangian field decomposer.
31 lagrangianFieldDecomposer.C
32 lagrangianFieldDecomposerDecomposeFields.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef lagrangianFieldDecomposer_H
37 #define lagrangianFieldDecomposer_H
39 #include "CloudTemplate.H"
40 #include "indexedParticle.H"
41 #include "passiveParticle.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 /*---------------------------------------------------------------------------*\
51 Class lagrangianFieldDecomposer Declaration
52 \*---------------------------------------------------------------------------*/
54 class lagrangianFieldDecomposer
58 //- Reference to processor mesh
59 const polyMesh& procMesh_;
61 //- Lagrangian positions for this processor
62 Cloud<passiveParticle> positions_;
64 //- The indices of the particles on this processor
65 labelList particleIndices_;
68 // Private Member Functions
70 //- Disallow default bitwise copy construct
71 lagrangianFieldDecomposer(const lagrangianFieldDecomposer&);
73 //- Disallow default bitwise assignment
74 void operator=(const lagrangianFieldDecomposer&);
81 //- Construct from components
82 lagrangianFieldDecomposer
85 const polyMesh& procMesh,
86 const labelList& cellProcAddressing,
87 const word& cloudName,
88 const Cloud<indexedParticle>& lagrangianPositions,
89 const List<SLList<indexedParticle*>*>& cellParticles
95 // Read the fields and hold on the pointer list
97 static void readFields
100 const IOobjectList& lagrangianObjects,
101 PtrList<PtrList<IOField<Type> > >& lagrangianFields
102 // PtrList<IOField<Type> >& lagrangianFields
105 //- Decompose volume field
107 tmp<IOField<Type> > decomposeField
109 const word& cloudName,
110 const IOField<Type>& field
113 template<class GeoField>
116 const word& cloudName,
117 const PtrList<GeoField>& fields
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 } // End namespace Foam
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 # include "lagrangianFieldDecomposerDecomposeFields.C"
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 // ************************************************************************* //