Skip to content
Snippets Groups Projects
Commit bb74bd28 authored by Rafael Ravedutti's avatar Rafael Ravedutti
Browse files

Include small value in subdomain check to not remove intersection particles


Signed-off-by: default avatarRafael Ravedutti <rafaelravedutti@gmail.com>
parent f7f3b388
No related merge requests found
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
#pragma once #pragma once
#define SMALL 0.00001
typedef double real_t; typedef double real_t;
namespace pairs { namespace pairs {
...@@ -96,9 +98,9 @@ public: ...@@ -96,9 +98,9 @@ public:
int getWorldSize() const { return world_size; } int getWorldSize() const { return world_size; }
int getRank() const { return rank; } int getRank() const { return rank; }
int isWithinSubdomain(real_t x, real_t y, real_t z) { int isWithinSubdomain(real_t x, real_t y, real_t z) {
return x > subdom_min[0] && x < subdom_max[0] && return x >= subdom_min[0] && x < subdom_max[0] - SMALL &&
y > subdom_min[1] && y < subdom_max[1] && y >= subdom_min[1] && y < subdom_max[1] - SMALL &&
z > subdom_min[2] && z < subdom_max[2]; z >= subdom_min[2] && z < subdom_max[2] - SMALL;
} }
void fillArrays(int neighbor_ranks[], int pbc[], real_t subdom[]) { void fillArrays(int neighbor_ranks[], int pbc[], real_t subdom[]) {
......
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