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::mapDistributeLagrangian
28 Class containing mesh-to-mesh mapping information for particles
31 mapDistributeLagrangian.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef mapDistributeLagrangian_H
36 #define mapDistributeLagrangian_H
38 #include "mapDistribute.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 /*---------------------------------------------------------------------------*\
48 Class mapDistributeLagrangian Declaration
49 \*---------------------------------------------------------------------------*/
51 class mapDistributeLagrangian
55 //- Map to distribute particles
56 const mapDistribute particleMap_;
58 //- Per element in subsetted mesh the cell label
59 const labelListList constructCellLabels_;
66 //- Construct from components
67 mapDistributeLagrangian
69 const label nNewParticles,
70 const Xfer<labelListList>& subParticleMap,
71 const Xfer<labelListList>& constructParticleMap,
72 const Xfer<labelListList>& constructCellLabels
75 particleMap_(nNewParticles, subParticleMap, constructParticleMap),
76 constructCellLabels_(constructCellLabels)
85 const mapDistribute& particleMap() const
90 //- Per received particle the destination cell label
91 const labelListList& constructCellLabels() const
93 return constructCellLabels_;
99 //- distribute list of lagrangian data
101 void distributeLagrangianData(List<T>& lst) const
103 particleMap_.distribute(lst);
106 //- Correct for topo change.
107 void updateMesh(const mapPolyMesh&)
111 "mapDistributeLagrangian::updateMesh(const mapPolyMesh&)"
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 } // End namespace Foam
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 // ************************************************************************* //