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 CICSAM differencing scheme.
32 Hrvoje Jasak, Wikki Ltd. All rights reserved
37 \*---------------------------------------------------------------------------*/
42 #include "limitedSurfaceInterpolationScheme.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 /*---------------------------------------------------------------------------*\
50 Class CICSAM Declaration
51 \*---------------------------------------------------------------------------*/
55 public limitedSurfaceInterpolationScheme<scalar>
63 // Private Member Functions
65 //- Disallow default bitwise copy construct
66 CICSAM(const CICSAM&);
68 //- Disallow default bitwise assignment
69 void operator=(const CICSAM&);
72 //- Calculate individual limiter
75 const scalar cdWeight,
76 const scalar faceFlux,
85 //- Calculate individual weight
88 const scalar cdWeight,
89 const scalar faceFlux,
100 //- Runtime type information
106 //- Construct from mesh, faceFlux and blendingFactor
110 const surfaceScalarField& faceFlux,
114 limitedSurfaceInterpolationScheme<scalar>(mesh, faceFlux),
118 //- Construct from mesh and Istream.
119 // The name of the flux field is read from the Istream and looked-up
120 // from the mesh objectRegistry
127 limitedSurfaceInterpolationScheme<scalar>(mesh, is),
130 if (k_ < 0 || k_ > 1)
132 FatalIOErrorIn("CICSAMWeight(Istream& is)", is)
133 << "coefficient = " << k_
134 << " should be >= 0 and <= 1"
135 << exit(FatalIOError);
139 //- Construct from mesh, faceFlux and Istream
143 const surfaceScalarField& faceFlux,
147 limitedSurfaceInterpolationScheme<scalar>(mesh, faceFlux),
150 if (k_ < 0 || k_ > 1)
152 FatalIOErrorIn("CICSAMWeight(Istream& is)", is)
153 << "coefficient = " << k_
154 << " should be >= 0 and <= 1"
155 << exit(FatalIOError);
162 //- Return the interpolation limiter
163 virtual tmp<surfaceScalarField> limiter
165 const volScalarField&
168 //- Return the interpolation weighting factors
169 virtual tmp<surfaceScalarField> weights
171 const volScalarField&
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 } // End namespace Foam
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 // ************************************************************************* //