MOAB: Mesh Oriented datABase  (version 5.5.0)
arc_intx_tests.cpp File Reference
#include <iostream>
#include <sstream>
#include <ctime>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include "moab/Types.hpp"
#include "moab/IntxMesh/IntxUtils.hpp"
#include "TestUtil.hpp"
+ Include dependency graph for arc_intx_tests.cpp:

Go to the source code of this file.

Functions

void test_great_arc_intx ()
 
void test_great_arc_clat_intx ()
 
int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 47 of file arc_intx_tests.cpp.

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 }

References RUN_TEST, test_great_arc_clat_intx(), and test_great_arc_intx().

◆ test_great_arc_clat_intx()

void test_great_arc_clat_intx ( )

Definition at line 30 of file arc_intx_tests.cpp.

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 }

References CHECK, CHECK_ERR, moab::E, ErrorCode, moab::F, moab::IntxUtils::intersect_great_circle_arc_with_clat_arc(), np, and moab::R.

Referenced by main().

◆ test_great_arc_intx()

void test_great_arc_intx ( )

Definition at line 16 of file arc_intx_tests.cpp.

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 }

References CHECK, CHECK_ERR, moab::E, ErrorCode, moab::IntxUtils::intersect_great_circle_arcs(), and moab::R.

Referenced by main().