Skip to content

Commit a391fc0

Browse files
Proper update
1 parent 6876ba5 commit a391fc0

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

applications/MeshingApplication/tests/cpp_tests/mmg/test_mmg_io.cpp

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ KRATOS_TEST_CASE_IN_SUITE(MMGIO1, KratosMeshingApplicationFastSuite)
6666

6767
// Compute read/write
6868
Parameters params = Parameters(R"({ "echo_level" : 0 })" );
69-
MmgIO<MMGLibrary::MMG2D> mmg_io(FilesystemExtensions::JoinPaths({FilesystemExtensions::CurrentWorkingDirectory(), "mmg_output_2d"}));
69+
std::filesystem::path file_path = std::filesystem::current_path() / "mmg_output_2d";
70+
MmgIO<MMGLibrary::MMG2D> mmg_io(file_path.string());
7071
mmg_io.WriteModelPart(r_model_part);
7172

7273
Model this_aux_model;
@@ -81,11 +82,11 @@ KRATOS_TEST_CASE_IN_SUITE(MMGIO1, KratosMeshingApplicationFastSuite)
8182
KRATOS_EXPECT_TRUE(r_aux_model_part.HasSubModelPart(r_sub_model_part_name));
8283
}
8384

84-
std::filesystem::remove((FilesystemExtensions::JoinPaths({FilesystemExtensions::CurrentWorkingDirectory(), "mmg_output_2d.mesh"})).c_str());
85-
std::filesystem::remove((FilesystemExtensions::JoinPaths({FilesystemExtensions::CurrentWorkingDirectory(), "mmg_output_2d.sol"})).c_str());
86-
std::filesystem::remove((FilesystemExtensions::JoinPaths({FilesystemExtensions::CurrentWorkingDirectory(), "mmg_output_2d.json"})).c_str());
87-
std::filesystem::remove((FilesystemExtensions::JoinPaths({FilesystemExtensions::CurrentWorkingDirectory(), "mmg_output_2d.cond.ref.json"})).c_str());
88-
std::filesystem::remove((FilesystemExtensions::JoinPaths({FilesystemExtensions::CurrentWorkingDirectory(), "mmg_output_2d.elem.ref.json"})).c_str());
85+
std::filesystem::remove(std::filesystem::current_path() / "mmg_output_2d.mesh");
86+
std::filesystem::remove(std::filesystem::current_path() / "mmg_output_2d.sol");
87+
std::filesystem::remove(std::filesystem::current_path() / "mmg_output_2d.json");
88+
std::filesystem::remove(std::filesystem::current_path() / "mmg_output_2d.cond.ref.json");
89+
std::filesystem::remove(std::filesystem::current_path() / "mmg_output_2d.elem.ref.json");
8990
}
9091

9192
/**
@@ -129,7 +130,8 @@ KRATOS_TEST_CASE_IN_SUITE(MMGIO2, KratosMeshingApplicationFastSuite)
129130

130131
// Compute read/write
131132
Parameters params = Parameters(R"({ "echo_level" : 0 })" );
132-
MmgIO<MMGLibrary::MMG3D> mmg_io(FilesystemExtensions::JoinPaths({FilesystemExtensions::CurrentWorkingDirectory(), "mmg_output_3d"}));
133+
std::filesystem::path file_path = std::filesystem::current_path() / "mmg_output_3d";
134+
MmgIO<MMGLibrary::MMG3D> mmg_io(file_path.string());
133135
mmg_io.WriteModelPart(r_model_part);
134136

135137
Model this_aux_model;
@@ -144,11 +146,11 @@ KRATOS_TEST_CASE_IN_SUITE(MMGIO2, KratosMeshingApplicationFastSuite)
144146
KRATOS_EXPECT_TRUE(r_aux_model_part.HasSubModelPart(r_sub_model_part_name));
145147
}
146148

147-
std::filesystem::remove((FilesystemExtensions::JoinPaths({FilesystemExtensions::CurrentWorkingDirectory(), "mmg_output_3d.mesh"})).c_str());
148-
std::filesystem::remove((FilesystemExtensions::JoinPaths({FilesystemExtensions::CurrentWorkingDirectory(), "mmg_output_3d.sol"})).c_str());
149-
std::filesystem::remove((FilesystemExtensions::JoinPaths({FilesystemExtensions::CurrentWorkingDirectory(), "mmg_output_3d.json"})).c_str());
150-
std::filesystem::remove((FilesystemExtensions::JoinPaths({FilesystemExtensions::CurrentWorkingDirectory(), "mmg_output_3d.cond.ref.json"})).c_str());
151-
std::filesystem::remove((FilesystemExtensions::JoinPaths({FilesystemExtensions::CurrentWorkingDirectory(), "mmg_output_3d.elem.ref.json"})).c_str());
149+
std::filesystem::remove(std::filesystem::current_path() / "mmg_output_3d.mesh");
150+
std::filesystem::remove(std::filesystem::current_path() / "mmg_output_3d.sol");
151+
std::filesystem::remove(std::filesystem::current_path() / "mmg_output_3d.json");
152+
std::filesystem::remove(std::filesystem::current_path() / "mmg_output_3d.cond.ref.json");
153+
std::filesystem::remove(std::filesystem::current_path() / "mmg_output_3d.elem.ref.json");
152154
}
153155

154156
} // namespace Kratos::Testing.

0 commit comments

Comments
 (0)