lagrangianFieldDecomposer.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
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  lagrangianFieldDecomposerTemplates.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef lagrangianFieldDecomposer_H
37 #define lagrangianFieldDecomposer_H
38 
39 #include "cloud.H"
40 #include "fvMesh.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 class IOobjectList;
48 
49 /*---------------------------------------------------------------------------*\
50  Class lagrangianFieldDecomposer Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 {
55  // Private Data
56 
57  //- Reference to complete mesh
58  const fvMesh& completeMesh_;
59 
60  //- List of processor meshes
61  const PtrList<fvMesh>& procMeshes_;
62 
63  //- For each processor, for each particle, the global particle index
64  labelListList particleProcAddressing_;
65 
66  //- The name of the cloud
67  const word cloudName_;
68 
69 
70  // Private Member Functions
71 
72  //- Decompose a field
73  template<class Type, template<class> class IOContainer>
75  decomposeField(const IOobject& fieldIoObject) const;
76 
77  //- Read, decompose and write all fields
78  template
79  <
80  class Type,
81  template<class> class IOContainer,
82  template<class> class IOContainerType
83  >
84  void decomposeFields(const IOobjectList& objects);
85 
86 
87 public:
88 
89  // Constructors
90 
91  //- Construct from components
93  (
94  const fvMesh& completeMesh,
95  const PtrList<fvMesh>& procMeshes,
96  const labelListList& faceProcAddressing,
97  const labelListList& cellProcAddressing,
98  const word& cloudName
99  );
100 
101  //- Disallow default bitwise copy construction
103 
104 
105  //- Destructor
107 
108 
109  // Member Functions
110 
111  //- Return whether anything in the object list gets decomposed
112  static bool decomposes(const IOobjectList& objects);
113 
114  //- Read, decompose and write all fields
115  template<class Type>
116  void decomposeFields(const IOobjectList& objects);
117 
118 
119  // Member Operators
120 
121  //- Disallow default bitwise assignment
122  void operator=(const lagrangianFieldDecomposer&) = delete;
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #ifdef NoRepository
134 #endif
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 #endif
139 
140 // ************************************************************************* //
List of IOobjects with searching and retrieving facilities.
Definition: IOobjectList.H:53
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:99
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
void operator=(const lagrangianFieldDecomposer &)=delete
Disallow default bitwise assignment.
static bool decomposes(const IOobjectList &objects)
Return whether anything in the object list gets decomposed.
lagrangianFieldDecomposer(const fvMesh &completeMesh, const PtrList< fvMesh > &procMeshes, const labelListList &faceProcAddressing, const labelListList &cellProcAddressing, const word &cloudName)
Construct from components.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
objects
const word cloudName(propsDict.lookup("cloudName"))