Skip to content

Commit

Permalink
Fixed test tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
ddement committed Oct 30, 2024
1 parent 1092c9f commit dbb5b83
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ TEST(CalculatePrescribedBCConstraintTests, OneConstraint) {
Kokkos::View<double[1][6], Kokkos::HostSpace>::const_type(residual_terms_exact_data.data());

for (auto i = 0U; i < 6U; ++i) {
EXPECT_NEAR(residual_terms_mirror(0, i), residual_terms_exact(0, i), 1.e-15);
EXPECT_NEAR(residual_terms_mirror(0, i), residual_terms_exact(0, i), 1.e-12);
}

const auto target_gradient_terms_mirror = Kokkos::create_mirror(target_gradient_terms);
Expand All @@ -82,7 +82,7 @@ TEST(CalculatePrescribedBCConstraintTests, OneConstraint) {
for (auto i = 0U; i < 6U; ++i) {
for (auto j = 0U; j < 6U; ++j) {
EXPECT_NEAR(
target_gradient_terms_mirror(0, i, j), target_gradient_terms_exact(0, i, j), 1.e-15
target_gradient_terms_mirror(0, i, j), target_gradient_terms_exact(0, i, j), 1.e-12
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ TEST(CalculateRigidJointConstraintTests, OneConstraint) {
Kokkos::View<double[1][6], Kokkos::HostSpace>::const_type(residual_terms_exact_data.data());

for (auto i = 0U; i < 6U; ++i) {
EXPECT_NEAR(residual_terms_mirror(0, i), residual_terms_exact(0, i), 1.e-15);
EXPECT_NEAR(residual_terms_mirror(0, i), residual_terms_exact(0, i), 1.e-12);
}

const auto base_gradient_terms_mirror = Kokkos::create_mirror(base_gradient_terms);
Expand All @@ -91,7 +91,7 @@ TEST(CalculateRigidJointConstraintTests, OneConstraint) {
for (auto i = 0U; i < 6U; ++i) {
for (auto j = 0U; j < 6U; ++j) {
EXPECT_NEAR(
base_gradient_terms_mirror(0, i, j), base_gradient_terms_exact(0, i, j), 1.e-15
base_gradient_terms_mirror(0, i, j), base_gradient_terms_exact(0, i, j), 1.e-12
);
}
}
Expand All @@ -117,7 +117,7 @@ TEST(CalculateRigidJointConstraintTests, OneConstraint) {
for (auto i = 0U; i < 6U; ++i) {
for (auto j = 0U; j < 6U; ++j) {
EXPECT_NEAR(
target_gradient_terms_mirror(0, i, j), target_gradient_terms_exact(0, i, j), 1.e-15
target_gradient_terms_mirror(0, i, j), target_gradient_terms_exact(0, i, j), 1.e-12
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ TEST(CalculateRotationControlConstraintTests, OneConstraint) {
Kokkos::View<double[1][6], Kokkos::HostSpace>::const_type(residual_terms_exact_data.data());

for (auto i = 0U; i < 6U; ++i) {
EXPECT_NEAR(residual_terms_mirror(0, i), residual_terms_exact(0, i), 1.e-15);
EXPECT_NEAR(residual_terms_mirror(0, i), residual_terms_exact(0, i), 1.e-12);
}

const auto base_gradient_terms_mirror = Kokkos::create_mirror(base_gradient_terms);
Expand All @@ -99,7 +99,7 @@ TEST(CalculateRotationControlConstraintTests, OneConstraint) {
for (auto i = 0U; i < 6U; ++i) {
for (auto j = 0U; j < 6U; ++j) {
EXPECT_NEAR(
base_gradient_terms_mirror(0, i, j), base_gradient_terms_exact(0, i, j), 1.e-15
base_gradient_terms_mirror(0, i, j), base_gradient_terms_exact(0, i, j), 1.e-12
);
}
}
Expand All @@ -125,7 +125,7 @@ TEST(CalculateRotationControlConstraintTests, OneConstraint) {
for (auto i = 0U; i < 6U; ++i) {
for (auto j = 0U; j < 6U; ++j) {
EXPECT_NEAR(
target_gradient_terms_mirror(0, i, j), target_gradient_terms_exact(0, i, j), 1.e-15
target_gradient_terms_mirror(0, i, j), target_gradient_terms_exact(0, i, j), 1.e-12
);
}
}
Expand Down

0 comments on commit dbb5b83

Please sign in to comment.