MOAB: Mesh Oriented datABase
(version 5.5.0)
|
#include "moab/Core.hpp"
#include "moab/Range.hpp"
#include "moab/OrientedBoxTreeTool.hpp"
#include "moab/OrientedBox.hpp"
#include "MBTagConventions.hpp"
#include "moab/GeomUtil.hpp"
#include "moab/CN.hpp"
#include "../TestUtil.hpp"
#include <iostream>
#include <sstream>
#include <cstdlib>
#include <limits>
#include <cstdio>
#include <set>
#include <map>
Go to the source code of this file.
Classes | |
struct | RayTest |
class | TreeValidator |
class | CubitWriter |
class | VtkWriter |
Typedefs | |
typedef std::map< std::string, std::vector< RayTest > >::iterator | ray_test_itr |
Enumerations | |
enum | TriOption { DISABLE , ENABLE , AUTO } |
Functions | |
void | initialize_default_files () |
static void | usage (const char *error, const char *opt) |
static const char * | get_option (int &i, int argc, char *argv[]) |
static int | get_int_option (int &i, int argc, char *argv[]) |
static double | get_double_option (int &i, int argc, char *argv[]) |
static bool | do_file (const char *filename) |
static void | parse_ray (int &i, int argc, char *argv[]) |
int | main (int argc, char *argv[]) |
static bool | do_ray_fire_test (OrientedBoxTreeTool &tool, EntityHandle root_set, const char *filename, bool have_surface_tree) |
static bool | do_closest_point_test (OrientedBoxTreeTool &tool, EntityHandle root_set, bool have_surface_tree) |
static ErrorCode | save_tree (Interface *instance, const char *filename, EntityHandle tree_root) |
static void | count_non_tol (std::vector< double > intersections, int &non_tol_count, double &non_tol_dist) |
static bool | check_ray_intersect_tris (OrientedBoxTreeTool &tool, EntityHandle root_set, RayTest &test, int &non_tol_count, double &non_tol_dist, OrientedBoxTreeTool::TrvStats &stats) |
static bool | check_ray_intersect_sets (OrientedBoxTreeTool &tool, EntityHandle root_set, RayTest &test, int &non_tol_count, double &non_tol_dist, OrientedBoxTreeTool::TrvStats &stats) |
static ErrorCode | tri_coords (Interface *moab, EntityHandle tri, CartVect coords[3]) |
static ErrorCode | closest_point_in_triangles (Interface *moab, const CartVect &to_pos, CartVect &result_pos, EntityHandle &result_tri) |
static bool | tri_in_set (Interface *moab, EntityHandle set, EntityHandle tri) |
Variables | |
static const char * | NAME = "obb_test" |
std::map< std::string, std::vector< RayTest > > | default_files_tests |
static int | verbosity = 1 |
static OrientedBoxTreeTool::Settings | settings |
static double | tolerance = 1e-6 |
static bool | write_cubit = false |
static bool | write_vtk = false |
static bool | write_ray_vtk = false |
static std::vector< CartVect > | rays |
static const char * | save_file_name = 0 |
static TriOption | surfTree = AUTO |
typedef std::map< std::string, std::vector< RayTest > >::iterator ray_test_itr |
Definition at line 34 of file obb_test.cpp.
enum TriOption |
Enumerator | |
---|---|
DISABLE | |
ENABLE | |
AUTO |
Definition at line 149 of file obb_test.cpp.
|
static |
Definition at line 1014 of file obb_test.cpp.
References count_non_tol(), ErrorCode, MB_SUCCESS, moab::OrientedBoxTreeTool::ray_intersect_sets(), root_set, test, moab::tolerance, and verbosity.
Referenced by do_ray_fire_test().
|
static |
Definition at line 970 of file obb_test.cpp.
References count_non_tol(), ErrorCode, MB_SUCCESS, moab::OrientedBoxTreeTool::ray_intersect_triangles(), root_set, test, moab::tolerance, and verbosity.
Referenced by do_ray_fire_test().
|
static |
Definition at line 1331 of file obb_test.cpp.
References moab::Range::begin(), moab::GeomUtil::closest_location_on_tri(), moab::Range::empty(), moab::Range::end(), ErrorCode, MB_SUCCESS, MBTRI, and tri_coords().
Referenced by do_closest_point_test().
|
static |
Definition at line 957 of file obb_test.cpp.
References moab::tolerance.
Referenced by check_ray_intersect_sets(), and check_ray_intersect_tris().
|
static |
Definition at line 1381 of file obb_test.cpp.
References moab::CartVect::array(), box(), moab::OrientedBoxTreeTool::box(), moab::GeomUtil::closest_location_on_tri(), closest_point_in_triangles(), moab::OrientedBoxTreeTool::closest_to_location(), ErrorCode, moab::OrientedBoxTreeTool::get_moab_instance(), moab::CartVect::length(), MB_SUCCESS, moab::OrientedBoxTreeTool::TrvStats::print(), root_set, moab::tolerance, tri_coords(), tri_in_set(), and verbosity.
Referenced by do_file().
|
static |
Definition at line 731 of file obb_test.cpp.
References moab::Interface::add_entities(), TreeValidator::bad_outer_radius_count, moab::Range::begin(), moab::OrientedBoxTreeTool::build(), TreeValidator::child_outside_count, moab::Range::clear(), moab::OrientedBoxTreeTool::delete_tree(), dim, DISABLE, do_closest_point_test(), do_ray_fire_test(), TreeValidator::duplicate_entity_count, moab::Range::empty(), TreeValidator::empty_leaf_count, ENABLE, moab::Range::end(), entities, TreeValidator::entity_count, TreeValidator::entity_invalid_count, TreeValidator::entity_outside_count, TreeValidator::error_count, ErrorCode, filename, GEOM_DIMENSION_TAG_NAME, moab::Interface::get_entities_by_dimension(), moab::Interface::get_entities_by_type_and_tag(), iface, moab::Range::insert(), TreeValidator::is_valid(), moab::OrientedBoxTreeTool::join_trees(), moab::Interface::load_mesh(), TreeValidator::loose_box_count, MB_ENTITY_NOT_FOUND, MB_SUCCESS, MB_TAG_NOT_FOUND, MB_TYPE_INTEGER, MBENTITYSET, TreeValidator::missing_surface_count, TreeValidator::multiple_surface_count, TreeValidator::non_empty_non_leaf_count, TreeValidator::non_ortho_count, TreeValidator::non_unit_count, TreeValidator::num_entities_outside, moab::OrientedBoxTreeTool::preorder_traverse(), moab::OrientedBoxTreeTool::print(), save_file_name, save_tree(), settings, moab::Range::size(), moab::OrientedBoxTreeTool::stats(), surfTree, moab::Interface::tag_get_handle(), moab::tolerance, TreeValidator::unsorted_axis_count, verbosity, write_cubit, and write_vtk.
Referenced by main().
|
static |
Definition at line 1067 of file obb_test.cpp.
References moab::Range::begin(), box(), moab::OrientedBoxTreeTool::box(), check_ray_intersect_sets(), check_ray_intersect_tris(), default_files_tests, moab::Range::empty(), moab::Range::end(), ErrorCode, filename, moab::OrientedBoxTreeTool::get_moab_instance(), moab::Interface::globalId_tag(), moab::Interface::id_from_handle(), MB_SUCCESS, origin, moab::OrientedBoxTreeTool::TrvStats::print(), moab::OrientedBoxTreeTool::ray_intersect_boxes(), moab::OrientedBoxTreeTool::ray_intersect_sets(), moab::OrientedBoxTreeTool::ray_intersect_triangles(), rays, root_set, moab::Range::size(), moab::Interface::tag_get_data(), moab::tolerance, verbosity, write_cubit, moab::Interface::write_mesh(), and write_ray_vtk.
Referenced by do_file().
|
static |
Definition at line 138 of file obb_test.cpp.
References get_option(), and usage().
Referenced by main().
|
static |
Definition at line 129 of file obb_test.cpp.
References get_option(), and usage().
Referenced by main().
|
static |
Definition at line 122 of file obb_test.cpp.
References usage().
Referenced by get_double_option(), get_int_option(), main(), and parse_ray().
void initialize_default_files | ( | ) |
Definition at line 36 of file obb_test.cpp.
References default_files_tests, num_tests, and STRINGIFY.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 168 of file obb_test.cpp.
References moab::OrientedBoxTreeTool::Settings::best_split_ratio, default_files_tests, DISABLE, do_file(), ENABLE, moab::fail(), get_double_option(), get_int_option(), get_option(), moab::Core::impl_version(), initialize_default_files(), moab::OrientedBoxTreeTool::Settings::max_depth, moab::OrientedBoxTreeTool::Settings::max_leaf_entities, MESHSET_SET, parse_ray(), save_file_name, moab::OrientedBoxTreeTool::Settings::set_options, settings, surfTree, moab::tolerance, usage(), moab::OrientedBoxTreeTool::Settings::valid(), verbosity, moab::OrientedBoxTreeTool::Settings::worst_split_ratio, write_cubit, write_ray_vtk, and write_vtk.
|
static |
Definition at line 303 of file obb_test.cpp.
References get_option(), moab::CartVect::normalize(), rays, and usage().
Referenced by main().
|
static |
Definition at line 1303 of file obb_test.cpp.
References ErrorCode, filename, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_HANDLE, moab::Interface::tag_get_handle(), moab::Interface::tag_set_data(), and moab::Interface::write_mesh().
Referenced by do_file().
|
static |
Definition at line 1318 of file obb_test.cpp.
References ErrorCode, and MB_SUCCESS.
Referenced by check_common_vertex(), check_point_in_triangles(), closest_point_in_triangles(), do_closest_point_test(), and moab::AdaptiveKDTree::ray_intersect_triangles().
|
static |
Definition at line 1372 of file obb_test.cpp.
References moab::Range::end(), ErrorCode, moab::Range::find(), MB_SUCCESS, and MBTRI.
Referenced by do_closest_point_test().
|
static |
Definition at line 75 of file obb_test.cpp.
References moab::error(), and NAME.
Referenced by get_double_option(), get_int_option(), get_option(), main(), and parse_ray().
std::map< std::string, std::vector< RayTest > > default_files_tests |
Definition at line 33 of file obb_test.cpp.
Referenced by do_ray_fire_test(), initialize_default_files(), and main().
|
static |
Definition at line 31 of file obb_test.cpp.
Referenced by usage().
|
static |
Definition at line 162 of file obb_test.cpp.
Referenced by do_ray_fire_test(), and parse_ray().
|
static |
Definition at line 163 of file obb_test.cpp.
|
static |
Definition at line 157 of file obb_test.cpp.
Referenced by moab::OrientedBoxTreeTool::build(), moab::OrientedBoxTreeTool::build_sets(), moab::OrientedBoxTreeTool::build_tree(), build_tree(), do_file(), initialize_tree(), moab::OrientedBoxTreeTool::join_trees(), main(), and TreeValidator::visit().
Definition at line 164 of file obb_test.cpp.
|
static |
Definition at line 158 of file obb_test.cpp.
Referenced by main(), and VerdictVector::within_tolerance().
|
static |
Definition at line 156 of file obb_test.cpp.
Referenced by moab::DebugOutput::check(), check_ray_intersect_sets(), check_ray_intersect_tris(), do_closest_point_test(), do_file(), do_ray_fire_test(), main(), moab::DebugOutput::print(), moab::DebugOutput::print_ints(), moab::DebugOutput::printf(), moab::DebugOutput::tprint(), and moab::DebugOutput::tprintf().
|
static |
Definition at line 159 of file obb_test.cpp.
Referenced by do_file(), do_ray_fire_test(), and main().
|
static |
Definition at line 161 of file obb_test.cpp.
Referenced by do_ray_fire_test(), and main().
|
static |
Definition at line 160 of file obb_test.cpp.