MOAB: Mesh Oriented datABase
(version 5.5.0)
|
#include "moab/Core.hpp"
#include "moab/Range.hpp"
#include "TestUtil.hpp"
#include <algorithm>
#include <iostream>
#include <sstream>
#include <cstdlib>
#include <cmath>
Go to the source code of this file.
Functions | |
void | read_write_file (Interface &output, Interface &input, EntityHandle *input_set=0) |
void | test_ranged_set_with_stale_handles () |
void | test_list_set_with_stale_handles () |
void | test_file_set () |
void | test_sets_fileids () |
int | coords_by_idx (int idx, double coords[][3]) |
void | recursive_build_tree (int max_depth, Interface &mb, Tag tag, EntityHandle p, int depth, int &idx) |
void | recursive_check_tree (int max_depth, Interface &mb, Tag tag, EntityHandle p, int depth, int &idx) |
void | test_tree (int max_depth) |
void | test_small_tree () |
void | test_big_tree () |
void | regression_mmiller_8_2010 () |
void | test_set_flags () |
int | main (int argc, char *argv[]) |
Variables | |
const char | filename [] = "sets.h5m" |
bool | keep_file = false |
int coords_by_idx | ( | int | idx, |
double | coords[][3] | ||
) |
Definition at line 189 of file h5sets_test.cpp.
Referenced by recursive_build_tree(), and recursive_check_tree().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 366 of file h5sets_test.cpp.
References moab::fail(), keep_file, regression_mmiller_8_2010(), RUN_TEST, test_big_tree(), test_file_set(), test_list_set_with_stale_handles(), test_ranged_set_with_stale_handles(), test_set_flags(), test_sets_fileids(), and test_small_tree().
void read_write_file | ( | Interface & | output, |
Interface & | input, | ||
EntityHandle * | input_set = 0 |
||
) |
Definition at line 20 of file h5sets_test.cpp.
References CHECK_ERR, moab::Interface::create_meshset(), ErrorCode, filename, keep_file, moab::Interface::load_file(), MESHSET_SET, and output.
Referenced by test_file_set(), test_list_set_with_stale_handles(), and test_ranged_set_with_stale_handles().
void recursive_build_tree | ( | int | max_depth, |
Interface & | mb, | ||
Tag | tag, | ||
EntityHandle | p, | ||
int | depth, | ||
int & | idx | ||
) |
Definition at line 212 of file h5sets_test.cpp.
References moab::Core::add_entities(), moab::Core::add_parent_child(), CHECK_ERR, coords_by_idx(), moab::Core::create_meshset(), moab::Core::create_vertices(), ErrorCode, max_depth, mb, MESHSET_SET, and moab::Core::tag_set_data().
Referenced by test_tree().
void recursive_check_tree | ( | int | max_depth, |
Interface & | mb, | ||
Tag | tag, | ||
EntityHandle | p, | ||
int | depth, | ||
int & | idx | ||
) |
Definition at line 234 of file h5sets_test.cpp.
References moab::Range::all_of_type(), CHECK, CHECK_EQUAL, CHECK_ERR, children, coords_by_idx(), ErrorCode, moab::Core::get_child_meshsets(), moab::Core::get_coords(), moab::Core::get_entities_by_handle(), moab::Core::get_parent_meshsets(), max_depth, mb, MBVERTEX, moab::Range::size(), and moab::Core::tag_get_data().
Referenced by test_tree().
void regression_mmiller_8_2010 | ( | ) |
Definition at line 412 of file h5sets_test.cpp.
References CHECK_EQUAL, moab::Range::clear(), moab::CREATE_HANDLE(), moab::Core::get_entities_by_handle(), moab::Core::get_entities_by_type(), moab::Range::insert(), moab::Core::load_file(), mb, MBENTITYSET, MBHEX, MBPRISM, MBPYRAMID, MBVERTEX, and moab::Range::size().
Referenced by main().
void test_big_tree | ( | ) |
void test_file_set | ( | ) |
Definition at line 110 of file h5sets_test.cpp.
References moab::Range::begin(), CHECK_EQUAL, CHECK_ERR, moab::Range::end(), ErrorCode, MBENTITYSET, MBTRI, MBVERTEX, read_write_file(), and moab::Range::size().
Referenced by main().
void test_list_set_with_stale_handles | ( | ) |
Definition at line 71 of file h5sets_test.cpp.
References moab::Core::add_entities(), moab::Range::back(), moab::Range::begin(), CHECK_EQUAL, CHECK_ERR, moab::Core::create_meshset(), moab::Core::create_vertices(), moab::Core::delete_entities(), ErrorCode, moab::Range::front(), moab::Interface::get_entities_by_handle(), moab::Interface::get_entities_by_type(), mb, MBENTITYSET, read_write_file(), and moab::Range::size().
Referenced by main().
void test_ranged_set_with_stale_handles | ( | ) |
Definition at line 32 of file h5sets_test.cpp.
References moab::Core::add_entities(), moab::Range::back(), moab::Range::begin(), CHECK_EQUAL, CHECK_ERR, moab::Core::create_meshset(), moab::Core::create_vertices(), moab::Core::delete_entities(), ErrorCode, moab::Range::front(), moab::Interface::get_entities_by_type(), moab::Interface::get_number_entities_by_type(), mb, MBENTITYSET, MBVERTEX, MESHSET_SET, read_write_file(), and moab::Range::size().
Referenced by main().
void test_set_flags | ( | ) |
Definition at line 639 of file h5sets_test.cpp.
References moab::Core::add_entities(), moab::Range::begin(), CHECK_ARRAYS_EQUAL, CHECK_EQUAL, CHECK_ERR, moab::Range::clear(), moab::Core::create_meshset(), moab::Core::create_vertices(), moab::Core::delete_mesh(), ErrorCode, filename2, moab::Range::front(), moab::Core::get_entities_by_handle(), moab::Core::get_entities_by_type_and_tag(), moab::Core::get_meshset_options(), keep_file, moab::Core::load_file(), mb, MB_TYPE_INTEGER, MBENTITYSET, MESHSET_SET, MESHSET_TRACK_OWNER, moab::Range::size(), moab::Core::tag_get_data(), moab::Core::tag_get_handle(), moab::Core::tag_set_data(), and moab::Core::write_file().
Referenced by main().
void test_sets_fileids | ( | ) |
Definition at line 148 of file h5sets_test.cpp.
References moab::Range::begin(), CHECK, CHECK_EQUAL, CHECK_ERR, moab::Range::end(), ErrorCode, filename, keep_file, MBENTITYSET, MBTRI, and moab::Range::size().
Referenced by main().
void test_small_tree | ( | ) |
Definition at line 345 of file h5sets_test.cpp.
References CHECK, max_depth, and test_tree().
Referenced by main().
void test_tree | ( | int | max_depth | ) |
Definition at line 302 of file h5sets_test.cpp.
References CHECK_EQUAL, CHECK_ERR, moab::Core::create_meshset(), moab::Core::delete_mesh(), ErrorCode, moab::Range::front(), moab::Core::get_entities_by_type_and_tag(), keep_file, moab::Core::load_file(), max_depth, mb, MB_TYPE_INTEGER, MBENTITYSET, MESHSET_SET, recursive_build_tree(), recursive_check_tree(), moab::Range::size(), moab::Core::tag_get_handle(), and moab::Core::write_file().
Referenced by test_big_tree(), and test_small_tree().
const char filename[] = "sets.h5m" |
Definition at line 17 of file h5sets_test.cpp.
Referenced by read_write_file(), and test_sets_fileids().
bool keep_file = false |
Definition at line 18 of file h5sets_test.cpp.
Referenced by main(), read_write_file(), test_set_flags(), test_sets_fileids(), and test_tree().