kinematicCloud.SU(Uc)的返回值
-
大家好,我想请教一下调用momentum source函数的时候,返回值是哪一个?在KinematicCloudI.H中有这个函数的定义:
template<class CloudType> inline Foam::tmp<Foam::fvVectorMatrix> Foam::KinematicCloud<CloudType>::SU(volVectorField& U, bool incompressible) const { if (debug) { Pout<< "UTrans min/max = " << min(UTrans()).value() << ", " << max(UTrans()).value() << nl << "UCoeff min/max = " << min(UCoeff()).value() << ", " << max(UCoeff()).value() << endl; } dimensionSet dim(dimForce); if (incompressible) { dim.reset(dimForce/dimDensity); } if (solution_.coupled()) { if (solution_.semiImplicit("U")) { volScalarField::Internal Vdt(mesh_.V()*this->db().time().deltaT()); if (incompressible) { Vdt.dimensions() *= dimDensity; } return UTrans()/Vdt - fvm::Sp(UCoeff()/Vdt, U) + UCoeff()/Vdt*U; } else { tmp<fvVectorMatrix> tfvm(new fvVectorMatrix(U, dim)); fvVectorMatrix& fvm = tfvm.ref(); fvm.source() = -UTrans()/(this->db().time().deltaT()); return tfvm; } } return tmp<fvVectorMatrix>::New(U, dim); }
在调用这个函数的时候,如果我用semiImplicit格式的话,返回的是
return UTrans()/Vdt - fvm::Sp(UCoeff()/Vdt, U) + UCoeff()/Vdt*U;
还是
return tmp<fvVectorMatrix>::New(U, dim);
呢?
我认为返回的应该是后者吧 tmp<fvVectorMatrix>::New(U, dim);
我想知道它是什么意思呢?