multivariateUpwind.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-2020 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::multivariateUpwind
26 
27 Description
28  Upwind-difference form of the multivariate surfaceInterpolationScheme.
29 
30 SourceFiles
31  multivariateUpwindmake.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef multivariateUpwind_H
36 #define multivariateUpwind_H
37 
39 #include "surfaceFields.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class multivariateUpwind Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 template<class Type>
52 :
54 {
55  // Private Data
56 
57  const surfaceScalarField& faceFlux_;
58 
59 
60 public:
61 
62  //- Runtime type information
63  TypeName("upwind");
64 
65 
66  // Constructors
67 
68  //- Construct for field, faceFlux and Istream
70  (
71  const fvMesh& mesh,
74  const surfaceScalarField& faceFlux,
75  Istream& schemeData
76  )
77  :
79  (
80  mesh,
81  fields,
82  faceFlux,
83  schemeData
84  ),
85  faceFlux_(faceFlux)
86  {}
87 
88  //- Disallow default bitwise copy construction
89  multivariateUpwind(const multivariateUpwind&) = delete;
90 
91 
92  // Member Operators
93 
94  //- Disallow default bitwise assignment
95  void operator=(const multivariateUpwind&) = delete;
96 
97  //- surfaceInterpolationScheme sub-class returned by operator(field)
98  // which is used as the interpolation scheme for the field
99  class fieldScheme
100  :
102  {
103  // Private Data
104 
105  const surfaceScalarField& faceFlux_;
106 
107  public:
108 
109  // Constructors
110 
112  (
114  const surfaceScalarField& faceFlux
115  )
116  :
118  fieldScheme(field),
119  faceFlux_(faceFlux)
120  {}
121 
122 
123  // Member Functions
124 
125  //- Return the interpolation weighting factors
127  (
129  ) const
130  {
131  return pos0(faceFlux_);
132  }
133  };
134 
136  (
138  ) const
139  {
141  (
142  new fieldScheme(field, faceFlux_)
143  );
144  }
145 };
146 
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 } // End namespace Foam
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 #endif
155 
156 // ************************************************************************* //
void operator=(const multivariateUpwind &)=delete
Disallow default bitwise assignment.
Foam::surfaceFields.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
fieldScheme(const GeometricField< Type, fvPatchField, volMesh > &field, const surfaceScalarField &faceFlux)
const fieldTable & fields() const
Return fields to be interpolated.
surfaceInterpolationScheme sub-class returned by operator(field)
tmp< surfaceScalarField > weights(const GeometricField< Type, fvPatchField, volMesh > &) const
Return the interpolation weighting factors.
TypeName("upwind")
Runtime type information.
multivariateUpwind(const fvMesh &mesh, const typename multivariateSurfaceInterpolationScheme< Type >::fieldTable &fields, const surfaceScalarField &faceFlux, Istream &schemeData)
Construct for field, faceFlux and Istream.
Upwind-difference form of the multivariate surfaceInterpolationScheme.
dimensionedScalar pos0(const dimensionedScalar &ds)
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:95
Abstract base class for multi-variate surface interpolation schemes.
rDeltaTY field()
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.