noInterfaceCompression.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) 2021-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::noInterfaceCompression
26 
27 Description
28  Wrapper scheme to allow VoF solvers to run efficiently without interface
29  compression, e.g. for cavitation simulations.
30 
31  Example:
32  \verbatim
33  divSchemes
34  {
35  .
36  .
37  div(phi,alpha) Gauss noInterfaceCompression vanLeer;
38  .
39  .
40  }
41  \endverbatim
42 
43 See also
44  Foam::interfaceCompression
45  Foam::vanLeer
46  Foam::vanAlbada
47 
48 SourceFiles
49  noInterfaceCompression.C
50 
51 \*---------------------------------------------------------------------------*/
52 
53 #ifndef noInterfaceCompression_H
54 #define noInterfaceCompression_H
55 
57 
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 
60 namespace Foam
61 {
62 
63 /*---------------------------------------------------------------------------*\
64  Class noInterfaceCompression Declaration
65 \*---------------------------------------------------------------------------*/
66 
68 :
69  public surfaceInterpolationScheme<scalar>
70 {
71  // Private member data
72 
73  //- Base scheme to which the compression is applied
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("noInterfaceCompression");
81 
82 
83  // Constructors
84 
85  //- Construct from faceFlux and Istream
87  (
88  const fvMesh& mesh,
89  const surfaceScalarField& faceFlux,
90  Istream& is
91  )
92  :
94  tScheme_
95  (
96  surfaceInterpolationScheme<scalar>::New(mesh, faceFlux, is)
97  )
98  {}
99 
100 
101  // Member Functions
102 
103  //- Return the interpolation weighting factors
105  (
106  const volScalarField&
107  ) const
108  {
110 
111  return tmp<surfaceScalarField>(nullptr);
112  }
113 
114  //- Return the face-interpolate of the given cell field
116  (
117  const volScalarField& vf
118  ) const
119  {
120  return tScheme_().interpolate(vf);
121  }
122 
123 
124  // Member Operators
125 
126  //- Disallow default bitwise assignment
127  void operator=(const noInterfaceCompressionNew&) = delete;
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
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:101
TypeName("noInterfaceCompression")
Runtime type information.
void operator=(const noInterfaceCompressionNew &)=delete
Disallow default bitwise assignment.
noInterfaceCompressionNew(const fvMesh &mesh, const surfaceScalarField &faceFlux, Istream &is)
Construct from faceFlux and Istream.
virtual tmp< surfaceScalarField > interpolate(const volScalarField &vf) const
Return the face-interpolate of the given cell field.
virtual tmp< surfaceScalarField > weights(const volScalarField &) const
Return the interpolation weighting factors.
Abstract base class for surface interpolation schemes.
const fvMesh & mesh() const
Return mesh reference.
static tmp< surfaceInterpolationScheme< scalar > > New(const fvMesh &mesh, Istream &schemeData)
Return new tmp interpolation scheme.
A class for managing temporary objects.
Definition: tmp.H:55
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:353
Namespace for OpenFOAM.