BUG: spray/wall interactions failing in parallel (closes #737)

- should have been limited to non-processor patches only
This commit is contained in:
Mark Olesen
2018-02-20 11:51:08 +01:00
parent 80fad8483b
commit ad871a16fc
2 changed files with 11 additions and 29 deletions

View File

@ -24,7 +24,6 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "StandardWallInteraction.H" #include "StandardWallInteraction.H"
#include "processorPolyPatch.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
@ -43,11 +42,14 @@ Foam::StandardWallInteraction<CloudType>::StandardWallInteraction
), ),
e_(0.0), e_(0.0),
mu_(0.0), mu_(0.0),
nEscape_(0), nEscape_(mesh_.boundaryMesh().nNonProcessor()),
massEscape_(0), massEscape_(nEscape_.size()),
nStick_(0), nStick_(nEscape_.size()),
massStick_(0), massStick_(nEscape_.size()),
outputByInjectorId_(this->coeffDict().lookupOrDefault("outputByInjectorId", false)), outputByInjectorId_
(
this->coeffDict().lookupOrDefault("outputByInjectorId", false)
),
injIdToIndex_(cloud.injectors().size()) injIdToIndex_(cloud.injectors().size())
{ {
switch (interactionType_) switch (interactionType_)
@ -74,19 +76,6 @@ Foam::StandardWallInteraction<CloudType>::StandardWallInteraction
{} {}
} }
label nPatches = 0;
forAll(mesh_.boundaryMesh(), patchi)
{
if (!isA<processorPolyPatch>(mesh_.boundaryMesh()[patchi]))
{
nPatches++;
}
}
nEscape_.setSize(nPatches);
massEscape_.setSize(nPatches);
nStick_.setSize(nPatches);
massStick_.setSize(nPatches);
forAll(nEscape_, patchi) forAll(nEscape_, patchi)
{ {
label nInjectors(1); label nInjectors(1);
@ -127,13 +116,6 @@ Foam::StandardWallInteraction<CloudType>::StandardWallInteraction
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class CloudType>
Foam::StandardWallInteraction<CloudType>::~StandardWallInteraction()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class CloudType> template<class CloudType>

View File

@ -85,7 +85,7 @@ protected:
// Counters for particle fates // Counters for particle fates
//- Number of parcels escaped //- Number of parcels escaped
List<List<label>> nEscape_; List<List<label>> nEscape_;
//- Mass of parcels escaped //- Mass of parcels escaped
@ -98,7 +98,7 @@ protected:
List<List<scalar>> massStick_; List<List<scalar>> massStick_;
//- Flag to output escaped/mass particles sorted by injectorID //- Flag to output escaped/mass particles sorted by injectorID
Switch outputByInjectorId_; bool outputByInjectorId_;
//- InjectorId to index map //- InjectorId to index map
Map<label> injIdToIndex_; Map<label> injIdToIndex_;
@ -129,7 +129,7 @@ public:
//- Destructor //- Destructor
virtual ~StandardWallInteraction(); virtual ~StandardWallInteraction() = default;
// Member Functions // Member Functions