MOAB: Mesh Oriented datABase
(version 5.5.0)
|
#include "moab/Core.hpp"
#include "moab/Range.hpp"
#include "TestRunner.hpp"
#include "ReadHDF5.hpp"
#include "MBTagConventions.hpp"
#include "moab/FileOptions.hpp"
#include <vector>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <limits>
Go to the source code of this file.
Macros | |
#define | FILE_NAME_BASE "portable" |
#define | BASE_NAME STRINGIFY( MESHDIR ) "/h5file/" FILE_NAME_BASE |
#define | NATIVE_NAME FILE_NAME_BASE ".h5m" |
#define | READ_OPTS "BUFFER_SIZE=256" |
#define | DEFINE_TEST_SET(NAME) |
#define | REGISTER_TEST_SET(NAME) |
Functions | |
void | create_mesh (const char *filename) |
void | test_load_file (const char *filename) |
void | test_read_vertices (const char *filename) |
void | test_elements (Interface &mb, bool odd_only) |
void | test_read_elements (const char *filename) |
void | read_sets (Interface &mb, EntityHandle rows[INTERVALS]) |
void | test_read_set_contents (const char *filename) |
void | test_read_set_parent_child (const char *filename) |
void | test_read_int_tag (const char *filename) |
void | test_read_real_tag (const char *filename) |
void | test_read_handle_tag (const char *filename) |
void | test_read_bit_tag (const char *filename) |
void | test_read_partial (const char *filename) |
void | test_native_read () |
int | main (int argc, char *argv[]) |
Variables | |
const int | default_int_tag [] = { -100, -99 } |
const int | mesh_int_tag [] = { 1134, -1134 } |
const double | default_real_tag [] = { -1, -2, -3, -4, -5, -6, -7, -8 } |
const double | mesh_real_tag [] = { 8, 7, 6, 5, 4, 3, 2, 1 } |
const size_t | INTERVALS = 8 |
const size_t | NUM_VERT = ( INTERVALS + 1 ) * ( INTERVALS + 1 ) |
const size_t | NUM_QUAD = INTERVALS * INTERVALS |
const double | Z = 0.0 |
const double | EPS = std::numeric_limits< double >::epsilon() |
Tests for HDF5 portability because we call H5Tconvert ourselves to work around parallel performance issues in the HDF5 library.
Definition in file h5portable.cpp.
#define BASE_NAME STRINGIFY( MESHDIR ) "/h5file/" FILE_NAME_BASE |
Definition at line 24 of file h5portable.cpp.
#define DEFINE_TEST_SET | ( | NAME | ) |
Definition at line 530 of file h5portable.cpp.
#define FILE_NAME_BASE "portable" |
Definition at line 23 of file h5portable.cpp.
#define NATIVE_NAME FILE_NAME_BASE ".h5m" |
Definition at line 25 of file h5portable.cpp.
#define READ_OPTS "BUFFER_SIZE=256" |
Definition at line 26 of file h5portable.cpp.
#define REGISTER_TEST_SET | ( | NAME | ) |
Definition at line 572 of file h5portable.cpp.
void create_mesh | ( | const char * | filename | ) |
Definition at line 73 of file h5portable.cpp.
References moab::Core::add_entities(), moab::Core::add_parent_child(), CHECK_ERR, moab::Core::create_element(), moab::Core::create_meshset(), moab::Core::create_vertex(), default_int_tag, default_real_tag, ErrorCode, filename, moab::Core::get_coords(), INTERVALS, mb, MB_TAG_DENSE, MB_TAG_EXCL, MB_TAG_SPARSE, MB_TYPE_BIT, MB_TYPE_DOUBLE, MB_TYPE_HANDLE, MB_TYPE_INTEGER, MBQUAD, mesh_int_tag, mesh_real_tag, MESHSET_SET, NUM_QUAD, NUM_VERT, moab::Core::tag_get_handle(), moab::Core::tag_set_data(), moab::Core::write_file(), and Z.
Referenced by test_native_read().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 588 of file h5portable.cpp.
References moab::fail(), REGISTER_TEST, REGISTER_TEST_SET, RUN_TESTS, and test_native_read().
void read_sets | ( | Interface & | mb, |
EntityHandle | rows[INTERVALS] | ||
) |
Definition at line 242 of file h5portable.cpp.
References moab::Range::all_of_type(), moab::Range::begin(), CHECK, CHECK_EQUAL, CHECK_ERR, moab::Range::end(), ErrorCode, moab::Range::front(), moab::Core::get_connectivity(), moab::Core::get_coords(), moab::Core::get_entities_by_handle(), moab::Core::get_entities_by_type(), INTERVALS, mb, MBENTITYSET, MBQUAD, and moab::Range::size().
Referenced by test_gather_sets_ranged(), test_read_bit_tag(), test_read_set_contents(), and test_read_set_parent_child().
void test_elements | ( | Interface & | mb, |
bool | odd_only | ||
) |
Definition at line 185 of file h5portable.cpp.
References moab::Range::begin(), CHECK, CHECK_EQUAL, CHECK_ERR, CHECK_REAL_EQUAL, moab::Range::end(), EPS, ErrorCode, moab::Core::get_connectivity(), moab::Core::get_coords(), moab::Core::get_entities_by_type(), INTERVALS, mb, MBQUAD, NUM_QUAD, moab::Range::size(), and Z.
Referenced by test_read_elements(), and test_read_partial().
void test_load_file | ( | const char * | filename | ) |
void test_native_read | ( | ) |
Definition at line 514 of file h5portable.cpp.
References create_mesh(), filename, NATIVE_NAME, test_read_bit_tag(), test_read_elements(), test_read_handle_tag(), test_read_int_tag(), test_read_partial(), test_read_real_tag(), test_read_set_contents(), test_read_set_parent_child(), and test_read_vertices().
Referenced by main().
void test_read_bit_tag | ( | const char * | filename | ) |
Definition at line 469 of file h5portable.cpp.
References CHECK_ARRAYS_EQUAL, CHECK_EQUAL, CHECK_ERR, ErrorCode, filename, INTERVALS, moab::Core::load_file(), mb, MB_TAG_BIT, MB_TYPE_BIT, READ_OPTS, read_sets(), size, moab::Core::tag_get_data(), moab::Core::tag_get_data_type(), moab::Core::tag_get_handle(), moab::Core::tag_get_length(), moab::Core::tag_get_type(), and TagType.
Referenced by test_native_read().
void test_read_elements | ( | const char * | filename | ) |
Definition at line 232 of file h5portable.cpp.
References CHECK_ERR, ErrorCode, filename, moab::Core::load_file(), mb, READ_OPTS, and test_elements().
Referenced by test_native_read().
void test_read_handle_tag | ( | const char * | filename | ) |
Definition at line 432 of file h5portable.cpp.
References moab::Range::begin(), CHECK_EQUAL, CHECK_ERR, moab::Range::end(), ErrorCode, filename, moab::Core::get_connectivity(), moab::Core::get_entities_by_type(), moab::Core::load_file(), mb, MB_TAG_SPARSE, MB_TYPE_HANDLE, MBQUAD, READ_OPTS, size, moab::Core::tag_get_data(), moab::Core::tag_get_data_type(), moab::Core::tag_get_handle(), moab::Core::tag_get_length(), moab::Core::tag_get_type(), and TagType.
Referenced by test_native_read().
void test_read_int_tag | ( | const char * | filename | ) |
Definition at line 333 of file h5portable.cpp.
References moab::Range::begin(), CHECK_ARRAYS_EQUAL, CHECK_EQUAL, CHECK_ERR, default_int_tag, moab::Range::end(), ErrorCode, filename, moab::Core::get_connectivity(), moab::Core::get_coords(), moab::Core::get_entities_by_type(), moab::Core::load_file(), mb, MB_TAG_DENSE, MB_TYPE_INTEGER, MBQUAD, mesh_int_tag, READ_OPTS, size, moab::Core::tag_get_data(), moab::Core::tag_get_data_type(), moab::Core::tag_get_default_value(), moab::Core::tag_get_handle(), moab::Core::tag_get_length(), moab::Core::tag_get_type(), and TagType.
Referenced by test_native_read().
void test_read_partial | ( | const char * | filename | ) |
Definition at line 501 of file h5portable.cpp.
References CHECK_ERR, ErrorCode, filename, moab::Core::load_file(), mb, READ_OPTS, and test_elements().
Referenced by test_native_read().
void test_read_real_tag | ( | const char * | filename | ) |
Definition at line 382 of file h5portable.cpp.
References moab::Range::begin(), CHECK_ARRAYS_EQUAL, CHECK_EQUAL, CHECK_ERR, default_real_tag, moab::Range::end(), ErrorCode, filename, moab::Core::get_connectivity(), moab::Core::get_coords(), moab::Core::get_entities_by_type(), moab::Core::load_file(), mb, MB_TAG_DENSE, MB_TYPE_DOUBLE, MBQUAD, mesh_real_tag, READ_OPTS, size, moab::Core::tag_get_data(), moab::Core::tag_get_data_type(), moab::Core::tag_get_default_value(), moab::Core::tag_get_handle(), moab::Core::tag_get_length(), moab::Core::tag_get_type(), and TagType.
Referenced by test_native_read().
void test_read_set_contents | ( | const char * | filename | ) |
Definition at line 268 of file h5portable.cpp.
References moab::Range::all_of_type(), moab::Range::begin(), CHECK, CHECK_EQUAL, CHECK_ERR, moab::Range::end(), ErrorCode, filename, moab::Core::get_connectivity(), moab::Core::get_coords(), moab::Core::get_entities_by_handle(), INTERVALS, moab::Core::load_file(), mb, MBQUAD, READ_OPTS, read_sets(), and moab::Range::size().
Referenced by test_native_read().
void test_read_set_parent_child | ( | const char * | filename | ) |
Definition at line 299 of file h5portable.cpp.
References CHECK, CHECK_EQUAL, CHECK_ERR, ErrorCode, filename, moab::Core::get_child_meshsets(), moab::Core::get_parent_meshsets(), INTERVALS, moab::Core::load_file(), mb, READ_OPTS, and read_sets().
Referenced by test_native_read().
void test_read_vertices | ( | const char * | filename | ) |
Definition at line 154 of file h5portable.cpp.
References moab::Range::begin(), CHECK, CHECK_EQUAL, CHECK_ERR, CHECK_REAL_EQUAL, moab::Range::end(), EPS, ErrorCode, filename, moab::Core::get_coords(), moab::Core::get_entities_by_type(), INTERVALS, moab::Core::load_file(), mb, MBVERTEX, NUM_VERT, READ_OPTS, moab::Range::size(), and Z.
Referenced by test_native_read().
const int default_int_tag[] = { -100, -99 } |
Definition at line 28 of file h5portable.cpp.
Referenced by create_mesh(), and test_read_int_tag().
const double default_real_tag[] = { -1, -2, -3, -4, -5, -6, -7, -8 } |
Definition at line 30 of file h5portable.cpp.
Referenced by create_mesh(), and test_read_real_tag().
const double EPS = std::numeric_limits< double >::epsilon() |
Definition at line 37 of file h5portable.cpp.
Referenced by moab::Matrix3::is_symmetric(), test_elements(), test_read_vertices(), test_real_arg(), and test_real_opt().
const size_t INTERVALS = 8 |
Definition at line 33 of file h5portable.cpp.
Referenced by create_mesh(), read_sets(), test_elements(), test_read_bit_tag(), test_read_set_contents(), test_read_set_parent_child(), and test_read_vertices().
const int mesh_int_tag[] = { 1134, -1134 } |
Definition at line 29 of file h5portable.cpp.
Referenced by create_mesh(), and test_read_int_tag().
const double mesh_real_tag[] = { 8, 7, 6, 5, 4, 3, 2, 1 } |
Definition at line 31 of file h5portable.cpp.
Referenced by create_mesh(), and test_read_real_tag().
Definition at line 35 of file h5portable.cpp.
Referenced by create_mesh(), and test_elements().
Definition at line 34 of file h5portable.cpp.
Referenced by create_mesh(), and test_read_vertices().
const double Z = 0.0 |
Definition at line 36 of file h5portable.cpp.
Referenced by create_mesh(), decide_gnomonic_plane_test(), find_rotation(), tensor_c3(), tensor_r3(), test_elements(), test_read_vertices(), and test_segment_box_intersect().