mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
particle: Added trackToCell function
This is equivalent to track to face, but it additionally crosses internal faces at the end of the track to move into the next cell. This is a common procedure when performing post-processing tracking operations.
This commit is contained in:
@ -570,6 +570,23 @@ Foam::scalar Foam::particle::track
|
||||
}
|
||||
|
||||
|
||||
Foam::scalar Foam::particle::trackToCell
|
||||
(
|
||||
const vector& displacement,
|
||||
const scalar fraction
|
||||
)
|
||||
{
|
||||
const scalar f = trackToFace(displacement, fraction);
|
||||
|
||||
if (onInternalFace())
|
||||
{
|
||||
changeCell();
|
||||
}
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
|
||||
Foam::scalar Foam::particle::trackToFace
|
||||
(
|
||||
const vector& displacement,
|
||||
|
||||
@ -513,16 +513,23 @@ public:
|
||||
const scalar fraction
|
||||
);
|
||||
|
||||
//- As particle::track, but also stops on internal faces.
|
||||
//- As particle::track, but stops when a new cell is reached.
|
||||
scalar trackToCell
|
||||
(
|
||||
const vector& displacement,
|
||||
const scalar fraction
|
||||
);
|
||||
|
||||
//- As particle::track, but stops when a face is hit.
|
||||
scalar trackToFace
|
||||
(
|
||||
const vector& displacement,
|
||||
const scalar fraction
|
||||
);
|
||||
|
||||
//- As particle::trackToFace, but also stops on tet triangles. On
|
||||
// exit, tetTriI is set to the index of the tet triangle that was
|
||||
// hit, or -1 if the end position was reached.
|
||||
//- As particle::trackToFace, but stops when a tet triangle is hit. On
|
||||
// exit, tetTriI is set to the index of the tet triangle that was hit,
|
||||
// or -1 if the end position was reached.
|
||||
scalar trackToTri
|
||||
(
|
||||
const vector& displacement,
|
||||
|
||||
Reference in New Issue
Block a user