Commit ad871a16 authored by Mark Olesen's avatar Mark Olesen
Browse files

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

- should have been limited to non-processor patches only
parent 80fad848
......@@ -24,7 +24,6 @@ License
\*---------------------------------------------------------------------------*/
#include "StandardWallInteraction.H"
#include "processorPolyPatch.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
......@@ -43,11 +42,14 @@ Foam::StandardWallInteraction<CloudType>::StandardWallInteraction
),
e_(0.0),
mu_(0.0),
nEscape_(0),
massEscape_(0),
nStick_(0),
massStick_(0),
outputByInjectorId_(this->coeffDict().lookupOrDefault("outputByInjectorId", false)),
nEscape_(mesh_.boundaryMesh().nNonProcessor()),
massEscape_(nEscape_.size()),
nStick_(nEscape_.size()),
massStick_(nEscape_.size()),
outputByInjectorId_
(
this->coeffDict().lookupOrDefault("outputByInjectorId", false)
),
injIdToIndex_(cloud.injectors().size())
{
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)
{
label nInjectors(1);
......@@ -127,13 +116,6 @@ Foam::StandardWallInteraction<CloudType>::StandardWallInteraction
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template<class CloudType>
Foam::StandardWallInteraction<CloudType>::~StandardWallInteraction()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class CloudType>
......
......@@ -85,7 +85,7 @@ protected:
// Counters for particle fates
//- Number of parcels escaped
//- Number of parcels escaped
List<List<label>> nEscape_;
//- Mass of parcels escaped
......@@ -98,7 +98,7 @@ protected:
List<List<scalar>> massStick_;
//- Flag to output escaped/mass particles sorted by injectorID
Switch outputByInjectorId_;
bool outputByInjectorId_;
//- InjectorId to index map
Map<label> injIdToIndex_;
......@@ -129,7 +129,7 @@ public:
//- Destructor
virtual ~StandardWallInteraction();
virtual ~StandardWallInteraction() = default;
// Member Functions
......
Markdown is supported
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