Commit 216ea917 authored by daniele.corallo's avatar daniele.corallo
Browse files

[403-add-stdist-warnings] rmv if for stDist, fixed communication of Timesteps

parent 6a356742
...@@ -1046,17 +1046,17 @@ void Distribution::DistributeSTMesh(Mesh &mesh) { ...@@ -1046,17 +1046,17 @@ void Distribution::DistributeSTMesh(Mesh &mesh) {
int L0 = rekDepth; int L0 = rekDepth;
for (int i = 0; i < rekDepth; ++i) { for (int i = 0; i < rekDepth; ++i) {
if (L0 == 0) break; if (L0 == 0) break;
if (tL < Slice_Maximum && Slice_Maximum > 0) { if (tL < Slice_Maximum) {
++tL; ++tL;
--L0; --L0;
} }
if (L0 == 0) break; if (L0 == 0) break;
if (xL < X_Maximum && X_Maximum > 0) { if (xL < X_Maximum) {
++xL; ++xL;
--L0; --L0;
} }
if (L0 == 0) break; if (L0 == 0) break;
if (yL < Y_Maximum && Y_Maximum > 0) { if (yL < Y_Maximum) {
++yL; ++yL;
--L0; --L0;
} }
......
...@@ -136,7 +136,7 @@ void CoarseGeometry::CommunicateGeometry() { ...@@ -136,7 +136,7 @@ void CoarseGeometry::CommunicateGeometry() {
ExchangeBuffer exBuffer; ExchangeBuffer exBuffer;
if (PPM->Master()) { if (PPM->Master()) {
for (int q = 1; q < PPM->Size(); ++q) { for (int q = 1; q < PPM->Size(); ++q) {
exBuffer.Send(q) << timeSteps.size(); exBuffer.Send(q) << int(timeSteps.size());
for (double timeStep : timeSteps) { for (double timeStep : timeSteps) {
exBuffer.Send(q) << double(timeStep); exBuffer.Send(q) << double(timeStep);
} }
...@@ -147,8 +147,9 @@ void CoarseGeometry::CommunicateGeometry() { ...@@ -147,8 +147,9 @@ void CoarseGeometry::CommunicateGeometry() {
int m; int m;
exBuffer.Receive(0) >> m; exBuffer.Receive(0) >> m;
timeSteps.resize(m); timeSteps.resize(m);
for (double & timeStep : timeSteps) { for (int i = 0; i < m; i++) {
exBuffer.Receive(0) >> timeStep; exBuffer.Receive(0) >> timeSteps[i];
} }
} }
exBuffer.ClearBuffers(); exBuffer.ClearBuffers();
......
Supports Markdown
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