MOAB: Mesh Oriented datABase
(version 5.5.0)
|
#include "MBTagConventions.hpp"
#include "moab/Interface.hpp"
#include "moab/Core.hpp"
#include "moab/Range.hpp"
#include "moab/CartVect.hpp"
#include "moab/GeomQueryTool.hpp"
#include "moab/GeomTopoTool.hpp"
#include <vector>
#include <iostream>
#include <cmath>
#include <limits>
#include <algorithm>
#include <cstdio>
Go to the source code of this file.
Classes | |
struct | ray_fire |
struct | PointInVol |
Macros | |
#define | CHKERR if( MB_SUCCESS != rval ) return rval |
#define | RUN_TEST(A) |
Functions | |
ErrorCode | write_geometry (const char *output_file_name) |
ErrorCode | test_ray_fire (GeomQueryTool *) |
ErrorCode | test_point_in_volume (GeomQueryTool *) |
ErrorCode | test_closest_to_location (GeomQueryTool *) |
ErrorCode | test_measure_volume (GeomQueryTool *) |
ErrorCode | test_measure_area (GeomQueryTool *) |
ErrorCode | test_surface_sense (GeomQueryTool *) |
ErrorCode | overlap_write_geometry (const char *output_file_name) |
ErrorCode | overlap_test_ray_fire (GeomQueryTool *) |
ErrorCode | overlap_test_point_in_volume (GeomQueryTool *) |
ErrorCode | overlap_test_measure_volume (GeomQueryTool *) |
ErrorCode | overlap_test_measure_area (GeomQueryTool *) |
ErrorCode | overlap_test_surface_sense (GeomQueryTool *) |
ErrorCode | overlap_test_tracking (GeomQueryTool *) |
int | run_regular_tests (GeomQueryTool *gqt) |
int | run_overlap_tests (GeomQueryTool *gqt) |
int | main (int argc, char *argv[]) |
Variables | |
const double | ROOT2 = 1.4142135623730951 |
#define CHKERR if( MB_SUCCESS != rval ) return rval |
Definition at line 21 of file test_geom_gqt.cpp.
#define RUN_TEST | ( | A | ) |
Definition at line 224 of file test_geom_gqt.cpp.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 234 of file test_geom_gqt.cpp.
References ErrorCode, moab::fail(), filename, MB_CHK_SET_ERR, MBI, overlap_write_geometry(), run_overlap_tests(), run_regular_tests(), and write_geometry().
ErrorCode overlap_test_measure_area | ( | GeomQueryTool * | gqt | ) |
Definition at line 541 of file test_geom_gqt.cpp.
References moab::Range::begin(), CHKERR, dim_tag, ErrorCode, moab::GeomTopoTool::get_geom_tag(), moab::GeomTopoTool::get_gid_tag(), moab::GeomQueryTool::gttool(), MB_SUCCESS, MBENTITYSET, moab::GeomQueryTool::measure_area(), moab::GeomQueryTool::moab_instance(), and moab::Range::size().
Referenced by run_overlap_tests().
ErrorCode overlap_test_measure_volume | ( | GeomQueryTool * | gqt | ) |
Definition at line 468 of file test_geom_gqt.cpp.
References CHKERR, dim_tag, ErrorCode, moab::Range::front(), moab::GeomTopoTool::get_geom_tag(), moab::GeomQueryTool::gttool(), MB_SUCCESS, MBENTITYSET, moab::GeomQueryTool::measure_volume(), moab::GeomQueryTool::moab_instance(), and moab::Range::size().
Referenced by run_overlap_tests().
ErrorCode overlap_test_point_in_volume | ( | GeomQueryTool * | gqt | ) |
Definition at line 952 of file test_geom_gqt.cpp.
References CHKERR, PointInVol::coords, dim_tag, PointInVol::dir, ErrorCode, moab::Range::front(), moab::GeomTopoTool::get_geom_tag(), moab::GeomQueryTool::gttool(), MB_SUCCESS, MBENTITYSET, moab::GeomQueryTool::moab_instance(), moab::GeomQueryTool::point_in_volume(), moab::GeomQueryTool::point_in_volume_slow(), PointInVol::result, and moab::Range::size().
Referenced by run_overlap_tests().
ErrorCode overlap_test_ray_fire | ( | GeomQueryTool * | gqt | ) |
Definition at line 723 of file test_geom_gqt.cpp.
References moab::Range::begin(), CHKERR, dim_tag, ray_fire::direction, ray_fire::distance, moab::Range::end(), ErrorCode, moab::Range::front(), moab::GeomTopoTool::get_geom_tag(), moab::GeomTopoTool::get_gid_tag(), moab::GeomQueryTool::gttool(), ray_fire::hit_surf, MB_SUCCESS, MBENTITYSET, moab::GeomQueryTool::moab_instance(), ray_fire::origin, ray_fire::prev_surf, moab::GeomQueryTool::ray_fire(), and moab::Range::size().
Referenced by run_overlap_tests().
ErrorCode overlap_test_surface_sense | ( | GeomQueryTool * | gqt | ) |
Definition at line 401 of file test_geom_gqt.cpp.
References moab::Range::begin(), CHKERR, dim_tag, moab::Range::end(), ErrorCode, moab::Range::front(), moab::GeomTopoTool::get_geom_tag(), moab::GeomTopoTool::get_sense(), moab::GeomQueryTool::gttool(), MB_SUCCESS, MBENTITYSET, moab::GeomQueryTool::moab_instance(), and moab::Range::size().
Referenced by run_overlap_tests().
ErrorCode overlap_test_tracking | ( | GeomQueryTool * | gqt | ) |
Definition at line 1029 of file test_geom_gqt.cpp.
References CHKERR, dim_tag, PointInVol::dir, ErrorCode, moab::Range::front(), moab::GeomTopoTool::get_geom_tag(), moab::GeomQueryTool::gttool(), MB_SUCCESS, MBENTITYSET, moab::GeomQueryTool::moab_instance(), moab::GeomTopoTool::next_vol(), moab::GeomQueryTool::point_in_volume(), moab::GeomQueryTool::ray_fire(), PointInVol::result, and moab::Range::size().
Referenced by run_overlap_tests().
ErrorCode overlap_write_geometry | ( | const char * | output_file_name | ) |
Definition at line 136 of file test_geom_gqt.cpp.
References CHKERR, dim_tag, ErrorCode, GEOM_DIMENSION_TAG_NAME, id_tag, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_HANDLE, MB_TYPE_INTEGER, MBTRI, and MESHSET_SET.
Referenced by main().
int run_overlap_tests | ( | GeomQueryTool * | gqt | ) |
Definition at line 344 of file test_geom_gqt.cpp.
References ErrorCode, moab::GeomQueryTool::initialize(), MB_CHK_SET_ERR_CONT, overlap_test_measure_area(), overlap_test_measure_volume(), overlap_test_point_in_volume(), overlap_test_ray_fire(), overlap_test_surface_sense(), overlap_test_tracking(), RUN_TEST, and moab::GeomQueryTool::set_overlap_thickness().
Referenced by main().
int run_regular_tests | ( | GeomQueryTool * | gqt | ) |
Definition at line 321 of file test_geom_gqt.cpp.
References ErrorCode, moab::GeomQueryTool::initialize(), MB_CHK_SET_ERR_CONT, RUN_TEST, moab::GeomQueryTool::set_overlap_thickness(), test_closest_to_location(), test_measure_area(), test_measure_volume(), test_point_in_volume(), test_ray_fire(), and test_surface_sense().
Referenced by main().
ErrorCode test_closest_to_location | ( | GeomQueryTool * | gqt | ) |
Definition at line 921 of file test_geom_gqt.cpp.
References moab::CartVect::array(), CHKERR, moab::GeomQueryTool::closest_to_location(), dim_tag, ErrorCode, moab::Range::front(), moab::GeomTopoTool::get_geom_tag(), moab::GeomQueryTool::gttool(), MB_SUCCESS, MBENTITYSET, moab::GeomQueryTool::moab_instance(), PointInVol::result, and moab::Range::size().
Referenced by run_regular_tests().
ErrorCode test_measure_area | ( | GeomQueryTool * | gqt | ) |
Definition at line 499 of file test_geom_gqt.cpp.
References moab::Range::begin(), CHKERR, dim_tag, ErrorCode, moab::GeomTopoTool::get_geom_tag(), moab::GeomTopoTool::get_gid_tag(), moab::GeomQueryTool::gttool(), MB_SUCCESS, MBENTITYSET, moab::GeomQueryTool::measure_area(), moab::GeomQueryTool::moab_instance(), ROOT2, and moab::Range::size().
Referenced by run_regular_tests().
ErrorCode test_measure_volume | ( | GeomQueryTool * | gqt | ) |
Definition at line 437 of file test_geom_gqt.cpp.
References CHKERR, dim_tag, ErrorCode, moab::Range::front(), moab::GeomTopoTool::get_geom_tag(), moab::GeomQueryTool::gttool(), MB_SUCCESS, MBENTITYSET, moab::GeomQueryTool::measure_volume(), moab::GeomQueryTool::moab_instance(), and moab::Range::size().
Referenced by run_regular_tests().
ErrorCode test_point_in_volume | ( | GeomQueryTool * | gqt | ) |
Definition at line 842 of file test_geom_gqt.cpp.
References CHKERR, PointInVol::coords, dim_tag, PointInVol::dir, ErrorCode, moab::Range::front(), moab::GeomTopoTool::get_geom_tag(), moab::GeomQueryTool::gttool(), MB_SUCCESS, MBENTITYSET, moab::GeomQueryTool::moab_instance(), moab::GeomQueryTool::point_in_volume(), moab::GeomQueryTool::point_in_volume_slow(), PointInVol::result, and moab::Range::size().
Referenced by run_regular_tests().
ErrorCode test_ray_fire | ( | GeomQueryTool * | gqt | ) |
Definition at line 596 of file test_geom_gqt.cpp.
References moab::CartVect::array(), moab::Range::begin(), CHKERR, dim_tag, ray_fire::direction, ray_fire::distance, moab::Range::end(), ErrorCode, moab::Range::front(), moab::GeomTopoTool::get_geom_tag(), moab::GeomTopoTool::get_gid_tag(), moab::GeomQueryTool::gttool(), ray_fire::hit_surf, MB_SUCCESS, MBENTITYSET, moab::GeomQueryTool::moab_instance(), origin, ray_fire::origin, ray_fire::prev_surf, moab::GeomQueryTool::ray_fire(), ROOT2, moab::Range::size(), and moab::GeomQueryTool::test_volume_boundary().
Referenced by run_regular_tests().
ErrorCode test_surface_sense | ( | GeomQueryTool * | gqt | ) |
Definition at line 364 of file test_geom_gqt.cpp.
References moab::Range::begin(), CHKERR, dim_tag, moab::Range::end(), ErrorCode, moab::Range::front(), moab::GeomTopoTool::get_geom_tag(), moab::GeomTopoTool::get_sense(), moab::GeomQueryTool::gttool(), MB_SUCCESS, MBENTITYSET, moab::GeomQueryTool::moab_instance(), and moab::Range::size().
Referenced by run_regular_tests().
ErrorCode write_geometry | ( | const char * | output_file_name | ) |
Definition at line 56 of file test_geom_gqt.cpp.
References CHKERR, dim_tag, ErrorCode, GEOM_DIMENSION_TAG_NAME, id_tag, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_HANDLE, MB_TYPE_INTEGER, MBTRI, and MESHSET_SET.
Referenced by main().
const double ROOT2 = 1.4142135623730951 |
Definition at line 24 of file test_geom_gqt.cpp.
Referenced by test_measure_area(), and test_ray_fire().