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::mapDistributeLagrangian
29 Class containing mesh-to-mesh mapping information for particles
32 mapDistributeLagrangian.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef mapDistributeLagrangian_H
37 #define mapDistributeLagrangian_H
39 #include "mapDistribute.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class mapDistributeLagrangian Declaration
50 \*---------------------------------------------------------------------------*/
52 class mapDistributeLagrangian
56 //- Map to distribute particles
57 const mapDistribute particleMap_;
59 //- Per element in subsetted mesh the cell label
60 const labelListList constructCellLabels_;
67 //- Construct from components
68 mapDistributeLagrangian
70 const label nNewParticles,
71 const labelListList& subParticleMap,
72 const labelListList& constructParticleMap,
73 const labelListList& constructCellLabels
76 particleMap_(nNewParticles, subParticleMap, constructParticleMap),
77 constructCellLabels_(constructCellLabels)
80 //- Construct from components and steal storage
81 mapDistributeLagrangian
83 const label nNewParticles,
84 labelListList& subParticleMap,
85 labelListList& constructParticleMap,
86 labelListList& constructCellLabels,
97 constructCellLabels_(constructCellLabels, reUse)
106 const mapDistribute& particleMap() const
111 //- Per received particle the destination cell label
112 const labelListList& constructCellLabels() const
114 return constructCellLabels_;
120 //- distribute list of lagrangian data
122 void distributeLagrangianData(List<T>& lst) const
124 particleMap_.distribute(lst);
127 //- Correct for topo change.
128 void updateMesh(const mapPolyMesh&)
132 "mapDistributeLagrangian::updateMesh(const mapPolyMesh&)"
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 } // End namespace Foam
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146 // ************************************************************************* //