multivariateIndependentScheme.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 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::multivariateIndependentScheme
28 
29 Description
30  Generic multi-variate discretisation scheme class for which any of the
31  NVD, CNVD or NVDV schemes may be selected for each variable and applied
32  independently.
33 
34  This is equivalent to using separate "div" terms and schemes for each
35  variable/equation.
36 
37 SourceFiles
38  multivariateIndependentScheme.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef multivariateIndependentScheme_H
43 #define multivariateIndependentScheme_H
44 
47 #include "surfaceFields.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class multivariateIndependentScheme Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 template<class Type>
60 :
62 {
63  // Private data
64 
65  dictionary schemes_;
66  const surfaceScalarField& faceFlux_;
67 
68 
69  // Private Member Functions
70 
71  //- No copy construct
73  (
75  ) = delete;
76 
77  //- No copy assignment
78  void operator=(const multivariateIndependentScheme&) = delete;
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("multivariateIndependent");
85 
86 
87  // Constructors
88 
89  //- Construct for field, faceFlux and Istream
91  (
92  const fvMesh& mesh,
95  const surfaceScalarField& faceFlux,
96  Istream& schemeData
97  );
98 
99 
100  // Member Operators
101 
103  (
105  ) const
106  {
108  (
109  faceFlux_.mesh(),
110  faceFlux_,
111  schemes_.lookup(field.name())
112  );
113  }
114 };
115 
116 
117 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
118 
119 } // End namespace Foam
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 #ifdef NoRepository
125 #endif
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #endif
130 
131 // ************************************************************************* //
Foam::surfaceFields.
ITstream & lookup(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return an entry data stream. FatalIOError if not found, or not a stream. ...
Definition: dictionary.C:367
rDeltaTY field()
TypeName("multivariateIndependent")
Runtime type information.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
const fieldTable & fields() const
Return fields to be interpolated.
Generic multi-variate discretisation scheme class for which any of the NVD, CNVD or NVDV schemes may ...
static tmp< surfaceInterpolationScheme< Type > > New(const fvMesh &mesh, Istream &schemeData)
Return new tmp interpolation scheme.
const Mesh & mesh() const noexcept
Return mesh.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Abstract base class for multi-variate surface interpolation schemes.
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Namespace for OpenFOAM.