MOAB: Mesh Oriented datABase
(version 5.5.0)
|
#include "moab/Core.hpp"
#include "moab/CartVect.hpp"
#include "moab/AdaptiveKDTree.hpp"
#include "moab/GeomUtil.hpp"
#include "Internals.hpp"
#include "moab/Range.hpp"
#include "moab/FileOptions.hpp"
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <limits>
#include <sstream>
#include <cstdlib>
#include <ctime>
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
Go to the source code of this file.
Functions | |
std::string | clock_to_string (clock_t t) |
std::string | mem_to_string (unsigned long mem) |
void | build_tree (Interface *interface, const Range &elems, FileOptions &opts) |
void | build_grid (Interface *iface, const double dims[3]) |
void | delete_existing_tree (Interface *interface) |
void | print_stats (Interface *interface) |
void | tag_elements (Interface *interface) |
void | tag_vertices (Interface *interface) |
void | write_tree_blocks (Interface *interface, const char *file) |
static void | usage (bool err=true) |
static int | parseint (int &i, int argc, char *argv[]) |
static void | parsedims (int &i, int argc, char *argv[], double dims[3]) |
int | main (int argc, char *argv[]) |
static int | hash_handle (EntityHandle handle) |
Variables | |
const int | MAX_TAG_VALUE = 32 |
const char * | TAG_NAME = "TREE_CELL" |
void build_grid | ( | Interface * | iface, |
const double | dims[3] | ||
) |
Definition at line 386 of file kd_tree_tool.cpp.
References moab::AdaptiveKDTreeIter::box_max(), moab::AdaptiveKDTreeIter::box_min(), moab::AdaptiveKDTree::Plane::coord, moab::Tree::create_root(), moab::AdaptiveKDTreeIter::depth(), ErrorCode, moab::Tree::get_max_depth(), moab::AdaptiveKDTree::get_tree_iterator(), MB_ENTITY_NOT_FOUND, MB_SUCCESS, moab::AdaptiveKDTree::Plane::norm, moab::AdaptiveKDTree::split_leaf(), and moab::AdaptiveKDTreeIter::step().
Referenced by main().
void build_tree | ( | Interface * | interface, |
const Range & | elems, | ||
FileOptions & | opts | ||
) |
Definition at line 373 of file kd_tree_tool.cpp.
References moab::Range::empty().
Referenced by main().
std::string clock_to_string | ( | clock_t | t | ) |
Definition at line 431 of file kd_tree_tool.cpp.
References buffer, t, and moab::unit().
Referenced by main().
void delete_existing_tree | ( | Interface * | interface | ) |
Definition at line 354 of file kd_tree_tool.cpp.
References moab::Range::begin(), moab::Range::clear(), moab::Range::empty(), moab::Range::end(), moab::Tree::find_all_trees(), and moab::AdaptiveKDTree::reset_tree().
Referenced by main().
|
static |
Definition at line 452 of file kd_tree_tool.cpp.
References moab::ID_FROM_HANDLE(), and MAX_TAG_VALUE.
Referenced by tag_elements(), tag_vertices(), and write_tree_blocks().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 155 of file kd_tree_tool.cpp.
References build_grid(), build_time, build_tree(), clock_to_string(), delete_existing_tree(), moab::Range::empty(), ErrorCode, moab::Tree::find_all_trees(), input_file, load_time, MB_SUCCESS, moab::Range::merge(), parsedims(), parseint(), moab::AdaptiveKDTree::print(), moab::Range::size(), moab::AdaptiveKDTree::SUBDIVISION, moab::AdaptiveKDTree::SUBDIVISION_SNAP, tag_elements(), tag_time(), tag_vertices(), usage(), moab::AdaptiveKDTree::VERTEX_MEDIAN, moab::AdaptiveKDTree::VERTEX_SAMPLE, 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 |
Definition at line 116 of file kd_tree_tool.cpp.
References moab::error(), and usage().
Referenced by main().
|
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_elements | ( | Interface * | interface | ) |
Definition at line 458 of file kd_tree_tool.cpp.
References moab::Range::begin(), moab::Range::clear(), moab::Range::empty(), moab::Tree::find_all_trees(), moab::AdaptiveKDTree::get_tree_iterator(), moab::AdaptiveKDTreeIter::handle(), hash_handle(), MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, moab::Range::size(), moab::AdaptiveKDTreeIter::step(), and TAG_NAME.
Referenced by main().
void tag_vertices | ( | Interface * | interface | ) |
Definition at line 495 of file kd_tree_tool.cpp.
References moab::CartVect::array(), moab::Range::begin(), moab::AdaptiveKDTreeIter::box_max(), moab::AdaptiveKDTreeIter::box_min(), moab::GeomUtil::box_point_overlap(), moab::Range::clear(), moab::Range::empty(), moab::Range::end(), moab::Tree::find_all_trees(), moab::AdaptiveKDTree::get_tree_iterator(), moab::AdaptiveKDTreeIter::handle(), hash_handle(), MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, moab::Range::size(), moab::AdaptiveKDTreeIter::step(), TAG_NAME, and moab::Interface::UNION.
Referenced by main().
|
static |
void write_tree_blocks | ( | Interface * | interface, |
const char * | file | ||
) |
Definition at line 539 of file kd_tree_tool.cpp.
References moab::Range::begin(), moab::AdaptiveKDTreeIter::box_max(), moab::AdaptiveKDTreeIter::box_min(), moab::Range::clear(), moab::Core::create_element(), moab::Core::create_vertex(), moab::Range::empty(), moab::Tree::find_all_trees(), moab::AdaptiveKDTree::get_tree_iterator(), moab::AdaptiveKDTreeIter::handle(), hash_handle(), MB_SUCCESS, MB_TAG_CREAT, MB_TAG_DENSE, MB_TYPE_INTEGER, MBHEX, moab::Range::size(), moab::AdaptiveKDTreeIter::step(), moab::Core::tag_get_handle(), TAG_NAME, moab::Core::tag_set_data(), and moab::Core::write_mesh().
Referenced by main().
const int MAX_TAG_VALUE = 32 |
Definition at line 23 of file kd_tree_tool.cpp.
Referenced by hash_handle().
const char* TAG_NAME = "TREE_CELL" |
Definition at line 24 of file kd_tree_tool.cpp.
Referenced by tag_elements(), tag_vertices(), and write_tree_blocks().