From dfaefb753cacdbfaa019cd29ab2621f4fad3b7a6 Mon Sep 17 00:00:00 2001 From: andy <andy> Date: Tue, 22 Mar 2011 12:07:19 +0000 Subject: [PATCH] BUG: Corrected particle local interaction model --- .../LocalInteraction/LocalInteraction.C | 22 +------------------ .../LocalInteraction/LocalInteraction.H | 6 ----- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C index 457517b0cda..77fcefb2d90 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C @@ -27,24 +27,6 @@ License // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // -template<class CloudType> -Foam::label Foam::LocalInteraction<CloudType>::applyToPatch -( - const label globalPatchI -) const -{ - forAll(patchIDs_, patchI) - { - if (patchIDs_[patchI] == globalPatchI) - { - return patchI; - } - } - - return -1; -} - - template<class CloudType> void Foam::LocalInteraction<CloudType>::readProps() { @@ -131,7 +113,6 @@ Foam::LocalInteraction<CloudType>::LocalInteraction : PatchInteractionModel<CloudType>(dict, cloud, typeName), patchData_(cloud.mesh(), this->coeffDict()), - patchIDs_(patchData_.size()), nEscape0_(patchData_.size(), 0), massEscape0_(patchData_.size(), 0.0), nStick0_(patchData_.size(), 0), @@ -173,7 +154,6 @@ Foam::LocalInteraction<CloudType>::LocalInteraction : PatchInteractionModel<CloudType>(pim), patchData_(pim.patchData_), - patchIDs_(pim.patchIDs_), nEscape0_(pim.nEscape0_), massEscape0_(pim.massEscape0_), nStick0_(pim.nStick0_), @@ -208,7 +188,7 @@ bool Foam::LocalInteraction<CloudType>::correct bool& active = p.active(); - label patchI = applyToPatch(pp.index()); + label patchI = patchData_.applyToPatch(pp.index()); if (patchI >= 0) { diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H index 5d6962b5950..624dd73d25c 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.H @@ -53,9 +53,6 @@ class LocalInteraction //- List of participating patches const patchInteractionDataList patchData_; - //- List of participating patch ids - List<label> patchIDs_; - // Counters for initial particle fates @@ -89,9 +86,6 @@ class LocalInteraction // Private Member Functions - //- Returns local patchI if patch is in patchIds_ list - label applyToPatch(const label globalPatchI) const; - //- Read interaction properties from file void readProps(); -- GitLab