From ec54d9070d0ef849439b3c0126bc04b18348f4a7 Mon Sep 17 00:00:00 2001 From: Anna Wellmann <a.wellmann@tu-bs.de> Date: Mon, 13 Jun 2022 13:23:05 +0000 Subject: [PATCH] Use relative paths in flow around sphere --- apps/gpu/FlowAroundSphere/FlowAroundSphere.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/gpu/FlowAroundSphere/FlowAroundSphere.cpp b/apps/gpu/FlowAroundSphere/FlowAroundSphere.cpp index d42c82f3b..e1fea6196 100644 --- a/apps/gpu/FlowAroundSphere/FlowAroundSphere.cpp +++ b/apps/gpu/FlowAroundSphere/FlowAroundSphere.cpp @@ -94,8 +94,8 @@ int main(int argc, char *argv[]) ////////////////////////////////////////////////////////////////////////// // Simulation parameters ////////////////////////////////////////////////////////////////////////// - std::string path("/output/DrivenCavity"); - std::string simulationName("LidDrivenCavity"); + std::string outputPath("./output/Sphere"); + std::string simulationName("Sphere"); const real L = 1.0; const real Re = 1000.0; @@ -134,7 +134,7 @@ int main(int argc, char *argv[]) gridBuilder->addCoarseGrid(-1.0 * L, -1.0 * L, -1.0 * L, 1.0 * L, 1.0 * L, 1.0 * L, dx); // use primitive - Object* sphere = new Sphere(0.0, 0.0, 0.0, 1.0); + Object* sphere = new Sphere(0.0, 0.0, 0.0, 0.2); // use stl // Object* sphere = TriangularMesh::make("stl/sphere.stl"); gridBuilder->addGeometry(sphere); @@ -168,7 +168,7 @@ int main(int argc, char *argv[]) // set parameters ////////////////////////////////////////////////////////////////////////// - para->setOutputPath(path); + para->setOutputPath(outputPath); para->setOutputPrefix(simulationName); para->setPathAndFilename(para->getOutputPath() + "/" + para->getOutputPrefix()); @@ -295,7 +295,7 @@ int main(int argc, char *argv[]) Initializer::initializeDataUpdate(dataBase); - VtkWriter::write(dataBase, parameters, path + "/" + simulationName + "_0"); + VtkWriter::write(dataBase, parameters, outputPath + "/" + simulationName + "_0"); ////////////////////////////////////////////////////////////////////////// // set analyzers @@ -317,7 +317,7 @@ int main(int argc, char *argv[]) if (iter % timeStepOut == 0) { dataBase->copyDataDeviceToHost(); - VtkWriter::write(dataBase, parameters, path + "/" + simulationName + "_" + std::to_string(iter)); + VtkWriter::write(dataBase, parameters, outputPath + "/" + simulationName + "_" + std::to_string(iter)); } int crashCellIndex = dataBase->getCrashCellIndex(); @@ -325,7 +325,7 @@ int main(int argc, char *argv[]) *logging::out << logging::Logger::LOGGER_ERROR << "Simulation crashed at CellIndex = " << crashCellIndex << "\n"; dataBase->copyDataDeviceToHost(); - VtkWriter::write(dataBase, parameters, path + "/" + simulationName + "_" + std::to_string(iter)); + VtkWriter::write(dataBase, parameters, outputPath + "/" + simulationName + "_" + std::to_string(iter)); break; } -- GitLab