diff --git a/src/functionObjects/field/nearWallFields/findCellParticle.C b/src/functionObjects/field/nearWallFields/findCellParticle.C index 19726169e3..6490a9579a 100644 --- a/src/functionObjects/field/nearWallFields/findCellParticle.C +++ b/src/functionObjects/field/nearWallFields/findCellParticle.C @@ -130,10 +130,7 @@ bool Foam::findCellParticle::hitPatch ( const polyPatch&, Cloud& cloud, - trackingData& td, - const label patchi, - const scalar trackFraction, - const tetIndices& tetIs + trackingData& td ) { return false; @@ -188,6 +185,32 @@ void Foam::findCellParticle::hitCyclicPatch } +void Foam::findCellParticle::hitCyclicAMIPatch +( + const cyclicAMIPolyPatch&, + Cloud& cloud, + trackingData& td, + const vector& +) +{ + // Remove particle + td.keepParticle = false; +} + + +void Foam::findCellParticle::hitCyclicACMIPatch +( + const cyclicACMIPolyPatch&, + Cloud& cloud, + trackingData& td, + const vector& +) +{ + // Remove particle + td.keepParticle = false; +} + + void Foam::findCellParticle::hitProcessorPatch ( const processorPolyPatch&, @@ -204,19 +227,6 @@ void Foam::findCellParticle::hitWallPatch ( const wallPolyPatch& wpp, Cloud& cloud, - trackingData& td, - const tetIndices& -) -{ - // Remove particle - td.keepParticle = false; -} - - -void Foam::findCellParticle::hitPatch -( - const polyPatch& wpp, - Cloud& cloud, trackingData& td ) { diff --git a/src/functionObjects/field/nearWallFields/findCellParticle.H b/src/functionObjects/field/nearWallFields/findCellParticle.H index 7c2f205dea..8cac809ab5 100644 --- a/src/functionObjects/field/nearWallFields/findCellParticle.H +++ b/src/functionObjects/field/nearWallFields/findCellParticle.H @@ -229,10 +229,7 @@ public: ( const polyPatch&, Cloud&, - trackingData& td, - const label patchi, - const scalar trackFraction, - const tetIndices& tetIs + trackingData& td ); //- Overridable function to handle the particle hitting a wedge @@ -269,6 +266,24 @@ public: trackingData& td ); + //- Overridable function to handle the particle hitting a cyclicAMI + void hitCyclicAMIPatch + ( + const cyclicAMIPolyPatch&, + Cloud& cloud, + trackingData& td, + const vector& + ); + + //- Overridable function to handle the particle hitting a cyclicACMI + void hitCyclicACMIPatch + ( + const cyclicACMIPolyPatch&, + Cloud& cloud, + trackingData& td, + const vector& + ); + //- Overridable function to handle the particle hitting a //- processorPatch void hitProcessorPatch @@ -283,15 +298,6 @@ public: ( const wallPolyPatch&, Cloud&, - trackingData& td, - const tetIndices& - ); - - //- Overridable function to handle the particle hitting a polyPatch - void hitPatch - ( - const polyPatch&, - Cloud&, trackingData& td ); diff --git a/src/functionObjects/field/streamLine/streamLineParticle.C b/src/functionObjects/field/streamLine/streamLineParticle.C index a15615b3a8..385538e139 100644 --- a/src/functionObjects/field/streamLine/streamLineParticle.C +++ b/src/functionObjects/field/streamLine/streamLineParticle.C @@ -274,10 +274,7 @@ bool Foam::streamLineParticle::hitPatch ( const polyPatch&, streamLineParticleCloud& cloud, - trackingData& td, - const label patchi, - const scalar trackFraction, - const tetIndices& tetIs + trackingData& td ) { // Disable generic patch interaction @@ -333,6 +330,32 @@ void Foam::streamLineParticle::hitCyclicPatch } +void Foam::streamLineParticle::hitCyclicAMIPatch +( + const cyclicAMIPolyPatch&, + streamLineParticleCloud& cloud, + trackingData& td, + const vector& +) +{ + // Remove particle + td.keepParticle = false; +} + + +void Foam::streamLineParticle::hitCyclicACMIPatch +( + const cyclicACMIPolyPatch&, + streamLineParticleCloud& cloud, + trackingData& td, + const vector& +) +{ + // Remove particle + td.keepParticle = false; +} + + void Foam::streamLineParticle::hitProcessorPatch ( const processorPolyPatch&, @@ -349,19 +372,6 @@ void Foam::streamLineParticle::hitWallPatch ( const wallPolyPatch& wpp, streamLineParticleCloud& cloud, - trackingData& td, - const tetIndices& -) -{ - // Remove particle - td.keepParticle = false; -} - - -void Foam::streamLineParticle::hitPatch -( - const polyPatch& wpp, - streamLineParticleCloud& cloud, trackingData& td ) { diff --git a/src/functionObjects/field/streamLine/streamLineParticle.H b/src/functionObjects/field/streamLine/streamLineParticle.H index d8f73afec9..0fe31679b1 100644 --- a/src/functionObjects/field/streamLine/streamLineParticle.H +++ b/src/functionObjects/field/streamLine/streamLineParticle.H @@ -220,10 +220,7 @@ public: ( const polyPatch&, streamLineParticleCloud& cloud, - trackingData& td, - const label patchi, - const scalar trackFraction, - const tetIndices& tetIs + trackingData& td ); //- Overridable function to handle the particle hitting a wedge @@ -260,6 +257,26 @@ public: trackingData& td ); + //- Overridable function to handle the particle hitting a + // cyclicAMIPatch + void hitCyclicAMIPatch + ( + const cyclicAMIPolyPatch&, + streamLineParticleCloud& cloud, + trackingData& td, + const vector& direction + ); + + //- Overridable function to handle the particle hitting a + // cyclicACMIPatch + void hitCyclicACMIPatch + ( + const cyclicACMIPolyPatch&, + streamLineParticleCloud& cloud, + trackingData& td, + const vector& direction + ); + //- Overridable function to handle the particle hitting a //- processorPatch void hitProcessorPatch @@ -274,15 +291,6 @@ public: ( const wallPolyPatch&, streamLineParticleCloud& cloud, - trackingData& td, - const tetIndices& - ); - - //- Overridable function to handle the particle hitting a polyPatch - void hitPatch - ( - const polyPatch&, - streamLineParticleCloud& cloud, trackingData& td ); diff --git a/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.C b/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.C index 202ff22abf..6e21609853 100644 --- a/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.C +++ b/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.C @@ -85,10 +85,7 @@ bool Foam::DSMCParcel::hitPatch ( const polyPatch&, TrackCloudType& cloud, - trackingData& td, - const label, - const scalar, - const tetIndices& + trackingData& td ) { return false; @@ -114,8 +111,7 @@ void Foam::DSMCParcel::hitWallPatch ( const wallPolyPatch& wpp, TrackCloudType& cloud, - trackingData& td, - const tetIndices& tetIs + trackingData& td ) { label wppIndex = wpp.index(); @@ -202,19 +198,6 @@ void Foam::DSMCParcel::hitWallPatch } -template -template -void Foam::DSMCParcel::hitPatch -( - const polyPatch&, - TrackCloudType& cloud, - trackingData& td -) -{ - td.keepParticle = false; -} - - template void Foam::DSMCParcel::transformProperties(const tensor& T) { diff --git a/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.H b/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.H index 3fe83c4b60..b96e785af8 100644 --- a/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.H +++ b/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.H @@ -266,10 +266,7 @@ public: ( const polyPatch&, TrackCloudType& cloud, - trackingData& td, - const label patchi, - const scalar trackFraction, - const tetIndices& tetIs + trackingData& td ); //- Overridable function to handle the particle hitting a @@ -288,16 +285,6 @@ public: ( const wallPolyPatch&, TrackCloudType& cloud, - trackingData& td, - const tetIndices& - ); - - //- Overridable function to handle the particle hitting a polyPatch - template - void hitPatch - ( - const polyPatch&, - TrackCloudType& cloud, trackingData& td ); diff --git a/src/lagrangian/basic/Cloud/Cloud.C b/src/lagrangian/basic/Cloud/Cloud.C index 394a38fb10..05d1b58aed 100644 --- a/src/lagrangian/basic/Cloud/Cloud.C +++ b/src/lagrangian/basic/Cloud/Cloud.C @@ -64,32 +64,6 @@ void Foam::Cloud::checkPatches() const } -template -void Foam::Cloud::calcCellWallFaces() const -{ - cellWallFacesPtr_.reset(new PackedBoolList(pMesh().nCells(), false)); - - PackedBoolList& cellWallFaces = cellWallFacesPtr_(); - - const polyBoundaryMesh& patches = polyMesh_.boundaryMesh(); - - forAll(patches, patchi) - { - if (isA(patches[patchi])) - { - const polyPatch& patch = patches[patchi]; - - const labelList& pFaceCells = patch.faceCells(); - - forAll(pFaceCells, pFCI) - { - cellWallFaces[pFaceCells[pFCI]] = true; - } - } - } -} - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template @@ -104,8 +78,6 @@ Foam::Cloud::Cloud IDLList(), polyMesh_(pMesh), labels_(), - nTrackingRescues_(), - cellWallFacesPtr_(), globalPositionsPtr_() { checkPatches(); @@ -124,19 +96,6 @@ Foam::Cloud::Cloud // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template -const Foam::PackedBoolList& Foam::Cloud::cellHasWallFaces() -const -{ - if (!cellWallFacesPtr_.valid()) - { - calcCellWallFaces(); - } - - return cellWallFacesPtr_(); -} - - template void Foam::Cloud::addParticle(ParticleType* pPtr) { @@ -195,9 +154,6 @@ void Foam::Cloud::move // Which patches are processor patches const labelList& procPatches = pData.processorPatches(); - // Indexing of patches into the procPatches list - const labelList& procPatchIndices = pData.processorPatchIndices(); - // Indexing of equivalent patch on neighbour processor into the // procPatches list on the neighbour const labelList& procPatchNeighbours = pData.processorPatchNeighbours(); @@ -219,10 +175,6 @@ void Foam::Cloud::move pIter().stepFraction() = 0; } - // Reset nTrackingRescues - nTrackingRescues_ = 0; - - // List of lists of particles to be transfered for all of the // neighbour processors List> particleTransferLists @@ -271,7 +223,7 @@ void Foam::Cloud::move ( !Pstream::parRun() || !p.onBoundaryFace() - || procPatchIndices[p.patch()] < 0 + || procPatchNeighbours[p.patch()] < 0 ) { FatalErrorInFunction @@ -390,16 +342,6 @@ void Foam::Cloud::move } } } - - if (cloud::debug) - { - reduce(nTrackingRescues_, sumOp