MOAB: Mesh Oriented datABase
(version 5.5.0)
|
#include "moab/Core.hpp"
#include "moab/AdaptiveKDTree.hpp"
#include "moab/Range.hpp"
#include "moab/CartVect.hpp"
#include "moab/GeomUtil.hpp"
#include <iostream>
#include <ctime>
#include <cstdlib>
#include <cassert>
#include <sstream>
Go to the source code of this file.
Macros | |
#define | CHK(ErrorCode) |
Enumerations | |
enum | TreeType { UseKDTree , UseNoTree , UseDefaultTree = UseKDTree } |
Functions | |
static void | fail (ErrorCode error_code, const char *file_name, int line_number) |
const char * | is_default_tree (TreeType type) |
static void | usage (char *argv0, bool help=false) |
static void | generate_random_points (Interface &mesh, size_t num_points, std::vector< CartVect > &points, std::vector< EntityHandle > &point_elems) |
static void | do_kdtree_test (Interface &mesh, int tree_depth, int elem_per_leaf, long num_test, const std::vector< CartVect > &points, std::vector< EntityHandle > &point_elems, clock_t &build_time, clock_t &test_time, size_t &depth) |
static void | do_linear_test (Interface &mesh, int tree_depth, int elem_per_leaf, long num_test, const std::vector< CartVect > &points, std::vector< EntityHandle > &point_elems, clock_t &build_time, clock_t &test_time, size_t &depth) |
int | main (int argc, char *argv[]) |
static CartVect | random_point_in_hex (Interface &mb, EntityHandle hex) |
Variables | |
const char * | default_str = "(default)" |
const char * | empty_str = "" |
const long | DEFAULT_NUM_TEST = 100000 |
const long | HARD_MAX_UNIQUE_POINTS = 100000 |
const long | HARD_MIN_UNIQUE_POINTS = 1000 |
const long | FRACTION_UNIQUE_POINTS = 100 |
const int | HexSign [8][3] |
#define CHK | ( | ErrorCode | ) |
Definition at line 12 of file point_location.cpp.
enum TreeType |
Enumerator | |
---|---|
UseKDTree | |
UseNoTree | |
UseDefaultTree |
Definition at line 22 of file point_location.cpp.
|
static |
Definition at line 310 of file point_location.cpp.
References build_time, moab::AdaptiveKDTree::build_tree(), CHK, moab::Range::clear(), ErrorCode, moab::Core::get_connectivity(), moab::Core::get_coords(), moab::Core::get_entities_by_handle(), moab::Core::get_entities_by_type(), moab::AdaptiveKDTree::get_info(), init(), leaf, mb, MBHEX, moab::GeomUtil::point_in_trilinear_hex(), and moab::AdaptiveKDTree::point_search().
Referenced by main().
|
static |
Definition at line 372 of file point_location.cpp.
References moab::Range::begin(), build_time, CHK, moab::Range::end(), ErrorCode, moab::Core::get_connectivity(), moab::Core::get_coords(), moab::Core::get_entities_by_type(), init(), mb, MBHEX, and moab::GeomUtil::point_in_trilinear_hex().
Referenced by main().
|
static |
Definition at line 236 of file point_location.cpp.
|
static |
Definition at line 274 of file point_location.cpp.
References moab::Range::all_of_type(), moab::Range::begin(), CHK, moab::Range::empty(), moab::Range::end(), moab::Range::equal_range(), moab::Range::erase(), ErrorCode, moab::Core::get_entities_by_dimension(), mb, MBHEX, random_point_in_hex(), and moab::Range::size().
Referenced by main().
|
inline |
Definition at line 31 of file point_location.cpp.
References default_str, empty_str, and UseDefaultTree.
Referenced by usage().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 87 of file point_location.cpp.
References build_time, DEFAULT_NUM_TEST, do_kdtree_test(), do_linear_test(), ErrorCode, moab::Core::estimated_memory_use(), moab::fail(), FRACTION_UNIQUE_POINTS, generate_random_points(), moab::Core::get_last_error(), HARD_MAX_UNIQUE_POINTS, HARD_MIN_UNIQUE_POINTS, input_file, moab::Core::load_file(), mb, MB_SUCCESS, usage(), UseDefaultTree, UseKDTree, and UseNoTree.
|
static |
Definition at line 245 of file point_location.cpp.
References CHK, ErrorCode, moab::Core::get_connectivity(), moab::Core::get_coords(), HexSign, mb, and MB_SUCCESS.
Referenced by generate_random_points().
|
static |
Definition at line 41 of file point_location.cpp.
References argv0, DEFAULT_NUM_TEST, help(), is_default_tree(), UseKDTree, and UseNoTree.
Referenced by main().
const long DEFAULT_NUM_TEST = 100000 |
Definition at line 36 of file point_location.cpp.
const char* default_str = "(default)" |
Definition at line 29 of file point_location.cpp.
Referenced by is_default_tree().
const char* empty_str = "" |
Definition at line 30 of file point_location.cpp.
Referenced by is_default_tree().
const long FRACTION_UNIQUE_POINTS = 100 |
Definition at line 39 of file point_location.cpp.
Referenced by main().
const long HARD_MAX_UNIQUE_POINTS = 100000 |
Definition at line 37 of file point_location.cpp.
Referenced by main().
const long HARD_MIN_UNIQUE_POINTS = 1000 |
Definition at line 38 of file point_location.cpp.
Referenced by main().
const int HexSign[8][3] |
Definition at line 242 of file point_location.cpp.
Referenced by random_point_in_hex().