Skip to content
Snippets Groups Projects
Verified Commit 8f08f27b authored by Tobias Merkel's avatar Tobias Merkel
Browse files

[789-deprecate-content-of-globaldefinitions] to_string -> std::to_string

parent 3008122f
No related branches found
No related tags found
1 merge request!274789 deprecate content of globaldefinitions
...@@ -124,8 +124,8 @@ void NewmarkSolver::updateOldValues(double dt, const Vector &u) { ...@@ -124,8 +124,8 @@ void NewmarkSolver::updateOldValues(double dt, const Vector &u) {
void NewmarkSolver::PlotIteration(double time) const { void NewmarkSolver::PlotIteration(double time) const {
auto &plot_vel = mpp::plot("Velocity"); auto &plot_vel = mpp::plot("Velocity");
plot_vel.AddData("Velocity", oldValues.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"); auto &plot_acc = mpp::plot("Acceleration");
plot_acc.AddData("Acceleration", oldValues.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
...@@ -26,18 +26,20 @@ protected: ...@@ -26,18 +26,20 @@ protected:
int level = mainProgram->initLevels[0]; int level = mainProgram->initLevels[0];
for (auto &sampleAmount : mainProgram->initSampleAmount) { for (auto &sampleAmount : mainProgram->initSampleAmount) {
for (int sample = 0; sample < sampleAmount; sample++) { for (int sample = 0; sample < sampleAmount; sample++) {
std::string permeability = "sample_" + to_string(level) + std::string permeability = "sample_" + std::to_string(level) +
"_" + to_string(sample) + "/permeability"; "_" + std::to_string(sample) + "/permeability";
std::string u = "sample_" + to_string(level) + std::string u = "sample_" + std::to_string(level) +
"_" + to_string(sample) + "/u"; "_" + std::to_string(sample) + "/u";
ASSERT_TRUE(FileExists("data/vtk/" + permeability + ".vtk")); ASSERT_TRUE(FileExists("data/vtk/" + permeability + ".vtk"));
ASSERT_TRUE(FileExists("data/vtk/" + u + ".vtk")); ASSERT_TRUE(FileExists("data/vtk/" + u + ".vtk"));
if (level != mainProgram->initLevels[0]) { if (level != mainProgram->initLevels[0]) {
std::string name_coarse = "sample_coarse_" + to_string(level) + std::string name_coarse = "sample_coarse_" +
"_" + to_string(sample) + "/permeability"; std::to_string(level) +
std::string u_coarse = "sample_coarse_" + to_string(level) + "_" + std::to_string(sample) + "/permeability";
"_" + to_string(sample) + "/u"; 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/" + name_coarse + ".vtk"));
ASSERT_TRUE(FileExists("data/vtk/" + u_coarse + ".vtk")); ASSERT_TRUE(FileExists("data/vtk/" + u_coarse + ".vtk"));
} }
......
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