FreeFOAM The Cross-Platform CFD Toolkit
lagrangianFieldDecomposer.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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
19  for more details.
20 
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/>.
23 
24 Class
25  Foam::lagrangianFieldDecomposer
26 
27 Description
28  Lagrangian field decomposer.
29 
30 SourceFiles
31  lagrangianFieldDecomposer.C
32  lagrangianFieldDecomposerDecomposeFields.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef lagrangianFieldDecomposer_H
37 #define lagrangianFieldDecomposer_H
38 
39 #include <lagrangian/Cloud.H>
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 class IOobjectList;
49 
50 /*---------------------------------------------------------------------------*\
51  Class lagrangianFieldDecomposer Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 {
56  // Private data
57 
58  //- Reference to processor mesh
59  const polyMesh& procMesh_;
60 
61  //- Lagrangian positions for this processor
62  Cloud<passiveParticle> positions_;
63 
64  //- The indices of the particles on this processor
65  labelList particleIndices_;
66 
67 
68  // Private Member Functions
69 
70  //- Disallow default bitwise copy construct
72 
73  //- Disallow default bitwise assignment
74  void operator=(const lagrangianFieldDecomposer&);
75 
76 
77 public:
78 
79  // Constructors
80 
81  //- Construct from components
83  (
84  const polyMesh& mesh,
85  const polyMesh& procMesh,
86  const labelList& cellProcAddressing,
87  const word& cloudName,
88  const Cloud<indexedParticle>& lagrangianPositions,
89  const List<SLList<indexedParticle*>*>& cellParticles
90  );
91 
92 
93  // Member Functions
94 
95  // Read the fields and hold on the pointer list
96  template<class Type>
97  static void readFields
98  (
99  const label cloudI,
100  const IOobjectList& lagrangianObjects,
101  PtrList<PtrList<IOField<Type> > >& lagrangianFields
102 // PtrList<IOField<Type> >& lagrangianFields
103  );
104 
105  //- Decompose volume field
106  template<class Type>
108  (
109  const word& cloudName,
110  const IOField<Type>& field
111  ) const;
112 
113  template<class GeoField>
114  void decomposeFields
115  (
116  const word& cloudName,
118  ) const;
119 };
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace Foam
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #ifdef NoRepository
130 #endif
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************ vim: set sw=4 sts=4 et: ************************ //