Skip to content
Snippets Groups Projects
Commit 0ccafb5b authored by Konstantin Kutscher's avatar Konstantin Kutscher
Browse files

fixes restart of demObjects

parent c2c65947
No related branches found
No related tags found
No related merge requests found
......@@ -6,15 +6,15 @@ boundingBox = 60 1370 10 190 1530 320
#boundingBox = 60 0 10 190 1530 2320
blocknx = 10 10 10
#blocknx = 300 420 320
endTime = 20
outTime = 20
endTime = 100
outTime = 100
availMem = 25e9
uLB = 0.1
#PE parameters
peMinOffset = 0 0 0 #46 2 2
peMaxOffset = 0 0 0 #-8 -25 -2
sphereTime = 20
sphereTime = 100
#geometry files
pathGeo = d:/Projects/ThermoPlast/SimGeo
......
......@@ -41,16 +41,17 @@ void RestartDemObjectsCoProcessor::write(int step)
if (comm->isRoot()) UBLOG(logINFO, "RestartDemObjectsCoProcessor size p: " << p.size());
std::vector<double> values = comm->gather(p);
std::vector<double> rvalues;
comm->allGather(p, rvalues);
if (comm->isRoot())
{
std::string subfolder = "dem_cp_"+UbSystem::toString(step);
std::string filePath = path+"/dem_cp/"+subfolder+"/dem_cp.bin";
UbFileOutputBinary fo(filePath);
fo.writeInteger((int)values.size());
fo.writeVector<double>(values);
UBLOG(logINFO, "RestartDemObjectsCoProcessor size: " << values.size());
fo.writeInteger((int)rvalues.size());
fo.writeVector<double>(rvalues);
UBLOG(logINFO, "RestartDemObjectsCoProcessor size: " << rvalues.size());
}
if (comm->isRoot()) UBLOG(logINFO, "RestartDemObjectsCoProcessor write:stop ");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment