MOAB: Mesh Oriented datABase  (version 5.4.1)
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

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;
}

Definition at line 30 of file arc_intx_tests.cpp.

References C, 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 );
}

Definition at line 16 of file arc_intx_tests.cpp.

References C, 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 );
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines