MOAB: Mesh Oriented datABase
(version 5.5.0)
|
#include "moab/Core.hpp"
#include "moab/CartVect.hpp"
#include "moab/OrientedBoxTreeTool.hpp"
#include "moab/OrientedBox.hpp"
#include "Internals.hpp"
#include "moab/Range.hpp"
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <limits>
#include <cstdlib>
#include <ctime>
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
Go to the source code of this file.
Classes | |
struct | SimpleStat< T > |
class | TriTagger |
class | VtxTagger |
class | LeafHexer |
Macros | |
#define | IS_BUILDING_MB |
Functions | |
std::string | clock_to_string (clock_t t) |
std::string | mem_to_string (unsigned long mem) |
ErrorCode | get_root (Interface *moab, EntityHandle &root) |
EntityHandle | build_tree (Interface *interface, OrientedBoxTreeTool::Settings settings) |
void | delete_existing_tree (Interface *interface) |
void | print_stats (Interface *interface) |
void | tag_triangles (Interface *interface) |
void | tag_vertices (Interface *interface) |
void | write_tree_blocks (Interface *interface, const char *file) |
static void | usage (bool err=true) |
static void | memory_use (unsigned long long &vsize, unsigned long long &rss) |
static int | parseint (int &i, int argc, char *argv[]) |
static double | parsedouble (int &i, int argc, char *argv[]) |
int | main (int argc, char *argv[]) |
static int | hash_handle (EntityHandle handle) |
Variables | |
const int | MAX_TAG_VALUE = 20 |
const char *const | TAG_NAME = "OBB_ID" |
const char *const | TREE_TAG = "OBB_ROOT" |
const char * | root_tag = TREE_TAG |
#define IS_BUILDING_MB |
Definition at line 1 of file obb_tree_tool.cpp.
EntityHandle build_tree | ( | Interface * | interface, |
OrientedBoxTreeTool::Settings | settings | ||
) |
Definition at line 299 of file obb_tree_tool.cpp.
References moab::OrientedBoxTreeTool::build(), moab::Range::empty(), ErrorCode, moab::Interface::get_entities_by_type(), MB_SUCCESS, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_HANDLE, MBTRI, mesh, root_tag, settings, moab::Interface::tag_get_handle(), and moab::Interface::tag_set_data().
Referenced by main().
std::string clock_to_string | ( | clock_t | t | ) |
Definition at line 339 of file obb_tree_tool.cpp.
References buffer, t, and moab::unit().
Referenced by main().
void delete_existing_tree | ( | Interface * | interface | ) |
Definition at line 283 of file obb_tree_tool.cpp.
References moab::OrientedBoxTreeTool::delete_tree(), ErrorCode, get_root(), and MB_SUCCESS.
Referenced by main().
ErrorCode get_root | ( | Interface * | moab, |
EntityHandle & | root | ||
) |
Definition at line 271 of file obb_tree_tool.cpp.
References ErrorCode, MB_SUCCESS, MB_TYPE_HANDLE, mesh, and root_tag.
Referenced by delete_existing_tree(), print_stats(), tag_triangles(), tag_vertices(), and write_tree_blocks().
|
static |
Definition at line 458 of file obb_tree_tool.cpp.
References moab::ID_FROM_HANDLE(), and MAX_TAG_VALUE.
Referenced by TriTagger::leaf(), VtxTagger::leaf(), and LeafHexer::leaf().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 135 of file obb_tree_tool.cpp.
References moab::OrientedBoxTreeTool::Settings::best_split_ratio, build_time, build_tree(), clock_to_string(), delete_existing_tree(), ErrorCode, input_file, load_time, moab::OrientedBoxTreeTool::Settings::max_depth, moab::OrientedBoxTreeTool::Settings::max_leaf_entities, MB_SUCCESS, MESHSET_SET, parsedouble(), parseint(), print_stats(), root_tag, moab::OrientedBoxTreeTool::Settings::set_options, settings, tag_time(), tag_triangles(), tag_vertices(), usage(), moab::OrientedBoxTreeTool::Settings::worst_split_ratio, and write_tree_blocks().
std::string mem_to_string | ( | unsigned long | mem | ) |
Definition at line 360 of file obb_tree_tool.cpp.
References buffer, and moab::unit().
Referenced by print_stats().
|
static |
|
static |
|
static |
void print_stats | ( | Interface * | interface | ) |
Definition at line 410 of file obb_tree_tool.cpp.
References moab::Range::begin(), moab::Range::end(), moab::Range::erase(), ErrorCode, moab::Interface::estimated_memory_use(), moab::Interface::get_entities_by_type(), moab::Interface::get_number_entities_by_type(), get_root(), moab::Range::insert(), MB_SUCCESS, MBENTITYSET, MBTRI, MBVERTEX, mem_to_string(), memory_use(), moab::Range::merge(), and moab::OrientedBoxTreeTool::stats().
Referenced by main().
void tag_triangles | ( | Interface * | interface | ) |
Definition at line 492 of file obb_tree_tool.cpp.
References ErrorCode, get_root(), MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, moab::OrientedBoxTreeTool::preorder_traverse(), and TAG_NAME.
Referenced by main().
void tag_vertices | ( | Interface * | interface | ) |
Definition at line 547 of file obb_tree_tool.cpp.
References ErrorCode, get_root(), MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, moab::OrientedBoxTreeTool::preorder_traverse(), and TAG_NAME.
Referenced by main().
|
static |
Definition at line 39 of file obb_tree_tool.cpp.
References moab::OrientedBoxTreeTool::Settings::best_split_ratio, moab::OrientedBoxTreeTool::Settings::max_depth, moab::OrientedBoxTreeTool::Settings::max_leaf_entities, TREE_TAG, and moab::OrientedBoxTreeTool::Settings::worst_split_ratio.
Referenced by main(), parsedouble(), and parseint().
void write_tree_blocks | ( | Interface * | interface, |
const char * | file | ||
) |
Definition at line 603 of file obb_tree_tool.cpp.
References ErrorCode, get_root(), MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, moab::OrientedBoxTreeTool::preorder_traverse(), moab::Core::tag_get_handle(), TAG_NAME, and moab::Core::write_mesh().
Referenced by main().
const int MAX_TAG_VALUE = 20 |
Definition at line 26 of file obb_tree_tool.cpp.
Referenced by hash_handle().
const char* root_tag = TREE_TAG |
Definition at line 29 of file obb_tree_tool.cpp.
Referenced by build_tree(), get_root(), and main().
const char* const TAG_NAME = "OBB_ID" |
Definition at line 27 of file obb_tree_tool.cpp.
Referenced by tag_triangles(), tag_vertices(), and write_tree_blocks().
const char* const TREE_TAG = "OBB_ROOT" |
Definition at line 28 of file obb_tree_tool.cpp.
Referenced by usage().