multivariateScheme.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "volFields.H"
00028 #include "surfaceFields.H"
00029 #include "upwind.H"
00030
00031
00032
00033 namespace Foam
00034 {
00035
00036
00037
00038 template<class Type, class Scheme>
00039 multivariateScheme<Type, Scheme>::multivariateScheme
00040 (
00041 const fvMesh& mesh,
00042 const typename multivariateSurfaceInterpolationScheme<Type>::
00043 fieldTable& fields,
00044 const surfaceScalarField& faceFlux,
00045 Istream& schemeData
00046 )
00047 :
00048 multivariateSurfaceInterpolationScheme<Type>
00049 (
00050 mesh,
00051 fields,
00052 faceFlux,
00053 schemeData
00054 ),
00055 Scheme::LimiterType(schemeData),
00056 faceFlux_(faceFlux),
00057 weights_
00058 (
00059 IOobject
00060 (
00061 "multivariateWeights",
00062 mesh.time().timeName(),
00063 mesh
00064 ),
00065 mesh,
00066 dimless
00067 )
00068 {
00069 typename multivariateSurfaceInterpolationScheme<Type>::
00070 fieldTable::const_iterator iter = this->fields().begin();
00071
00072 surfaceScalarField limiter =
00073 Scheme(mesh, faceFlux_, *this).limiter(*iter());
00074
00075 for (++iter; iter != this->fields().end(); ++iter)
00076 {
00077 limiter = min
00078 (
00079 limiter,
00080 Scheme(mesh, faceFlux_, *this).limiter(*iter())
00081 );
00082 }
00083
00084 weights_ =
00085 limiter*mesh.surfaceInterpolation::weights()
00086 + (scalar(1) - limiter)*upwind<Type>(mesh, faceFlux_).weights();
00087 }
00088
00089
00090
00091
00092 }
00093
00094
Copyright © 2000-2009 OpenCFD Ltd