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