Skip to content
Snippets Groups Projects
Commit c4ac648e authored by Markus Holzer's avatar Markus Holzer
Browse files

[skip ci] test

parent e9640983
No related branches found
No related tags found
No related merge requests found
Pipeline #66320 skipped
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "core/timing/TimingPool.h" #include "core/timing/TimingPool.h"
#include <string> #include <string>
#include <fstream>
#include "LdcSetup.h" #include "LdcSetup.h"
#include "NonUniformGridGPUInfoHeader.h" #include "NonUniformGridGPUInfoHeader.h"
...@@ -84,8 +85,7 @@ void createSetupBlockForest(SetupBlockForest& setupBfs, ...@@ -84,8 +85,7 @@ void createSetupBlockForest(SetupBlockForest& setupBfs,
if(outputStatistics){ if(outputStatistics){
WALBERLA_LOG_INFO_ON_ROOT("=========================== BLOCK FOREST STATISTICS ============================"); WALBERLA_LOG_INFO_ON_ROOT("=========================== BLOCK FOREST STATISTICS ============================");
WALBERLA_LOG_INFO_ON_ROOT("Blocks created: " << setupBfs.getNumberOfBlocks()) WALBERLA_LOG_INFO_ON_ROOT("Blocks created: " << setupBfs.getNumberOfBlocks())
for (uint_t level = 0; level <= refinementDepth; level++) for (uint_t level = 0; level <= refinementDepth; level++){
{
const uint_t numberOfBlocks = setupBfs.getNumberOfBlocks(level); const uint_t numberOfBlocks = setupBfs.getNumberOfBlocks(level);
WALBERLA_LOG_INFO_ON_ROOT("Level " << level << " Blocks: " << numberOfBlocks) WALBERLA_LOG_INFO_ON_ROOT("Level " << level << " Blocks: " << numberOfBlocks)
} }
...@@ -121,21 +121,19 @@ void createBlockForest(shared_ptr< BlockForest >& bfs, ...@@ -121,21 +121,19 @@ void createBlockForest(shared_ptr< BlockForest >& bfs,
std::ostringstream oss; std::ostringstream oss;
oss << blockForestFilestem << ".bfs"; oss << blockForestFilestem << ".bfs";
const std::string setupBlockForestFilepath = oss.str(); const std::string setupBlockForestFilepath = oss.str();
if(!std::filesystem::exists(setupBlockForestFilepath.c_str())) std::ifstream infile(setupBlockForestFilepath.c_str());
{ if(!infile.good()){
WALBERLA_LOG_WARNING_ON_ROOT("Blockforest was not created beforehand and thus needs to be created on the fly. For large simulation runs this can be a severe problem!") WALBERLA_LOG_WARNING_ON_ROOT("Blockforest was not created beforehand and thus needs to be created on the fly. For large simulation runs this can be a severe problem!")
SetupBlockForest setupBfs; SetupBlockForest setupBfs;
createSetupBlockForest(setupBfs, domainSetup, blockForestSetup, true); createSetupBlockForest(setupBfs, domainSetup, blockForestSetup, true);
bfs = std::make_shared< BlockForest >(uint_c(MPIManager::instance()->worldRank()), setupBfs); bfs = std::make_shared< BlockForest >(uint_c(MPIManager::instance()->worldRank()), setupBfs);
} }
else else{
{
bfs = std::make_shared< BlockForest >(uint_c(MPIManager::instance()->worldRank()), bfs = std::make_shared< BlockForest >(uint_c(MPIManager::instance()->worldRank()),
setupBlockForestFilepath.c_str(), false); setupBlockForestFilepath.c_str(), false);
} }
} }
else else{
{
SetupBlockForest setupBfs; SetupBlockForest setupBfs;
createSetupBlockForest(setupBfs, domainSetup, blockForestSetup); createSetupBlockForest(setupBfs, domainSetup, blockForestSetup);
bfs = std::make_shared< BlockForest >(uint_c(MPIManager::instance()->worldRank()), setupBfs); bfs = std::make_shared< BlockForest >(uint_c(MPIManager::instance()->worldRank()), setupBfs);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment