Commit a8590fb7 authored by daniele.corallo's avatar daniele.corallo
Browse files

Merge branch 'fixcgcom' into 'feature'

Fixcgcom

See merge request mpp/mpp!402
parents 75d612c8 6535fae6
#include "Distribution.hpp"
#include "Parallel.hpp"
#include <algorithm>
#include <list>
#include <map>
#include <functional>
void Distribution::DistributeMesh(Mesh &mesh) {
mout.StartBlock("Distribute");
int startDist = (int) distributedCells.size();
......
......@@ -136,7 +136,7 @@ void CoarseGeometry::CommunicateGeometry() {
ExchangeBuffer exBuffer;
if (PPM->Master()) {
for (int q = 1; q < PPM->Size(); ++q) {
exBuffer.Send(q) << int(timeSteps.size());
exBuffer.Send(q) << timeSteps.size();
for (double timeStep : timeSteps) {
exBuffer.Send(q) << double(timeStep);
}
......@@ -144,12 +144,11 @@ void CoarseGeometry::CommunicateGeometry() {
}
exBuffer.Communicate();
if (!PPM->Master()) {
int m;
size_t m;
exBuffer.Receive(0) >> m;
timeSteps.resize(m);
for (int i = 0; i < m; i++) {
exBuffer.Receive(0) >> timeSteps[i];
}
}
exBuffer.ClearBuffers();
......
......@@ -132,22 +132,28 @@ void Meshes::Init() {
meshes.at({i + 1, j + 1})->Finish();
}
}
mout.StartBlock("DistMesh");
dist->DistributeMesh(*meshes.at({plevel, plevel}));
mout.EndBlock(verbose < 100);
mout.StartBlock("Overlap");
olap->CellsOverlap_dG2(*meshes.at({plevel, plevel}));
mout.EndBlock(verbose < 100);
mout.StartBlock("RefineTime");
for (int tLevel = plevel; tLevel < fineLevel; ++tLevel) {
meshes[{plevel, tLevel + 1}] = meshes.at({plevel, tLevel})->RefineSTMeshInTime();
olap->CellsOverlap_dG2(*meshes.at({plevel, tLevel + 1}));
}
mout.EndBlock(verbose < 100);
mout.StartBlock("RefineSpace");
for (int sLevel = plevel; sLevel < fineLevel; ++sLevel) {
for (int tLevel = plevel; tLevel < fineLevel + 1; ++tLevel) {
mout.StartBlock("RefineSpace" + LevelPair{sLevel, tLevel}.str());
meshes[{sLevel + 1, tLevel}] = meshes.at({sLevel, tLevel})->RefineSTMeshInSpace();
olap->CellsOverlap_dG2(*meshes.at({sLevel + 1, tLevel}));
mout.EndBlock(verbose < 100);
}
}
mout.EndBlock(verbose < 100);
// for (int i = plevel; i <= fineLevel; ++i)
// olap->OverlapMesh(*meshes[i]);
......
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