multivariateSelectionScheme.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::multivariateSelectionScheme
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.
32 
33 SourceFiles
34  multivariateSelectionScheme.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef multivariateSelectionScheme_H
39 #define multivariateSelectionScheme_H
40 
42 #include "surfaceFields.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class multivariateSelectionScheme Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 template<class Type>
55 :
57 {
58  // Private data
59 
60  dictionary schemes_;
61  const surfaceScalarField& faceFlux_;
62  surfaceScalarField weights_;
63 
64 
65  // Private Member Functions
66 
67  //- No copy construct
69  (
71  ) = delete;
72 
73  //- No copy assignment
74  void operator=(const multivariateSelectionScheme&) = delete;
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("multivariateSelection");
81 
82 
83  // Constructors
84 
85  //- Construct for field, faceFlux and Istream
87  (
88  const fvMesh& mesh,
91  const surfaceScalarField& faceFlux,
92  Istream& schemeData
93  );
94 
95 
96  // Member Operators
97 
98  //- surfaceInterpolationScheme sub-class returned by operator(field)
99  // which is used as the interpolation scheme for the field
100  class fieldScheme
101  :
103  {
104  // Private data
105 
106  const surfaceScalarField& weights_;
107 
108  public:
109 
110  // Constructors
111 
113  (
116  )
117  :
120  weights_(weights)
121  {}
122 
123 
124  // Member Functions
125 
126  //- Return the interpolation weighting factors
128  (
130  ) const
131  {
132  return weights_;
133  }
134  };
135 
137  (
139  ) const
140  {
142  (
143  new fieldScheme(field, weights_)
144  );
145  }
146 };
147 
148 
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 
151 } // End namespace Foam
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 #ifdef NoRepository
157 #endif
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 #endif
162 
163 // ************************************************************************* //
multivariateSelectionScheme.C
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
surfaceFields.H
Foam::surfaceFields.
Foam::multivariateSelectionScheme::fieldScheme
surfaceInterpolationScheme sub-class returned by operator(field)
Definition: multivariateSelectionScheme.H:99
Foam::multivariateSelectionScheme::fieldScheme::weights
tmp< surfaceScalarField > weights(const GeometricField< Type, fvPatchField, volMesh > &) const
Return the interpolation weighting factors.
Definition: multivariateSelectionScheme.H:127
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::multivariateSurfaceInterpolationScheme
Abstract base class for multi-variate surface interpolation schemes.
Definition: multivariateSurfaceInterpolationScheme.H:52
field
rDeltaTY field()
Foam::multivariateSurfaceInterpolationScheme::mesh
const fvMesh & mesh() const
Return mesh reference.
Definition: multivariateSurfaceInterpolationScheme.H:153
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::multivariateSelectionScheme
Generic multi-variate discretisation scheme class for which any of the NVD, CNVD or NVDV schemes may ...
Definition: multivariateSelectionScheme.H:53
Foam::multivariateSelectionScheme::fieldScheme::fieldScheme
fieldScheme(const GeometricField< Type, fvPatchField, volMesh > &field, const surfaceScalarField &weights)
Definition: multivariateSelectionScheme.H:112
Foam::multivariateSurfaceInterpolationScheme::fields
const fieldTable & fields() const
Return fields to be interpolated.
Definition: multivariateSurfaceInterpolationScheme.H:159
Foam::multivariateSelectionScheme::TypeName
TypeName("multivariateSelection")
Runtime type information.
multivariateSurfaceInterpolationScheme.H
Foam::GeometricField< scalar, fvsPatchField, surfaceMesh >
Foam::multivariateSurfaceInterpolationScheme::fieldTable
fieldTable
Definition: multivariateSurfaceInterpolationScheme.H:60