From 9ad110ed3b2e0799b1ac156e7a307810eaa8f0b7 Mon Sep 17 00:00:00 2001 From: Anna Wellmann <a.wellmann@tu-bs.de> Date: Mon, 27 Jun 2022 16:34:57 +0000 Subject: [PATCH] Call initGridPaths in setGridPaths --- src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp b/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp index 3f4ffcabb..df616a41b 100644 --- a/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp +++ b/src/gpu/VirtualFluids_GPU/Parameter/Parameter.cpp @@ -360,18 +360,17 @@ void Parameter::initGridPaths(){ std::string gridPath = this->getGridPath(); // add missing slash to gridPath - if (gridPath.back() != '/') - { + if (gridPath.back() != '/') { gridPath += "/"; - this->setGridPath(gridPath); + ic.gridPath = gridPath; } - // for multi-gpu add process id - if (this->getNumprocs() > 1){ + // for multi-gpu add process id (if not already there) + if (this->getNumprocs() > 1) { gridPath += StringUtil::toString(this->getMyID()) + "/"; - this->setGridPath(gridPath); + ic.gridPath = gridPath; } - + ////////////////////////////////////////////////////////////////////////// this->setgeoVec(gridPath + "geoVec.dat"); @@ -758,6 +757,7 @@ void Parameter::setFName(std::string fname) void Parameter::setGridPath(std::string gridPath) { ic.gridPath = gridPath; + this->initGridPaths(); } void Parameter::setPrintFiles(bool printfiles) { -- GitLab