FreeFOAM The Cross-Platform CFD Toolkit
fvFieldReconstructor.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::fvFieldReconstructor
26 
27 Description
28  FV volume and surface field reconstructor.
29 
30 SourceFiles
31  fvFieldReconstructor.C
32  fvFieldReconstructorReconstructFields.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef fvFieldReconstructor_H
37 #define fvFieldReconstructor_H
38 
39 #include <OpenFOAM/PtrList.H>
40 #include <finiteVolume/fvMesh.H>
41 #include <OpenFOAM/IOobjectList.H>
43 #include <OpenFOAM/labelIOList.H>
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 
51 /*---------------------------------------------------------------------------*\
52  Class fvFieldReconstructor Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 {
57  // Private data
58 
59  //- Reconstructed mesh reference
60  fvMesh& mesh_;
61 
62  //- List of processor meshes
63  const PtrList<fvMesh>& procMeshes_;
64 
65  //- List of processor face addressing lists
66  const PtrList<labelIOList>& faceProcAddressing_;
67 
68  //- List of processor cell addressing lists
69  const PtrList<labelIOList>& cellProcAddressing_;
70 
71  //- List of processor boundary addressing lists
72  const PtrList<labelIOList>& boundaryProcAddressing_;
73 
74 
75  // Private Member Functions
76 
77  //- Disallow default bitwise copy construct
79 
80  //- Disallow default bitwise assignment
81  void operator=(const fvFieldReconstructor&);
82 
83 
84 public:
85 
87  :
88  public fvPatchFieldMapper
89  {
90  label size_;
91 
92  public:
93 
94  // Constructors
95 
96  //- Construct given size
98  :
99  size_(size)
100  {}
101 
102 
103  // Member functions
104 
105  label size() const
106  {
107  return size_;
108  }
109 
110  bool direct() const
111  {
112  return true;
113  }
114 
116  {
117  return unallocLabelList::null();
118  }
119  };
120 
121 
122  // Constructors
123 
124  //- Construct from components
126  (
127  fvMesh& mesh,
128  const PtrList<fvMesh>& procMeshes,
129  const PtrList<labelIOList>& faceProcAddressing,
130  const PtrList<labelIOList>& cellProcAddressing,
131  const PtrList<labelIOList>& boundaryProcAddressing
132  );
133 
134 
135  // Member Functions
136 
137  //- Reconstruct volume field
138  template<class Type>
141  (
142  const IOobject& fieldIoObject
143  );
144 
145  //- Reconstruct surface field
146  template<class Type>
149  (
150  const IOobject& fieldIoObject
151  );
152 
153  //- Reconstruct and write all/selected volume fields
154  template<class Type>
156  (
157  const IOobjectList& objects,
158  const HashSet<word>& selectedFields
159  );
160 
161  //- Reconstruct and write all/selected volume fields
162  template<class Type>
164  (
165  const IOobjectList& objects,
166  const HashSet<word>& selectedFields
167  );
168 };
169 
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 } // End namespace Foam
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 #ifdef NoRepository
179 #endif
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 #endif
184 
185 // ************************ vim: set sw=4 sts=4 et: ************************ //