added particle current time function

This commit is contained in:
andy
2009-05-22 15:26:00 +01:00
parent e17ef8cfaa
commit 7037f397dd
2 changed files with 12 additions and 0 deletions

View File

@ -365,6 +365,9 @@ public:
//- Return the impact model to be used, soft or hard (default).
inline bool softImpact() const;
//- Return the particle current time
inline scalar currentTime() const;
// Check

View File

@ -345,6 +345,15 @@ inline bool Particle<ParticleType>::softImpact() const
}
template<class ParticleType>
inline scalar Particle<ParticleType>::currentTime() const
{
return
cloud_.pMesh().time().value()
+ stepFraction_*cloud_.pMesh().time().deltaT().value();
}
template<class ParticleType>
inline label Particle<ParticleType>::patch(const label facei) const
{