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