MOAB: Mesh Oriented datABase  (version 5.5.0)
arc_intx_tests.cpp
Go to the documentation of this file.
1 /*
2  * arc_intx_tests.cpp
3  */
4 #include <iostream>
5 #include <sstream>
6 #include <ctime>
7 #include <cstdlib>
8 #include <cstdio>
9 #include <cstring>
10 #include "moab/Types.hpp"
12 
13 #include "TestUtil.hpp"
14 
15 using namespace moab;
17 {
18  double A[3] = { 0., 0., 1. };
19  double B[3] = { 1., 0., 0. };
20  double C[3] = { 0., 0.6, 0.8 };
21  double D[3] = { 0.6, -0.8, 0. };
22 
23  double E[3];
24  double R = 1.0;
26  std::cout << "E: " << E[0] << " " << E[1] << " " << E[2] << "\n";
27  rval = moab::IntxUtils::intersect_great_circle_arcs( A, C, B, D, R, E );
28  CHECK( rval == MB_FAILURE );
29 }
31 {
32  double d3 = 1 / sqrt( 3. );
33  double A[3] = { 0., 0., 1. };
34  double B[3] = { 1., 0., 0. };
35  double C[3] = { d3, d3, d3 };
36  double D[3] = { d3, -d3, d3 };
37 
38  double E[9];
39  double R = 1.0;
40  int np = 0;
42  std::cout << "E: " << E[0] << " " << E[1] << " " << E[2] << "\n";
43  double F[3] = { -d3, d3, d3 };
45  CHECK( rval == MB_FAILURE );
46 }
47 int main()
48 {
49  int failures = 0;
50  failures += RUN_TEST( test_great_arc_intx );
51  failures += RUN_TEST( test_great_arc_clat_intx );
52  return failures;
53 }