From dbb5b8396c2d209ede688666ff5554fceda123cf Mon Sep 17 00:00:00 2001 From: dcdemen Date: Tue, 29 Oct 2024 16:42:39 -0600 Subject: [PATCH] Fixed test tolerance --- .../constraints/test_calculate_prescribed_bc_constraint.cpp | 4 ++-- .../constraints/test_calculate_rigid_joint_constraint.cpp | 6 +++--- .../test_calculate_rotation_control_constraint.cpp | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/unit_tests/constraints/test_calculate_prescribed_bc_constraint.cpp b/tests/unit_tests/constraints/test_calculate_prescribed_bc_constraint.cpp index 47950f06..b9ef760e 100644 --- a/tests/unit_tests/constraints/test_calculate_prescribed_bc_constraint.cpp +++ b/tests/unit_tests/constraints/test_calculate_prescribed_bc_constraint.cpp @@ -58,7 +58,7 @@ TEST(CalculatePrescribedBCConstraintTests, OneConstraint) { Kokkos::View::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); @@ -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 ); } } diff --git a/tests/unit_tests/constraints/test_calculate_rigid_joint_constraint.cpp b/tests/unit_tests/constraints/test_calculate_rigid_joint_constraint.cpp index 223ba1cf..526850b2 100644 --- a/tests/unit_tests/constraints/test_calculate_rigid_joint_constraint.cpp +++ b/tests/unit_tests/constraints/test_calculate_rigid_joint_constraint.cpp @@ -67,7 +67,7 @@ TEST(CalculateRigidJointConstraintTests, OneConstraint) { Kokkos::View::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); @@ -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 ); } } @@ -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 ); } } diff --git a/tests/unit_tests/constraints/test_calculate_rotation_control_constraint.cpp b/tests/unit_tests/constraints/test_calculate_rotation_control_constraint.cpp index 3328a5ac..a4874ee5 100644 --- a/tests/unit_tests/constraints/test_calculate_rotation_control_constraint.cpp +++ b/tests/unit_tests/constraints/test_calculate_rotation_control_constraint.cpp @@ -75,7 +75,7 @@ TEST(CalculateRotationControlConstraintTests, OneConstraint) { Kokkos::View::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); @@ -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 ); } } @@ -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 ); } }