pointLinear.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-2022 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::pointLinear
26 
27 Description
28  Face-point interpolation scheme class derived from linear and
29  returns linear weighting factors but also applies an explicit correction.
30 
31  Uses volPointInterpolation to obtain the field values at the face-points.
32 
33 SourceFiles
34  pointLinear.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef pointLinear_H
39 #define pointLinear_H
40 
41 #include "linear.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class pointLinear Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 template<class Type>
53 class pointLinear
54 :
55  public linear<Type>
56 {
57 
58 public:
59 
60  //- Runtime type information
61  TypeName("pointLinear");
62 
63 
64  // Constructors
65 
66  //- Construct from mesh
67  pointLinear(const fvMesh& mesh)
68  :
69  linear<Type>(mesh)
70  {}
71 
72 
73  //- Construct from mesh and Istream
75  (
76  const fvMesh& mesh,
77  Istream&
78  )
79  :
80  linear<Type>(mesh)
81  {}
82 
83 
84  //- Construct from mesh, faceFlux and Istream
86  (
87  const fvMesh& mesh,
88  const surfaceScalarField&,
89  Istream&
90  )
91  :
92  linear<Type>(mesh)
93  {}
94 
95  //- Disallow default bitwise copy construction
96  pointLinear(const pointLinear&) = delete;
97 
98 
99  // Member Functions
100 
101  //- Return true if this scheme uses an explicit correction
102  virtual bool corrected() const
103  {
104  return true;
105  }
106 
107  //- Return the explicit correction to the face-interpolate
108  virtual tmp<SurfaceField<Type>>
109  correction
110  (
111  const VolField<Type>& vf
112  ) const;
113 
114 
115  // Member Operators
116 
117  //- Disallow default bitwise assignment
118  void operator=(const pointLinear&) = delete;
119 };
120 
121 
122 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
123 
124 } // End namespace Foam
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 #endif
129 
130 // ************************************************************************* //
Generic GeometricField class.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:60
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
Centred interpolation interpolation scheme class.
Definition: linear.H:53
Face-point interpolation scheme class derived from linear and returns linear weighting factors but al...
Definition: pointLinear.H:55
virtual bool corrected() const
Return true if this scheme uses an explicit correction.
Definition: pointLinear.H:101
void operator=(const pointLinear &)=delete
Disallow default bitwise assignment.
TypeName("pointLinear")
Runtime type information.
virtual tmp< SurfaceField< Type > > correction(const VolField< Type > &vf) const
Return the explicit correction to the face-interpolate.
Definition: pointLinear.C:37
pointLinear(const fvMesh &mesh)
Construct from mesh.
Definition: pointLinear.H:66
const fvMesh & mesh() const
Return mesh reference.
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.