Commit cfeb72ec authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

added vtk_out parameter

parent e501b0b9
...@@ -160,9 +160,9 @@ int main( int argc, char ** argv ) ...@@ -160,9 +160,9 @@ int main( int argc, char ** argv )
WALBERLA_LOG_INFO_ON_ROOT("*** SETUP - END ***"); WALBERLA_LOG_INFO_ON_ROOT("*** SETUP - END ***");
WALBERLA_LOG_INFO_ON_ROOT("*** VTK ***"); WALBERLA_LOG_INFO_ON_ROOT("*** VTK ***");
auto vtkDomainOutput = walberla::vtk::createVTKOutput_DomainDecomposition( forest, "domain_decomposition", 1, "vtk_out", "simulation_step" ); auto vtkDomainOutput = walberla::vtk::createVTKOutput_DomainDecomposition( forest, "domain_decomposition", 1, params.vtk_out, "simulation_step" );
auto vtkOutput = make_shared<mesa_pd::vtk::ParticleVtkOutput>(ps) ; auto vtkOutput = make_shared<mesa_pd::vtk::ParticleVtkOutput>(ps) ;
auto vtkWriter = walberla::vtk::createVTKOutput_PointData(vtkOutput, "Bodies", 1, "vtk", "simulation_step", false, false); auto vtkWriter = walberla::vtk::createVTKOutput_PointData(vtkOutput, "Bodies", 1, params.vtk_out, "simulation_step", false, false);
vtkOutput->addOutput<SelectRank>("rank"); vtkOutput->addOutput<SelectRank>("rank");
vtkOutput->addOutput<data::SelectParticleOwner>("owner"); vtkOutput->addOutput<data::SelectParticleOwner>("owner");
// vtkDomainOutput->write(); // vtkDomainOutput->write();
......
...@@ -163,9 +163,9 @@ int main( int argc, char ** argv ) ...@@ -163,9 +163,9 @@ int main( int argc, char ** argv )
WALBERLA_LOG_INFO_ON_ROOT("*** SETUP - END ***"); WALBERLA_LOG_INFO_ON_ROOT("*** SETUP - END ***");
WALBERLA_LOG_INFO_ON_ROOT("*** VTK ***"); WALBERLA_LOG_INFO_ON_ROOT("*** VTK ***");
auto vtkDomainOutput = walberla::vtk::createVTKOutput_DomainDecomposition( forest, "domain_decomposition", 1, "vtk_out", "simulation_step" ); auto vtkDomainOutput = walberla::vtk::createVTKOutput_DomainDecomposition( forest, "domain_decomposition", 1, params.vtk_out, "simulation_step" );
auto vtkOutput = make_shared<mesa_pd::vtk::ParticleVtkOutput>(ps) ; auto vtkOutput = make_shared<mesa_pd::vtk::ParticleVtkOutput>(ps) ;
auto vtkWriter = walberla::vtk::createVTKOutput_PointData(vtkOutput, "Bodies", 1, "vtk", "simulation_step", false, false); auto vtkWriter = walberla::vtk::createVTKOutput_PointData(vtkOutput, "Bodies", 1, params.vtk_out, "simulation_step", false, false);
vtkOutput->addOutput<SelectRank>("rank"); vtkOutput->addOutput<SelectRank>("rank");
vtkOutput->addOutput<data::SelectParticleOwner>("owner"); vtkOutput->addOutput<data::SelectParticleOwner>("owner");
vtkOutput->addOutput<SelectIdx>("idx"); vtkOutput->addOutput<SelectIdx>("idx");
......
...@@ -223,9 +223,9 @@ int main( int argc, char ** argv ) ...@@ -223,9 +223,9 @@ int main( int argc, char ** argv )
WALBERLA_LOG_INFO_ON_ROOT("*** SETUP - END ***"); WALBERLA_LOG_INFO_ON_ROOT("*** SETUP - END ***");
WALBERLA_LOG_INFO_ON_ROOT("*** VTK ***"); WALBERLA_LOG_INFO_ON_ROOT("*** VTK ***");
auto vtkDomainOutput = walberla::vtk::createVTKOutput_DomainDecomposition( forest, "domain_decomposition", 1, "vtk_out", "simulation_step" ); auto vtkDomainOutput = walberla::vtk::createVTKOutput_DomainDecomposition( forest, "domain_decomposition", 1, params.vtk_out, "simulation_step" );
auto vtkOutput = make_shared<mesa_pd::vtk::ParticleVtkOutput>(ps) ; auto vtkOutput = make_shared<mesa_pd::vtk::ParticleVtkOutput>(ps) ;
auto vtkWriter = walberla::vtk::createVTKOutput_PointData(vtkOutput, "Bodies", 1, "vtk", "simulation_step", false, false); auto vtkWriter = walberla::vtk::createVTKOutput_PointData(vtkOutput, "Bodies", 1, params.vtk_out, "simulation_step", false, false);
vtkOutput->addOutput<SelectRank>("rank"); vtkOutput->addOutput<SelectRank>("rank");
vtkOutput->addOutput<data::SelectParticleOwner>("owner"); vtkOutput->addOutput<data::SelectParticleOwner>("owner");
vtkOutput->addOutput<SelectIdx>("idx"); vtkOutput->addOutput<SelectIdx>("idx");
......
...@@ -221,9 +221,9 @@ int main( int argc, char ** argv ) ...@@ -221,9 +221,9 @@ int main( int argc, char ** argv )
WALBERLA_LOG_INFO_ON_ROOT("*** SETUP - END ***"); WALBERLA_LOG_INFO_ON_ROOT("*** SETUP - END ***");
WALBERLA_LOG_INFO_ON_ROOT("*** VTK ***"); WALBERLA_LOG_INFO_ON_ROOT("*** VTK ***");
auto vtkDomainOutput = walberla::vtk::createVTKOutput_DomainDecomposition( forest, "domain_decomposition", 1, "vtk", "simulation_step" ); auto vtkDomainOutput = walberla::vtk::createVTKOutput_DomainDecomposition( forest, "domain_decomposition", 1, params.vtk_out, "simulation_step" );
auto vtkOutput = make_shared<mesa_pd::vtk::ParticleVtkOutput>(ps) ; auto vtkOutput = make_shared<mesa_pd::vtk::ParticleVtkOutput>(ps) ;
auto vtkWriter = walberla::vtk::createVTKOutput_PointData(vtkOutput, "Bodies", 1, "vtk", "simulation_step", false, false); auto vtkWriter = walberla::vtk::createVTKOutput_PointData(vtkOutput, "Bodies", 1, params.vtk_out, "simulation_step", false, false);
vtkOutput->addOutput<SelectRank>("rank"); vtkOutput->addOutput<SelectRank>("rank");
vtkOutput->addOutput<data::SelectParticleOwner>("owner"); vtkOutput->addOutput<data::SelectParticleOwner>("owner");
vtkDomainOutput->write(); vtkDomainOutput->write();
......
...@@ -174,9 +174,9 @@ int main( int argc, char ** argv ) ...@@ -174,9 +174,9 @@ int main( int argc, char ** argv )
} }
WALBERLA_LOG_INFO_ON_ROOT("*** VTK ***"); WALBERLA_LOG_INFO_ON_ROOT("*** VTK ***");
auto vtkDomainOutput = vtk::createVTKOutput_DomainDecomposition( forest, "domain_decomposition", 1, "vtk_out", "simulation_step" ); auto vtkDomainOutput = vtk::createVTKOutput_DomainDecomposition( forest, "domain_decomposition", 1, params.vtk_out, "simulation_step" );
auto vtkSphereHelper = make_shared<SphereVtkOutput>(storageID, *forest) ; auto vtkSphereHelper = make_shared<SphereVtkOutput>(storageID, *forest) ;
auto vtkSphereOutput = vtk::createVTKOutput_PointData(vtkSphereHelper, "Bodies", 1, "vtk_out", "simulation_step", false, false); auto vtkSphereOutput = vtk::createVTKOutput_PointData(vtkSphereHelper, "Bodies", 1, params.vtk_out, "simulation_step", false, false);
WALBERLA_LOG_INFO_ON_ROOT("*** SETUP - START ***"); WALBERLA_LOG_INFO_ON_ROOT("*** SETUP - START ***");
//const real_t static_cof ( real_c(0.1) / 2 ); // Coefficient of static friction. Note: pe doubles the input coefficient of friction for material-material contacts. //const real_t static_cof ( real_c(0.1) / 2 ); // Coefficient of static friction. Note: pe doubles the input coefficient of friction for material-material contacts.
......
...@@ -251,9 +251,9 @@ int main( int argc, char ** argv ) ...@@ -251,9 +251,9 @@ int main( int argc, char ** argv )
} }
WALBERLA_LOG_INFO_ON_ROOT("*** VTK ***"); WALBERLA_LOG_INFO_ON_ROOT("*** VTK ***");
auto vtkDomainOutput = vtk::createVTKOutput_DomainDecomposition( forest, "domain_decomposition", 1, "vtk_out", "simulation_step" ); auto vtkDomainOutput = vtk::createVTKOutput_DomainDecomposition( forest, "domain_decomposition", 1, params.vtk_out, "simulation_step" );
auto vtkSphereHelper = make_shared<SphereVtkOutput>(storageID, *forest) ; auto vtkSphereHelper = make_shared<SphereVtkOutput>(storageID, *forest) ;
auto vtkSphereOutput = vtk::createVTKOutput_PointData(vtkSphereHelper, "Bodies", 1, "vtk_out", "simulation_step", false, false); auto vtkSphereOutput = vtk::createVTKOutput_PointData(vtkSphereHelper, "Bodies", 1, params.vtk_out, "simulation_step", false, false);
WALBERLA_LOG_INFO_ON_ROOT("*** SETUP - START ***"); WALBERLA_LOG_INFO_ON_ROOT("*** SETUP - START ***");
//const real_t static_cof ( real_c(0.1) / 2 ); // Coefficient of static friction. Note: pe doubles the input coefficient of friction for material-material contacts. //const real_t static_cof ( real_c(0.1) / 2 ); // Coefficient of static friction. Note: pe doubles the input coefficient of friction for material-material contacts.
......
...@@ -69,8 +69,8 @@ void loadFromConfig(Parameters& params, const Config::BlockHandle& cfg) ...@@ -69,8 +69,8 @@ void loadFromConfig(Parameters& params, const Config::BlockHandle& cfg)
params.visSpacing = cfg.getParameter<int64_t>("visSpacing", 1000 ); params.visSpacing = cfg.getParameter<int64_t>("visSpacing", 1000 );
WALBERLA_LOG_INFO_ON_ROOT("visSpacing: " << params.visSpacing); WALBERLA_LOG_INFO_ON_ROOT("visSpacing: " << params.visSpacing);
params.path = cfg.getParameter<std::string>("path", "vtk_out" ); params.vtk_out = cfg.getParameter<std::string>("vtk_out", "vtk_out" );
WALBERLA_LOG_INFO_ON_ROOT("path: " << params.path); WALBERLA_LOG_INFO_ON_ROOT("vtk_out: " << params.vtk_out);
params.sqlFile = cfg.getParameter<std::string>("sqlFile", "benchmark.sqlite" ); params.sqlFile = cfg.getParameter<std::string>("sqlFile", "benchmark.sqlite" );
WALBERLA_LOG_INFO_ON_ROOT("sqlFile: " << params.sqlFile); WALBERLA_LOG_INFO_ON_ROOT("sqlFile: " << params.sqlFile);
...@@ -150,7 +150,7 @@ void saveToSQL(const Parameters& params, ...@@ -150,7 +150,7 @@ void saveToSQL(const Parameters& params,
integerProperties["visSpacing"] = params.visSpacing; integerProperties["visSpacing"] = params.visSpacing;
stringProperties["path"] = params.path; stringProperties["vtk_out"] = params.vtk_out;
stringProperties["sqlFile"] = params.sqlFile; stringProperties["sqlFile"] = params.sqlFile;
......
...@@ -48,7 +48,7 @@ struct Parameters ...@@ -48,7 +48,7 @@ struct Parameters
int64_t simulationSteps = 10; int64_t simulationSteps = 10;
real_t dt = real_t(0.01); real_t dt = real_t(0.01);
int64_t visSpacing = 1000; int64_t visSpacing = 1000;
std::string path = "vtk_out"; std::string vtk_out = "vtk_out";
std::string sqlFile = "benchmark.sqlite"; std::string sqlFile = "benchmark.sqlite";
bool recalculateBlockLevelsInRefresh = false; bool recalculateBlockLevelsInRefresh = false;
bool alwaysRebalanceInRefresh = true; bool alwaysRebalanceInRefresh = true;
......
...@@ -16,7 +16,7 @@ cfg.addParameter("initialRefinementLevel", "int64_t", "0") ...@@ -16,7 +16,7 @@ cfg.addParameter("initialRefinementLevel", "int64_t", "0")
cfg.addParameter("simulationSteps", "int64_t", "10") cfg.addParameter("simulationSteps", "int64_t", "10")
cfg.addParameter("dt", "real_t", "real_t(0.01)") cfg.addParameter("dt", "real_t", "real_t(0.01)")
cfg.addParameter("visSpacing", "int64_t", "1000") cfg.addParameter("visSpacing", "int64_t", "1000")
cfg.addParameter("path", "std::string", '"vtk_out"') cfg.addParameter("vtk_out", "std::string", '"vtk_out"')
cfg.addParameter("sqlFile", "std::string", '"benchmark.sqlite"') cfg.addParameter("sqlFile", "std::string", '"benchmark.sqlite"')
cfg.addParameter("recalculateBlockLevelsInRefresh", "bool", "false"); cfg.addParameter("recalculateBlockLevelsInRefresh", "bool", "false");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment