Skip to content
Snippets Groups Projects
Commit ec54d907 authored by Anna Wellmann's avatar Anna Wellmann
Browse files

Use relative paths in flow around sphere

parent c5ca517f
No related branches found
No related tags found
1 merge request!112Synchronize OpenSource GridGenerator and Develop
......@@ -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;
}
......
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