upwind.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 #ifndef upwind_H
00037 #define upwind_H
00038
00039 #include "limitedSurfaceInterpolationScheme.H"
00040 #include "volFields.H"
00041 #include "surfaceFields.H"
00042
00043
00044
00045 namespace Foam
00046 {
00047
00048
00049
00050
00051
00052 template<class Type>
00053 class upwind
00054 :
00055 public limitedSurfaceInterpolationScheme<Type>
00056 {
00057
00058
00059
00060 void operator=(const upwind&);
00061
00062
00063 public:
00064
00065
00066 TypeName("upwind");
00067
00068
00069
00070
00071
00072 upwind
00073 (
00074 const fvMesh& mesh,
00075 const surfaceScalarField& faceFlux
00076 )
00077 :
00078 limitedSurfaceInterpolationScheme<Type>(mesh, faceFlux)
00079 {}
00080
00081
00082
00083
00084 upwind
00085 (
00086 const fvMesh& mesh,
00087 Istream& is
00088 )
00089 :
00090 limitedSurfaceInterpolationScheme<Type>(mesh, is)
00091 {}
00092
00093
00094 upwind
00095 (
00096 const fvMesh& mesh,
00097 const surfaceScalarField& faceFlux,
00098 Istream&
00099 )
00100 :
00101 limitedSurfaceInterpolationScheme<Type>(mesh, faceFlux)
00102 {}
00103
00104
00105
00106
00107
00108 virtual tmp<surfaceScalarField> limiter
00109 (
00110 const GeometricField<Type, fvPatchField, volMesh>&
00111 ) const
00112 {
00113 return tmp<surfaceScalarField>
00114 (
00115 new surfaceScalarField
00116 (
00117 IOobject
00118 (
00119 "upwindLimiter",
00120 this->mesh().time().timeName(),
00121 this->mesh()
00122 ),
00123 this->mesh(),
00124 dimensionedScalar("upwindLimiter", dimless, 0.0)
00125 )
00126 );
00127 }
00128
00129
00130 tmp<surfaceScalarField> weights() const
00131 {
00132 return pos(this->faceFlux_);
00133 }
00134
00135
00136 virtual tmp<surfaceScalarField> weights
00137 (
00138 const GeometricField<Type, fvPatchField, volMesh>&
00139 ) const
00140 {
00141 return weights();
00142 }
00143 };
00144
00145
00146
00147
00148 }
00149
00150
00151
00152 #endif
00153
00154
Copyright © 2000-2009 OpenCFD Ltd