1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
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 the
13 Free Software Foundation; either version 2 of the License, or (at your
14 option) any later version.
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
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM; if not, write to the Free Software Foundation,
23 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 linear/upwind blended differencing scheme.
34 \*---------------------------------------------------------------------------*/
39 #include "limitedSurfaceInterpolationScheme.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 /*---------------------------------------------------------------------------*\
47 Class blended Declaration
48 \*---------------------------------------------------------------------------*/
53 public limitedSurfaceInterpolationScheme<Type>
57 const scalar blendingFactor_;
60 // Private Member Functions
62 //- Disallow default bitwise copy construct
63 blended(const blended&);
65 //- Disallow default bitwise assignment
66 void operator=(const blended&);
71 //- Runtime type information
77 //- Construct from mesh, faceFlux and blendingFactor
81 const surfaceScalarField& faceFlux,
82 const scalar blendingFactor
85 limitedSurfaceInterpolationScheme<Type>(mesh, faceFlux),
86 blendingFactor_(blendingFactor)
89 //- Construct from mesh and Istream.
90 // The name of the flux field is read from the Istream and looked-up
91 // from the mesh objectRegistry
98 limitedSurfaceInterpolationScheme<Type>(mesh, is),
99 blendingFactor_(readScalar(is))
102 //- Construct from mesh, faceFlux and Istream
106 const surfaceScalarField& faceFlux,
110 limitedSurfaceInterpolationScheme<Type>(mesh, faceFlux),
111 blendingFactor_(readScalar(is))
117 //- Return the interpolation limiter
118 virtual tmp<surfaceScalarField> limiter
120 const GeometricField<Type, fvPatchField, volMesh>&
123 return tmp<surfaceScalarField>
125 new surfaceScalarField
130 this->mesh().time().timeName(),
144 //- Return the interpolation weighting factors
145 virtual tmp<surfaceScalarField> weights
147 const GeometricField<Type, fvPatchField, volMesh>& vf
151 blendingFactor_*this->mesh().surfaceInterpolation::weights()
152 + (1 - blendingFactor_)*pos(this->faceFlux_);
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 } // End namespace Foam
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 // ************************************************************************* //