localMin.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
00038
00039 #ifndef localMin_H
00040 #define localMin_H
00041
00042 #include "surfaceInterpolationScheme.H"
00043 #include "volFields.H"
00044 #include "surfaceFields.H"
00045
00046
00047
00048 namespace Foam
00049 {
00050
00051
00052
00053
00054
00055 template<class Type>
00056 class localMin
00057 :
00058 public surfaceInterpolationScheme<Type>
00059 {
00060
00061
00062
00063 void operator=(const localMin&);
00064
00065
00066 public:
00067
00068
00069 TypeName("localMin");
00070
00071
00072
00073
00074
00075 localMin(const fvMesh& mesh)
00076 :
00077 surfaceInterpolationScheme<Type>(mesh)
00078 {}
00079
00080
00081
00082
00083 localMin
00084 (
00085 const fvMesh& mesh,
00086 Istream& is
00087 )
00088 :
00089 surfaceInterpolationScheme<Type>(mesh)
00090 {}
00091
00092
00093 localMin
00094 (
00095 const fvMesh& mesh,
00096 const surfaceScalarField& faceFlux,
00097 Istream& is
00098 )
00099 :
00100 surfaceInterpolationScheme<Type>(mesh)
00101 {}
00102
00103
00104
00105
00106
00107 virtual tmp<surfaceScalarField> weights
00108 (
00109 const GeometricField<Type, fvPatchField, volMesh>&
00110 ) const
00111 {
00112 notImplemented
00113 (
00114 "localMin::weights"
00115 "(const GeometricField<Type, fvPatchField, volMesh>&)"
00116 );
00117
00118 return tmp<surfaceScalarField>(NULL);
00119 }
00120
00121
00122 virtual tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
00123 interpolate
00124 (
00125 const GeometricField<Type, fvPatchField, volMesh>& vf
00126 ) const
00127 {
00128 const fvMesh& mesh = vf.mesh();
00129
00130 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > tvff
00131 (
00132 new GeometricField<Type, fvsPatchField, surfaceMesh>
00133 (
00134 IOobject
00135 (
00136 vf.name(),
00137 mesh.time().timeName(),
00138 mesh
00139 ),
00140 mesh,
00141 vf.dimensions()
00142 )
00143 );
00144 GeometricField<Type, fvsPatchField, surfaceMesh>& vff = tvff();
00145
00146 forAll(vff.boundaryField(), patchi)
00147 {
00148 vff.boundaryField()[patchi] = vf.boundaryField()[patchi];
00149 }
00150
00151 const unallocLabelList& own = mesh.owner();
00152 const unallocLabelList& nei = mesh.neighbour();
00153
00154 forAll(vff, facei)
00155 {
00156 vff[facei] = minMod(vf[own[facei]], vf[nei[facei]]);
00157 }
00158
00159 return tvff;
00160 }
00161 };
00162
00163
00164
00165
00166 }
00167
00168
00169
00170 #endif
00171
00172
Copyright © 2000-2009 OpenCFD Ltd