MOAB: Mesh Oriented datABase
(version 5.4.1)
|
#include <iostream>
#include <sstream>
#include <ctime>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include "moab/Types.hpp"
#include "moab/IntxMesh/IntxUtils.hpp"
#include "TestUtil.hpp"
Go to the source code of this file.
Functions | |
void | test_great_arc_intx () |
void | test_great_arc_clat_intx () |
int | main () |
int main | ( | ) |
Definition at line 47 of file arc_intx_tests.cpp.
References RUN_TEST, test_great_arc_clat_intx(), and test_great_arc_intx().
{ int failures = 0; failures += RUN_TEST( test_great_arc_intx ); failures += RUN_TEST( test_great_arc_clat_intx ); return failures; }
void test_great_arc_clat_intx | ( | ) |
Definition at line 30 of file arc_intx_tests.cpp.
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().
{ double d3 = 1 / sqrt( 3. ); double A[3] = { 0., 0., 1. }; double B[3] = { 1., 0., 0. }; double C[3] = { d3, d3, d3 }; double D[3] = { d3, -d3, d3 }; double E[9]; double R = 1.0; int np = 0; ErrorCode rval = moab::IntxUtils::intersect_great_circle_arc_with_clat_arc( A, B, C, D, R, E, np );CHECK_ERR( rval ); std::cout << "E: " << E[0] << " " << E[1] << " " << E[2] << "\n"; double F[3] = { -d3, d3, d3 }; rval = moab::IntxUtils::intersect_great_circle_arc_with_clat_arc( A, B, C, F, R, E, np ); CHECK( rval == MB_FAILURE ); }
void test_great_arc_intx | ( | ) |
Definition at line 16 of file arc_intx_tests.cpp.
References CHECK, CHECK_ERR, moab::E, ErrorCode, moab::IntxUtils::intersect_great_circle_arcs(), and moab::R.
Referenced by main().
{ double A[3] = { 0., 0., 1. }; double B[3] = { 1., 0., 0. }; double C[3] = { 0., 0.6, 0.8 }; double D[3] = { 0.6, -0.8, 0. }; double E[3]; double R = 1.0; ErrorCode rval = moab::IntxUtils::intersect_great_circle_arcs( A, B, C, D, R, E );CHECK_ERR( rval ); std::cout << "E: " << E[0] << " " << E[1] << " " << E[2] << "\n"; rval = moab::IntxUtils::intersect_great_circle_arcs( A, C, B, D, R, E ); CHECK( rval == MB_FAILURE ); }