mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Added postMove() hook to particle function objects
This commit is contained in:
@ -324,6 +324,8 @@ bool Foam::KinematicParcel<ParcelType>::move
|
||||
}
|
||||
|
||||
p.age() += dt;
|
||||
|
||||
td.cloud().functions().postMove(p, cellI, dt);
|
||||
}
|
||||
|
||||
return td.keepParticle;
|
||||
|
||||
@ -91,6 +91,18 @@ void Foam::CloudFunctionObject<CloudType>::postEvolve()
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CloudFunctionObject<CloudType>::postMove
|
||||
(
|
||||
const typename CloudType::parcelType&,
|
||||
const label,
|
||||
const scalar
|
||||
)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CloudFunctionObject<CloudType>::postPatch
|
||||
(
|
||||
@ -98,14 +110,7 @@ void Foam::CloudFunctionObject<CloudType>::postPatch
|
||||
const label
|
||||
)
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"void Foam::CloudFunctionObject<CloudType>::postPatch"
|
||||
"("
|
||||
"const typename CloudType::parcelType&,"
|
||||
"const label"
|
||||
")"
|
||||
);
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
@ -115,13 +120,7 @@ void Foam::CloudFunctionObject<CloudType>::postFace
|
||||
const typename CloudType::parcelType&
|
||||
)
|
||||
{
|
||||
notImplemented
|
||||
(
|
||||
"void Foam::CloudFunctionObject<CloudType>::postFace"
|
||||
"("
|
||||
"const typename CloudType::parcelType&"
|
||||
")"
|
||||
);
|
||||
// do nothing
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -129,6 +129,14 @@ public:
|
||||
//- Post-evolve hook
|
||||
virtual void postEvolve();
|
||||
|
||||
//- Post-move hook
|
||||
virtual void postMove
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const label cellI,
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
//- Post-patch hook
|
||||
virtual void postPatch
|
||||
(
|
||||
|
||||
@ -127,6 +127,21 @@ void Foam::CloudFunctionObjectList<CloudType>::postEvolve()
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CloudFunctionObjectList<CloudType>::postMove
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const label cellI,
|
||||
const scalar dt
|
||||
)
|
||||
{
|
||||
forAll(*this, i)
|
||||
{
|
||||
this->operator[](i).postMove(p, cellI, dt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
void Foam::CloudFunctionObjectList<CloudType>::postPatch
|
||||
(
|
||||
|
||||
@ -109,6 +109,14 @@ public:
|
||||
//- Post-evolve hook
|
||||
virtual void postEvolve();
|
||||
|
||||
//- Post-move hook
|
||||
virtual void postMove
|
||||
(
|
||||
const typename CloudType::parcelType& p,
|
||||
const label cellI,
|
||||
const scalar dt
|
||||
);
|
||||
|
||||
//- Post-patch hook
|
||||
virtual void postPatch
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user