Commit f071e4b9 authored by niklas.baumgarten's avatar niklas.baumgarten
Browse files

nice fix

parent f60b858b
Pipeline #145756 passed with stages
in 45 minutes and 1 second
......@@ -11,6 +11,7 @@
struct SampleID {
public:
int fLevel;
int cLevel;
std::string name;
......
......@@ -16,88 +16,88 @@
namespace fs = std::filesystem;
std::vector<SampleID> testIds = {
SampleID(0, 0, false),
SampleID(0, 1, true),
SampleID(1, 2, false),
SampleID(1, 3, true),
SampleID(2, 4, false),
SampleID(2, 5, true),
SampleID(3, 6, false),
SampleID(3, 7, true),
SampleID(4, 8, false),
SampleID(4, 9, true),
SampleID(5, 10, false),
SampleID(5, 11, true),
SampleID(6, 12, false),
SampleID(6, 13, true),
SampleID(0, 1, false),
SampleID(0, 2, true),
SampleID(1, 3, false),
SampleID(1, 4, true),
SampleID(2, 5, false),
SampleID(2, 6, true),
SampleID(3, 7, false),
SampleID(3, 8, true),
SampleID(4, 9, false),
SampleID(4, 10, true),
SampleID(5, 11, false),
SampleID(5, 12, true),
SampleID(6, 13, false),
SampleID(6, 14, true)
SampleID(0, 0, false),
SampleID(0, 1, true),
SampleID(1, 2, false),
SampleID(1, 3, true),
SampleID(2, 4, false),
SampleID(2, 5, true),
SampleID(3, 6, false),
SampleID(3, 7, true),
SampleID(4, 8, false),
SampleID(4, 9, true),
SampleID(5, 10, false),
SampleID(5, 11, true),
SampleID(6, 12, false),
SampleID(6, 13, true),
SampleID(0, 1, false),
SampleID(0, 2, true),
SampleID(1, 3, false),
SampleID(1, 4, true),
SampleID(2, 5, false),
SampleID(2, 6, true),
SampleID(3, 7, false),
SampleID(3, 8, true),
SampleID(4, 9, false),
SampleID(4, 10, true),
SampleID(5, 11, false),
SampleID(5, 12, true),
SampleID(6, 13, false),
SampleID(6, 14, true)
};
class TestPlotting : public Test {
public:
Meshes *meshes;
Meshes *meshes;
std::vector<IDiscretization *> discs;
std::vector<IDiscretization *> discs;
TestPlotting() {
fs::remove_all("data/vtu/");
std::filesystem::create_directory("data/vtu/");
TestPlotting() {
fs::remove_all("data/vtu/");
std::filesystem::create_directory("data/vtu/");
meshes = MeshesCreator("Square").
WithPLevel(testIds.front().cLevel).
WithLevel(testIds.back().fLevel).
Create();
meshes = MeshesCreator("Square").
WithPLevel(testIds.front().cLevel).
WithLevel(testIds.back().fLevel).
Create();
discs = {
new LagrangeDiscretization(*meshes, 0),
new LagrangeDiscretization(*meshes, 1),
new LagrangeDiscretization(*meshes, 2),
new LagrangeDiscretization(*meshes, 3),
discs = {
new LagrangeDiscretization(*meshes, 0),
new LagrangeDiscretization(*meshes, 1),
new LagrangeDiscretization(*meshes, 2),
new LagrangeDiscretization(*meshes, 3),
// new RTLagrangeDiscretization(*meshes, 0, 0),
// new DoFDiscretization(*meshes, new FaceDoF(1)),
new DGDiscretization(*meshes, 0),
new DGDiscretization(*meshes, 1),
new DGDiscretization(*meshes, 2),
new DGDiscretization(*meshes, 3)
};
}
void TearDown() override {
for (auto &disc:discs)
delete disc;
discs.clear();
}
new DGDiscretization(*meshes, 0),
new DGDiscretization(*meshes, 1),
new DGDiscretization(*meshes, 2),
new DGDiscretization(*meshes, 3)
};
}
void TearDown() override {
for (auto &disc:discs)
delete disc;
discs.clear();
}
};
TEST_F(TestPlotting, TestIdsAndDiscs) {
for (auto &disc: discs) {
for (auto &id: testIds) {
SampleSolution solution(disc, id, disc->DiscName());
mpp::plot(solution.IdString()) << solution.U << mpp::endp;
std::string file = "data/vtu/" + solution.IdString() + ".vtu";
EXPECT_TRUE(fs::exists(file));
}
for (auto &disc: discs) {
for (auto &id: testIds) {
SampleSolution solution(disc, id, disc->DiscName());
mpp::plot(solution.IdString()) << solution.U << mpp::endp;
std::string file = "data/vtu/" + solution.IdString() + ".vtu";
EXPECT_TRUE(fs::exists(file));
}
}
}
int main(int argc, char **argv) {
return MppTest(
MppTestBuilder(argc, argv).
WithScreenLogging().
WithPPM()
).RUN_ALL_MPP_TESTS();
return MppTest(
MppTestBuilder(argc, argv).
WithScreenLogging().
WithPPM()
).RUN_ALL_MPP_TESTS();
}
Supports Markdown
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