dimFieldDecomposer.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2021 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
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 Class
28  Foam::dimFieldDecomposer
29 
30 Description
31  Dimensioned field decomposer.
32 
33 SourceFiles
34  dimFieldDecomposer.C
35  dimFieldDecomposerFields.C
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef dimFieldDecomposer_H
40 #define dimFieldDecomposer_H
41 
42 #include "fvMesh.H"
43 #include "surfaceFields.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class fvFieldDecomposer Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 {
56  // Private Data
57 
58  //- Reference to processor mesh
59  const fvMesh& procMesh_;
60 
61  //- Reference to face addressing
62  //UNUSED: const labelList& faceAddressing_;
63 
64  //- Reference to cell addressing
65  const labelList& cellAddressing_;
66 
67 
68 public:
69 
70  //- No copy construct
71  dimFieldDecomposer(const dimFieldDecomposer&) = delete;
72 
73  //- No copy assignment
74  void operator=(const dimFieldDecomposer&) = delete;
75 
76 
77  // Constructors
78 
79  //- Construct from minimal components
81  (
82  const fvMesh& procMesh,
83  const labelList& cellAddressing
84  );
85 
86  //- Construct from components with API as per fvFieldDecomposer
88  (
89  const fvMesh& completeMesh,
90  const fvMesh& procMesh,
91  const labelList& faceAddressing,
92  const labelList& cellAddressing
93  );
94 
95 
96  //- Destructor
97  ~dimFieldDecomposer() = default;
98 
99 
100  // Member Functions
101 
102  //- Decompose field
103  template<class Type>
106  (
108  ) const;
109 
110 
111  //- Decompose list of fields
112  template<class GeoField>
113  void decomposeFields(const PtrList<GeoField>& fields) const;
114 };
115 
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 } // End namespace Foam
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 #ifdef NoRepository
124  #include "dimFieldDecomposerFields.C"
125 #endif
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #endif
130 
131 // ************************************************************************* //
Foam::dimFieldDecomposer::decomposeFields
void decomposeFields(const PtrList< GeoField > &fields) const
Decompose list of fields.
Definition: dimFieldDecomposerFields.C:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
surfaceFields.H
Foam::surfaceFields.
Foam::dimFieldDecomposer
Dimensioned field decomposer.
Definition: dimFieldDecomposer.H:53
field
rDeltaTY field()
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:59
Foam::dimFieldDecomposer::dimFieldDecomposer
dimFieldDecomposer(const dimFieldDecomposer &)=delete
No copy construct.
Foam::dimFieldDecomposer::~dimFieldDecomposer
~dimFieldDecomposer()=default
Destructor.
Foam::dimFieldDecomposer::operator=
void operator=(const dimFieldDecomposer &)=delete
No copy assignment.
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
fvMesh.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::dimFieldDecomposer::decomposeField
tmp< DimensionedField< Type, volMesh > > decomposeField(const DimensionedField< Type, volMesh > &field) const
Decompose field.
Foam::List< label >
dimFieldDecomposerFields.C
fields
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Definition: createFields.H:97
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54