Skip to content
Snippets Groups Projects
Commit 0be5df4e authored by jonathan.froehlich's avatar jonathan.froehlich
Browse files

Merge branch '209-get-elphydeformation-from-config' into...

Merge branch '209-get-elphydeformation-from-config' into 186-include-klotz-problem-in-actual-problem-structure
parents e0594667 b2ffde24
No related branches found
No related tags found
1 merge request!229Resolve "Include Klotz problem in actual problem structure"
Pipeline #125714 canceled
Subproject commit 1fe67d06d3a3098d1d6e4edf95268c1678cf69e6
Subproject commit 32de03d8d5303f260ccb6fd8c626908a37054c4a
......@@ -4,59 +4,6 @@
#include "TestEnvironment.hpp"
#include "Vector.hpp"
void EXPECT_MPPVECTOR_EQ(const Vector &vec1, const Vector &vec2) {
EXPECT_EQ(vec1.GetMesh().Name(), vec2.GetMesh().Name());
EXPECT_EQ(vec1.SpaceLevel(), vec2.SpaceLevel());
EXPECT_EQ(vec1.TimeLevel(), vec2.TimeLevel());
EXPECT_EQ(typeid(vec1.GetDisc()), typeid(vec2.GetDisc()));
for (row r = vec1.rows(); r != vec1.rows_end(); ++r) {
for (int i = 0; i < r.size(); ++i) {
EXPECT_DOUBLE_EQ(vec1(r, i), vec2(r, i));
}
}
}
void ASSERT_MPPVECTOR_EQ(const Vector &vec1, const Vector &vec2) {
ASSERT_EQ(vec1.GetMesh().Name(), vec2.GetMesh().Name());
ASSERT_EQ(vec1.SpaceLevel(), vec2.SpaceLevel());
ASSERT_EQ(vec1.TimeLevel(), vec2.TimeLevel());
ASSERT_EQ(typeid(vec1.GetDisc()), typeid(vec2.GetDisc()));
for (row r = vec1.rows(); r != vec1.rows_end(); ++r) {
for (int i = 0; i < r.n(); ++i) {
ASSERT_DOUBLE_EQ(vec1(r, i), vec2(r, i));
}
}
}
void EXPECT_MPPVECTOR_NEAR(const Vector &vec1, const Vector &vec2, double tol = 1e-8) {
EXPECT_EQ(vec1.GetMesh().Name(), vec2.GetMesh().Name());
EXPECT_EQ(vec1.SpaceLevel(), vec2.SpaceLevel());
EXPECT_EQ(vec1.TimeLevel(), vec2.TimeLevel());
EXPECT_EQ(typeid(vec1.GetDisc()), typeid(vec2.GetDisc()));
for (row r = vec1.rows(); r != vec1.rows_end(); ++r) {
for (int i = 0; i < r.size(); ++i) {
EXPECT_NEAR(vec1(r, i), vec2(r, i), tol);
}
}
}
void ASSERT_MPPVECTOR_NEAR(const Vector &vec1, const Vector &vec2, double tol = 1e-8) {
ASSERT_EQ(vec1.GetMesh().Name(), vec2.GetMesh().Name());
ASSERT_EQ(vec1.SpaceLevel(), vec2.SpaceLevel());
ASSERT_EQ(vec1.TimeLevel(), vec2.TimeLevel());
ASSERT_EQ(typeid(vec1.GetDisc()), typeid(vec2.GetDisc()));
for (row r = vec1.rows(); r != vec1.rows_end(); ++r) {
for (int i = 0; i < r.n(); ++i) {
ASSERT_NEAR(vec1(r, i), vec2(r, i), tol);
}
}
}
static void printPythonVector(const std::string &name, const std::vector<double> &vec) {
mout << name << " = [" << vec[0];
......
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