limitWith.H
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
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef limitWith_H
00038 #define limitWith_H
00039
00040 #include "surfaceInterpolationScheme.H"
00041 #include "limitedSurfaceInterpolationScheme.H"
00042
00043
00044
00045 namespace Foam
00046 {
00047
00048
00049
00050
00051
00052 template<class Type>
00053 class limitWith
00054 :
00055 public surfaceInterpolationScheme<Type>
00056 {
00057
00058
00059
00060 tmp<surfaceInterpolationScheme<Type> > tInterp_;
00061
00062
00063 tmp<limitedSurfaceInterpolationScheme<Type> > tLimiter_;
00064
00065
00066
00067 limitWith(const limitWith&);
00068
00069
00070 void operator=(const limitWith&);
00071
00072
00073 public:
00074
00075
00076 TypeName("limitWith");
00077
00078
00079
00080
00081
00082
00083
00084 limitWith
00085 (
00086 const fvMesh& mesh,
00087 Istream& is
00088 )
00089 :
00090 surfaceInterpolationScheme<Type>(mesh),
00091 tInterp_
00092 (
00093 surfaceInterpolationScheme<Type>::New(mesh, is)
00094 ),
00095 tLimiter_
00096 (
00097 limitedSurfaceInterpolationScheme<Type>::New(mesh, is)
00098 )
00099 {}
00100
00101
00102 limitWith
00103 (
00104 const fvMesh& mesh,
00105 const surfaceScalarField& faceFlux,
00106 Istream& is
00107 )
00108 :
00109 surfaceInterpolationScheme<Type>(mesh),
00110 tInterp_
00111 (
00112 surfaceInterpolationScheme<Type>::New(mesh, faceFlux, is)
00113 ),
00114 tLimiter_
00115 (
00116 limitedSurfaceInterpolationScheme<Type>::New(mesh, faceFlux, is)
00117 )
00118 {}
00119
00120
00121
00122
00123
00124 virtual tmp<surfaceScalarField> weights
00125 (
00126 const GeometricField<Type, fvPatchField, volMesh>& vf
00127 ) const
00128 {
00129 return tLimiter_().weights
00130 (
00131 vf,
00132 tInterp_().weights(vf),
00133 tLimiter_().limiter(vf)
00134 );
00135 }
00136
00137
00138 virtual bool corrected() const
00139 {
00140 return tInterp_().corrected();
00141 }
00142
00143
00144
00145 virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
00146 correction(const GeometricField<Type, fvPatchField, volMesh>& vf) const
00147 {
00148 return tLimiter_().limiter(vf)*tInterp_().correction(vf);
00149 }
00150 };
00151
00152
00153
00154
00155 }
00156
00157
00158
00159 #endif
00160
00161
Copyright © 2000-2009 OpenCFD Ltd