21 BOOST_CHECK(
greater(b, a, eps));
22 BOOST_CHECK(not
greater(a, a - eps, eps));
23 BOOST_CHECK(
greater(a, a - 10.0 * eps, eps));
31 BOOST_CHECK(
smaller(a, b, eps));
32 BOOST_CHECK(not
smaller(a, a + eps, eps));
33 BOOST_CHECK(
smaller(a, a + 10.0 * eps, eps));
40 BOOST_CHECK(not
equals(a, b, eps));
41 BOOST_CHECK(
equals(a, a, eps));
42 BOOST_CHECK(
equals(a, a + eps, eps));
43 BOOST_CHECK(not
equals(a, a + 10.0 * eps, eps));
44 BOOST_CHECK(
equals(a, a + 10.0 * eps, 10.0 * eps));
50 Eigen::Vector3d vec0(1.0, 2.0, 3.0);
51 Eigen::Vector3d vec1(vec0);
52 BOOST_CHECK(
equals(vec0, vec1));
57 vec0 << 2.0, 2.0, 3.0;
58 BOOST_CHECK(not
equals(vec0, vec1));
63 vec0 << 2.0, 3.0, 4.0;
64 BOOST_CHECK(not
equals(vec0, vec1));
70 const double tolerance = 1e-14;
73 vec0(2) = vec1(2) + 0.99 * tolerance;
74 BOOST_CHECK(
equals(vec0, vec1, tolerance));
75 BOOST_CHECK(not
oneGreater(vec0, vec1, tolerance));
77 BOOST_CHECK(not
allGreater(vec0, vec1, tolerance));
79 vec0(2) = vec1(2) + 10.0 * tolerance;
80 BOOST_CHECK(not
equals(vec0, vec1, tolerance));
81 BOOST_CHECK(
oneGreater(vec0, vec1, tolerance));
83 BOOST_CHECK(not
allGreater(vec0, vec1, tolerance));
85 vec0 << 1.0, 2.0, 3.0;
86 vec0 = vec0.array() + (10.0 * tolerance);
87 BOOST_CHECK(not
equals(vec0, vec1, tolerance));
88 BOOST_CHECK(
oneGreater(vec0, vec1, tolerance));
90 BOOST_CHECK(
allGreater(vec0, vec1, tolerance));
92 vec0 << 1.0, 2.0, 3.0;
93 vec0 = vec0.array() - 0.99 * tolerance;
BOOST_AUTO_TEST_CASE(Scalar)
BOOST_AUTO_TEST_SUITE(PreProcess)
BOOST_AUTO_TEST_SUITE_END()
#define PRECICE_TEST(...)
provides general mathematical constants and functions.
constexpr bool equals(const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, double tolerance=NUMERICAL_ZERO_DIFFERENCE)
Compares two Eigen::MatrixBase for equality up to tolerance.
bool oneGreaterEquals(const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, double tolerance=math::NUMERICAL_ZERO_DIFFERENCE)
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type smallerEquals(Scalar A, Scalar B, Scalar tolerance=NUMERICAL_ZERO_DIFFERENCE)
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type greaterEquals(Scalar A, Scalar B, Scalar tolerance=NUMERICAL_ZERO_DIFFERENCE)
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type smaller(Scalar A, Scalar B, Scalar tolerance=NUMERICAL_ZERO_DIFFERENCE)
bool allGreater(const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, double tolerance=math::NUMERICAL_ZERO_DIFFERENCE)
bool oneGreater(const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, double tolerance=math::NUMERICAL_ZERO_DIFFERENCE)
std::enable_if< std::is_arithmetic< Scalar >::value, bool >::type greater(Scalar A, Scalar B, Scalar tolerance=NUMERICAL_ZERO_DIFFERENCE)
Main namespace of the precice library.