From 8f08f27b886ff451769d8a163d92d738a3805d8d Mon Sep 17 00:00:00 2001 From: uujsm <uujsm@student.kit.edu> Date: Mon, 16 Dec 2024 22:52:12 +0100 Subject: [PATCH] [789-deprecate-content-of-globaldefinitions] to_string -> std::to_string --- src/elasticity/solvers/ElasticityNewmark.cpp | 4 ++-- test/elasticity/TestMainProgram.cpp | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/elasticity/solvers/ElasticityNewmark.cpp b/src/elasticity/solvers/ElasticityNewmark.cpp index d5db74157..94d02c2ea 100644 --- a/src/elasticity/solvers/ElasticityNewmark.cpp +++ b/src/elasticity/solvers/ElasticityNewmark.cpp @@ -124,8 +124,8 @@ void NewmarkSolver::updateOldValues(double dt, const Vector &u) { void NewmarkSolver::PlotIteration(double time) const { auto &plot_vel = mpp::plot("Velocity"); plot_vel.AddData("Velocity", oldValues.Velocity()); - plot_vel.PlotFile("Velocity" + to_string(time)); + plot_vel.PlotFile("Velocity" + std::to_string(time)); auto &plot_acc = mpp::plot("Acceleration"); plot_acc.AddData("Acceleration", oldValues.Acceleration()); - plot_acc.PlotFile("Acceleration" + to_string(time)); + plot_acc.PlotFile("Acceleration" + std::to_string(time)); } \ No newline at end of file diff --git a/test/elasticity/TestMainProgram.cpp b/test/elasticity/TestMainProgram.cpp index 68de499ec..695987134 100644 --- a/test/elasticity/TestMainProgram.cpp +++ b/test/elasticity/TestMainProgram.cpp @@ -26,18 +26,20 @@ protected: int level = mainProgram->initLevels[0]; for (auto &sampleAmount : mainProgram->initSampleAmount) { for (int sample = 0; sample < sampleAmount; sample++) { - std::string permeability = "sample_" + to_string(level) + - "_" + to_string(sample) + "/permeability"; - std::string u = "sample_" + to_string(level) + - "_" + to_string(sample) + "/u"; + std::string permeability = "sample_" + std::to_string(level) + + "_" + std::to_string(sample) + "/permeability"; + std::string u = "sample_" + std::to_string(level) + + "_" + std::to_string(sample) + "/u"; ASSERT_TRUE(FileExists("data/vtk/" + permeability + ".vtk")); ASSERT_TRUE(FileExists("data/vtk/" + u + ".vtk")); if (level != mainProgram->initLevels[0]) { - std::string name_coarse = "sample_coarse_" + to_string(level) + - "_" + to_string(sample) + "/permeability"; - std::string u_coarse = "sample_coarse_" + to_string(level) + - "_" + to_string(sample) + "/u"; + std::string name_coarse = "sample_coarse_" + + std::to_string(level) + + "_" + std::to_string(sample) + "/permeability"; + std::string u_coarse = "sample_coarse_" + std::to_string(level) + + + "_" + std::to_string(sample) + "/u"; ASSERT_TRUE(FileExists("data/vtk/" + name_coarse + ".vtk")); ASSERT_TRUE(FileExists("data/vtk/" + u_coarse + ".vtk")); } -- GitLab