MOAB: Mesh Oriented datABase
(version 5.5.0)
|
Go to the source code of this file.
Macros | |
#define | ASSERT_VECTORS_EQUAL(A, B) assert_vectors_equal( ( A ), ( B ), #A, #B, __LINE__ ) |
#define | ASSERT_DOUBLES_EQUAL(A, B) assert_doubles_equal( ( A ), ( B ), #A, #B, __LINE__ ) |
#define | ASSERT(B) assert_bool( ( B ), #B, __LINE__ ) |
Functions | |
void | assert_vectors_equal (const double *a, const double *b, const char *sa, const char *sb, int lineno) |
void | assert_vectors_equal (const CartVect &a, const CartVect &b, const char *sa, const char *sb, int lineno) |
void | assert_doubles_equal (double a, double b, const char *sa, const char *sb, int lineno) |
void | assert_bool (bool b, const char *sb, int lineno) |
void | test_none () |
void | test_translation () |
void | test_rotation () |
void | test_rotation_from_vec () |
CartVect | refl (const CartVect &vect, const CartVect &norm) |
void | test_reflection () |
void | test_scale () |
void | test_scale_point () |
void | test_accumulate () |
void | test_inversion () |
void | test_is_reflection () |
int | main () |
Variables | |
const double | TOL = 1e-6 |
int | error_count = 0 |
const CartVect | point1 (0.0, 0.0, 0.0) |
const CartVect | point2 (3.5, 1000, -200) |
const CartVect | vect1 (0.0, 0.0, -100.0) |
const CartVect | vect2 (1.0, 0.0, 1.0) |
#define ASSERT | ( | B | ) | assert_bool( ( B ), #B, __LINE__ ) |
Definition at line 78 of file affinexform_test.cpp.
#define ASSERT_DOUBLES_EQUAL | ( | A, | |
B | |||
) | assert_doubles_equal( ( A ), ( B ), #A, #B, __LINE__ ) |
Definition at line 77 of file affinexform_test.cpp.
#define ASSERT_VECTORS_EQUAL | ( | A, | |
B | |||
) | assert_vectors_equal( ( A ), ( B ), #A, #B, __LINE__ ) |
Definition at line 76 of file affinexform_test.cpp.
void assert_bool | ( | bool | b, |
const char * | sb, | ||
int | lineno | ||
) |
void assert_doubles_equal | ( | double | a, |
double | b, | ||
const char * | sa, | ||
const char * | sb, | ||
int | lineno | ||
) |
void assert_vectors_equal | ( | const CartVect & | a, |
const CartVect & | b, | ||
const char * | sa, | ||
const char * | sb, | ||
int | lineno | ||
) |
Definition at line 96 of file affinexform_test.cpp.
References moab::CartVect::array(), and assert_vectors_equal().
void assert_vectors_equal | ( | const double * | a, |
const double * | b, | ||
const char * | sa, | ||
const char * | sb, | ||
int | lineno | ||
) |
Definition at line 84 of file affinexform_test.cpp.
References error_count, and TOL.
Referenced by assert_vectors_equal().
int main | ( | ) |
Definition at line 481 of file affinexform_test.cpp.
References error_count, test_accumulate(), test_inversion(), test_is_reflection(), test_none(), test_reflection(), test_rotation(), test_rotation_from_vec(), test_scale(), test_scale_point(), and test_translation().
Definition at line 265 of file affinexform_test.cpp.
References moab::CartVect::normalize().
Referenced by test_accumulate(), test_inversion(), and test_reflection().
void test_accumulate | ( | ) |
Definition at line 361 of file affinexform_test.cpp.
References moab::AffineXform::accumulate(), moab::CartVect::array(), ASSERT_VECTORS_EQUAL, point1, point2, refl(), moab::AffineXform::reflection(), moab::AffineXform::rotation(), moab::AffineXform::scale(), moab::AffineXform::translation(), vect1, vect2, moab::AffineXform::xform_point(), and moab::AffineXform::xform_vector().
Referenced by main().
void test_inversion | ( | ) |
Definition at line 412 of file affinexform_test.cpp.
References moab::AffineXform::accumulate(), moab::CartVect::array(), ASSERT_VECTORS_EQUAL, moab::AffineXform::inverse(), point1, point2, refl(), moab::AffineXform::reflection(), moab::AffineXform::rotation(), moab::AffineXform::scale(), moab::AffineXform::translation(), vect1, vect2, moab::AffineXform::xform_point(), and moab::AffineXform::xform_vector().
Referenced by main().
void test_is_reflection | ( | ) |
Definition at line 449 of file affinexform_test.cpp.
References moab::AffineXform::accumulate(), ASSERT, moab::AffineXform::inverse(), moab::AffineXform::reflection(), moab::AffineXform::rotation(), moab::AffineXform::scale(), and moab::AffineXform::translation().
Referenced by main().
void test_none | ( | ) |
Definition at line 124 of file affinexform_test.cpp.
References moab::CartVect::array(), ASSERT_VECTORS_EQUAL, output, point1, point2, vect1, vect2, moab::AffineXform::xform_point(), and moab::AffineXform::xform_vector().
Referenced by main().
void test_reflection | ( | ) |
Definition at line 273 of file affinexform_test.cpp.
References moab::CartVect::array(), ASSERT_DOUBLES_EQUAL, ASSERT_VECTORS_EQUAL, moab::Matrix3::determinant(), moab::CartVect::length(), moab::AffineXform::matrix(), output, point1, point2, refl(), moab::AffineXform::reflection(), vect1, vect2, moab::AffineXform::xform_point(), and moab::AffineXform::xform_vector().
Referenced by main().
void test_rotation | ( | ) |
Definition at line 159 of file affinexform_test.cpp.
References moab::CartVect::array(), ASSERT_DOUBLES_EQUAL, ASSERT_VECTORS_EQUAL, moab::Matrix3::determinant(), moab::CartVect::length(), moab::AffineXform::matrix(), output, point1, point2, moab::AffineXform::rotation(), vect1, vect2, moab::AffineXform::xform_point(), and moab::AffineXform::xform_vector().
Referenced by main().
void test_rotation_from_vec | ( | ) |
Definition at line 247 of file affinexform_test.cpp.
References moab::CartVect::array(), ASSERT_DOUBLES_EQUAL, ASSERT_VECTORS_EQUAL, moab::CartVect::length(), moab::CartVect::normalize(), moab::AffineXform::rotation(), and moab::AffineXform::xform_vector().
Referenced by main().
void test_scale | ( | ) |
Definition at line 309 of file affinexform_test.cpp.
References moab::CartVect::array(), ASSERT, ASSERT_VECTORS_EQUAL, output, point1, point2, moab::AffineXform::scale(), vect1, vect2, moab::AffineXform::xform_point(), and moab::AffineXform::xform_vector().
Referenced by main().
void test_scale_point | ( | ) |
Definition at line 343 of file affinexform_test.cpp.
References ASSERT_VECTORS_EQUAL, moab::AffineXform::scale(), and moab::AffineXform::xform_point().
Referenced by main().
void test_translation | ( | ) |
Definition at line 139 of file affinexform_test.cpp.
References moab::CartVect::array(), ASSERT_VECTORS_EQUAL, output, point1, point2, moab::AffineXform::translation(), vect1, vect2, moab::AffineXform::xform_point(), and moab::AffineXform::xform_vector().
Referenced by main().
int error_count = 0 |
Definition at line 82 of file affinexform_test.cpp.
Referenced by assert_bool(), assert_doubles_equal(), assert_vectors_equal(), check_parallel_read(), TreeValidator::error(), TreeValidator::is_valid(), main(), mb_skin_adjacent_surf_patches(), runner_run_tests(), valid_ghosting_owners(), and TreeValidator::visit().
const CartVect point1(0.0, 0.0, 0.0) | ( | 0. | 0, |
0. | 0, | ||
0. | 0 | ||
) |
const CartVect point2(3.5, 1000, -200) | ( | 3. | 5, |
1000 | , | ||
- | 200 | ||
) |
Referenced by test_accumulate(), test_inversion(), test_none(), test_reflection(), test_rotation(), test_scale(), and test_translation().
const double TOL = 1e-6 |
Definition at line 80 of file affinexform_test.cpp.
Referenced by assert_doubles_equal(), and assert_vectors_equal().
const CartVect vect1(0.0, 0.0, -100.0) | ( | 0. | 0, |
0. | 0, | ||
-100. | 0 | ||
) |
Referenced by test_accumulate(), test_inversion(), test_none(), test_reflection(), test_rotation(), test_scale(), and test_translation().
const CartVect vect2(1.0, 0.0, 1.0) | ( | 1. | 0, |
0. | 0, | ||
1. | 0 | ||
) |
Referenced by test_accumulate(), test_inversion(), test_none(), test_reflection(), test_rotation(), test_scale(), and test_translation().