Skip to content
Snippets Groups Projects
Commit b66e42e1 authored by Andrew Heather's avatar Andrew Heather
Browse files

added hitPatch() function

parent e009a15c
No related merge requests found
......@@ -339,6 +339,8 @@ Foam::scalar Foam::Particle<ParticleType>::trackToFace
label patchi = patch(facei_);
const polyPatch& patch = mesh.boundaryMesh()[patchi];
p.hitPatch(patch, td, patchi);
if (isA<wedgePolyPatch>(patch))
{
p.hitWedgePatch
......@@ -376,10 +378,7 @@ Foam::scalar Foam::Particle<ParticleType>::trackToFace
}
else if (isA<polyPatch>(patch))
{
p.hitPatch
(
static_cast<const polyPatch&>(patch), td
);
p.hitPatch(patch, td);
}
else
{
......@@ -434,6 +433,18 @@ void Foam::Particle<ParticleType>::transformProperties(const vector&)
{}
template<class ParticleType>
template<class TrackData>
void Foam::Particle<ParticleType>::hitPatch
(
const polyPatch&,
TrackData&,
const label
)
{}
template<class ParticleType>
template<class TrackData>
void Foam::Particle<ParticleType>::hitWedgePatch
......
......@@ -171,6 +171,16 @@ protected:
// Patch interactions
//- Overridable function to handle the particle hitting a patch
// Executed before other patch-hitting functions
template<class TrackData>
void hitPatch
(
const polyPatch&,
TrackData& td,
const label patchI
);
//- Overridable function to handle the particle hitting a wedgePatch
template<class TrackData>
void hitWedgePatch
......
......@@ -254,6 +254,30 @@ bool Foam::KinematicParcel<ParcelType>::move(TrackData& td)
}
template<class ParcelType>
template<class TrackData>
void Foam::KinematicParcel<ParcelType>::hitPatch
(
const polyPatch& pp,
TrackData& td,
const label patchI
)
{
ParcelType& p = static_cast<ParcelType&>(*this);
td.cloud().postProcessing().postPatch(p, patchI);
}
template<class ParcelType>
void Foam::KinematicParcel<ParcelType>::hitPatch
(
const polyPatch& pp,
int& td,
const label patchI
)
{}
template<class ParcelType>
template<class TrackData>
void Foam::KinematicParcel<ParcelType>::hitProcessorPatch
......
......@@ -418,6 +418,27 @@ public:
// Patch interactions
//- Overridable function to handle the particle hitting a patch
// Executed before other patch-hitting functions
template<class TrackData>
void hitPatch
(
const polyPatch& p,
TrackData& td,
const label patchI
);
//- Overridable function to handle the particle hitting a patch
// Executed before other patch-hitting functions without trackData
void hitPatch
(
const polyPatch& p,
int& td,
const label patchI
);
//- Overridable function to handle the particle hitting a
// processorPatch
template<class TrackData>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment