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 #include "fvcFlux.H"
00031 #include "fvMesh.H"
00032 #include "convectionScheme.H"
00033
00034
00035
00036 namespace Foam
00037 {
00038
00039
00040
00041 namespace fvc
00042 {
00043
00044
00045
00046 template<class Type>
00047 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
00048 flux
00049 (
00050 const surfaceScalarField& phi,
00051 const GeometricField<Type, fvPatchField, volMesh>& vf,
00052 const word& name
00053 )
00054 {
00055 return fv::convectionScheme<Type>::New
00056 (
00057 vf.mesh(),
00058 phi,
00059 vf.mesh().divScheme(name)
00060 )().flux(phi, vf);
00061 }
00062
00063
00064 template<class Type>
00065 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
00066 flux
00067 (
00068 const tmp<surfaceScalarField>& tphi,
00069 const GeometricField<Type, fvPatchField, volMesh>& vf,
00070 const word& name
00071 )
00072 {
00073 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > Flux
00074 (
00075 fvc::flux(tphi(), vf, name)
00076 );
00077 tphi.clear();
00078 return Flux;
00079 }
00080
00081
00082 template<class Type>
00083 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
00084 flux
00085 (
00086 const surfaceScalarField& phi,
00087 const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
00088 const word& name
00089 )
00090 {
00091 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > Flux
00092 (
00093 fvc::flux(phi, tvf(), name)
00094 );
00095 tvf.clear();
00096 return Flux;
00097 }
00098
00099
00100 template<class Type>
00101 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
00102 flux
00103 (
00104 const tmp<surfaceScalarField>& tphi,
00105 const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
00106 const word& name
00107 )
00108 {
00109 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > Flux
00110 (
00111 fvc::flux(tphi(), tvf(), name)
00112 );
00113 tphi.clear();
00114 tvf.clear();
00115 return Flux;
00116 }
00117
00118
00119 template<class Type>
00120 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
00121 flux
00122 (
00123 const surfaceScalarField& phi,
00124 const GeometricField<Type, fvPatchField, volMesh>& vf
00125 )
00126 {
00127 return fvc::flux
00128 (
00129 phi, vf, "flux("+phi.name()+','+vf.name()+')'
00130 );
00131 }
00132
00133
00134 template<class Type>
00135 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
00136 flux
00137 (
00138 const tmp<surfaceScalarField>& tphi,
00139 const GeometricField<Type, fvPatchField, volMesh>& vf
00140 )
00141 {
00142 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > Flux
00143 (
00144 fvc::flux(tphi(), vf)
00145 );
00146 tphi.clear();
00147 return Flux;
00148 }
00149
00150
00151 template<class Type>
00152 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
00153 flux
00154 (
00155 const surfaceScalarField& phi,
00156 const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
00157 )
00158 {
00159 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > Flux
00160 (
00161 fvc::flux(phi, tvf())
00162 );
00163 tvf.clear();
00164 return Flux;
00165 }
00166
00167
00168 template<class Type>
00169 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> >
00170 flux
00171 (
00172 const tmp<surfaceScalarField>& tphi,
00173 const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
00174 )
00175 {
00176 tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > Flux
00177 (
00178 fvc::flux(tphi(), tvf())
00179 );
00180 tphi.clear();
00181 tvf.clear();
00182 return Flux;
00183 }
00184
00185
00186
00187
00188 }
00189
00190
00191
00192 }
00193
00194