The open source CFD toolbox
faFieldReconstructor.C
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2016-2017 Wikki Ltd
9 Copyright (C) 2022 OpenCFD Ltd.
10-------------------------------------------------------------------------------
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
30#include "areaFields.H"
31#include "edgeFields.H"
32
33// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
34
36
37
38// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
39
41(
42 faMesh& mesh,
43 const PtrList<faMesh>& procMeshes,
47)
48:
49 mesh_(mesh),
50 procMeshes_(procMeshes),
54 nReconstructed_(0)
55{}
56
57
58// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
59
61(
62 const IOobjectList& objects,
63 const wordRes& selected
64)
65{
66 label nTotal = 0;
67
68 do
69 {
70 #undef doLocalCode
71 #define doLocalCode(Method) \
72 { \
73 nTotal += this->Method <scalar> (objects, selected); \
74 nTotal += this->Method <vector> (objects, selected); \
75 nTotal += this->Method <sphericalTensor> (objects, selected); \
76 nTotal += this->Method <symmTensor> (objects, selected); \
77 nTotal += this->Method <tensor> (objects, selected); \
78 }
79
80 doLocalCode(reconstructAreaFields);
81 doLocalCode(reconstructEdgeFields);
82
83 #undef doLocalCode
84 }
85 while (false);
86
87 return nTotal;
88}
89
90
91// ************************************************************************* //
List of IOobjects with searching and retrieving facilities.
Definition: IOobjectList.H:59
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
Finite Area area and edge fields reconstruction.
static int verbose_
Output verbosity when writing.
label reconstructAllFields(const IOobjectList &objects, const wordRes &selectedFields=wordRes())
Reconstruct all supported area/edge field types.
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
Definition: faMesh.H:100
A List of wordRe with additional matching capabilities.
Definition: wordRes.H:54
dynamicFvMesh & mesh
#define doLocalCode(GeoField)