MOAB: Mesh Oriented datABase
(version 5.5.0)
|
#include "TestUtil.hpp"
#include "moab/Core.hpp"
#include "MBTagConventions.hpp"
#include "moab/CN.hpp"
#include "moab/Range.hpp"
#include "ReadNCDF.hpp"
#include "moab/FileOptions.hpp"
#include "ExoIIUtil.hpp"
#include <cmath>
#include <algorithm>
Go to the source code of this file.
Classes | |
struct | TestType |
Macros | |
#define | IS_BUILDING_MB |
Variables | |
static const char | ho_file [] = "ho_test.g" |
static const char | file_one [] = "mbtest1.g" |
static const char | alt_file [] = "hex_2x2x2_ss.exo" |
static const char | polyg [] = "poly8-10.vtk" |
static const char | polyh [] = "polyhedra.vtk" |
static const char | rpolyg [] = "polyg.exo" |
static const char | rpolyh [] = "polyh.exo" |
#define IS_BUILDING_MB |
Definition at line 8 of file exodus_test.cpp.
void check_ho_element | ( | Interface & | moab, |
EntityHandle | entity, | ||
int | mid_nodes[4] | ||
) |
Definition at line 781 of file exodus_test.cpp.
References CHECK_EQUAL, CHECK_ERR, CHECK_REAL_EQUAL, moab::CN::Dimension(), ErrorCode, moab::CN::HONodeParent(), moab::CN::NumSubEntities(), moab::CN::SubEntityType(), moab::CN::SubEntityVertexIndices(), moab::TYPE_FROM_HANDLE(), and moab::CN::VerticesPerEntity().
Referenced by check_ho_elements().
void check_ho_elements | ( | Interface & | moab, |
EntityHandle | block, | ||
EntityType | type, | ||
int | mid_nodes[4] | ||
) |
Definition at line 767 of file exodus_test.cpp.
References moab::Range::all_of_type(), moab::Range::begin(), CHECK, CHECK_ERR, check_ho_element(), moab::Range::empty(), moab::Range::end(), ErrorCode, and MBENTITYSET.
Referenced by test_ho_elements(), and test_read_side().
void check_type | ( | const TestType & | type | ) |
Definition at line 678 of file exodus_test.cpp.
References CHECK_EQUAL, dim, moab::CN::Dimension(), moab::ExoIIUtil::element_name_to_type(), moab::ExoIIUtil::element_type_name(), moab::ExoIIUtil::ElementTypeNames, TestType::exo_type, moab::ExoIIUtil::ExoIIElementMBEntity, moab::CN::HasMidNodes(), moab::ExoIIUtil::HasMidNodes, TestType::moab_type, TestType::name, TestType::num_nodes, and moab::ExoIIUtil::VerticesPerElement.
Referenced by test_types().
EntityHandle find_block | ( | Interface & | mb, |
EntityType | type, | ||
const int | has_mid_nodes[4] | ||
) |
Definition at line 837 of file exodus_test.cpp.
References moab::Range::begin(), CHECK, CHECK_ERR, moab::Range::end(), ErrorCode, moab::Core::get_entities_by_type_and_tag(), moab::Core::get_number_entities_by_type(), HAS_MID_NODES_TAG_NAME, MATERIAL_SET_TAG_NAME, mb, MB_TYPE_INTEGER, MBENTITYSET, and moab::Core::tag_get_handle().
Referenced by test_ho_elements().
EntityHandle find_sideset | ( | Interface & | mb, |
int | sideset_id, | ||
EntityType | |||
) |
Definition at line 864 of file exodus_test.cpp.
References CHECK_EQUAL, CHECK_ERR, ErrorCode, moab::Range::front(), moab::Core::get_entities_by_type_and_tag(), mb, MB_TYPE_INTEGER, MBENTITYSET, NEUMANN_SET_TAG_NAME, moab::Range::size(), and moab::Core::tag_get_handle().
Referenced by test_read_side().
void load_file_one | ( | Interface * | iface | ) |
Definition at line 186 of file exodus_test.cpp.
References CHECK_ERR, moab::error(), ErrorCode, file_one, moab::Interface::get_last_error(), iface, moab::Interface::load_mesh(), and MB_SUCCESS.
Referenced by mb_bar_connectivity_test(), mb_hex_connectivity_test(), mb_quad_connectivity_test(), mb_tet_connectivity_test(), mb_tri_connectivity_test(), mb_vertex_coordinate_test(), and mb_write_mesh_test().
int main | ( | ) |
Definition at line 141 of file exodus_test.cpp.
References mb_bar_connectivity_test(), mb_hex_connectivity_test(), mb_quad_connectivity_test(), mb_tet_connectivity_test(), mb_tri_connectivity_test(), mb_vertex_coordinate_test(), mb_write_mesh_test(), RUN_TEST, test_hex20(), test_hex27(), test_hex9(), test_quad5(), test_quad8(), test_quad9(), test_read_alternate_coord_format(), test_read_block_ids(), test_read_hex20_side(), test_read_nodeset_ids(), test_read_polygons(), test_read_polyhedra(), test_read_shell_edge(), test_read_shell_side(), test_read_sideset_ids(), test_read_tri6_side(), test_tet10(), test_tet14(), test_tet8(), test_tri6(), test_tri7(), test_types(), test_write_polygons(), and test_write_polyhedra().
void mb_bar_connectivity_test | ( | ) |
Definition at line 248 of file exodus_test.cpp.
References moab::Range::begin(), CHECK_EQUAL, CHECK_ERR, moab::error(), ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_entities_by_type(), load_file_one(), and MBEDGE.
Referenced by main().
void mb_hex_connectivity_test | ( | ) |
Definition at line 330 of file exodus_test.cpp.
References moab::Range::begin(), CHECK_EQUAL, CHECK_ERR, moab::error(), ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_entities_by_type(), load_file_one(), and MBHEX.
Referenced by main().
void mb_quad_connectivity_test | ( | ) |
Definition at line 303 of file exodus_test.cpp.
References moab::Range::begin(), CHECK_EQUAL, CHECK_ERR, moab::error(), ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_entities_by_type(), load_file_one(), and MBQUAD.
Referenced by main().
void mb_tet_connectivity_test | ( | ) |
Definition at line 361 of file exodus_test.cpp.
References moab::Range::begin(), CHECK_EQUAL, CHECK_ERR, moab::error(), ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_entities_by_type(), load_file_one(), and MBTET.
Referenced by main().
void mb_tri_connectivity_test | ( | ) |
Definition at line 278 of file exodus_test.cpp.
References moab::Range::begin(), CHECK_EQUAL, CHECK_ERR, moab::error(), ErrorCode, moab::Interface::get_connectivity(), moab::Interface::get_entities_by_type(), load_file_one(), and MBTRI.
Referenced by main().
void mb_vertex_coordinate_test | ( | ) |
Definition at line 206 of file exodus_test.cpp.
References CHECK_ARRAYS_EQUAL, CHECK_EQUAL, CHECK_ERR, moab::CREATE_HANDLE(), moab::error(), ErrorCode, moab::Interface::get_coords(), moab::Interface::get_number_entities_by_type(), load_file_one(), and MBVERTEX.
Referenced by main().
void mb_write_mesh_test | ( | ) |
Definition at line 387 of file exodus_test.cpp.
References moab::Interface::add_entities(), moab::Range::begin(), CHECK_ERR, moab::Range::clear(), moab::Interface::create_meshset(), DIRICHLET_SET_TAG_NAME, moab::Range::end(), ErrorCode, GEOM_DIMENSION_TAG_NAME, moab::Interface::get_connectivity(), moab::Interface::get_coords(), moab::Interface::get_entities_by_type(), moab::ID_FROM_HANDLE(), moab::Range::insert(), load_file_one(), MATERIAL_SET_TAG_NAME, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, MBHEX, MBQUAD, MESHSET_TRACK_OWNER, NEUMANN_SET_TAG_NAME, moab::Range::size(), moab::Interface::tag_get_handle(), moab::Interface::tag_set_data(), and moab::Interface::write_mesh().
Referenced by main().
void read_file | ( | Interface & | moab, |
const char * | input_file | ||
) |
Definition at line 748 of file exodus_test.cpp.
References CHECK_ERR, ErrorCode, and input_file.
Referenced by test_ho_elements(), and test_read_side().
void test_hex20 | ( | ) |
Definition at line 105 of file exodus_test.cpp.
References MBHEX, and test_ho_elements().
Referenced by main().
void test_hex27 | ( | ) |
Definition at line 109 of file exodus_test.cpp.
References MBHEX, and test_ho_elements().
Referenced by main().
void test_hex9 | ( | ) |
Definition at line 101 of file exodus_test.cpp.
References MBHEX, and test_ho_elements().
Referenced by main().
void test_ho_elements | ( | EntityType | type, |
int | num_nodes | ||
) |
Definition at line 882 of file exodus_test.cpp.
References CHECK, check_ho_elements(), find_block(), moab::CN::HasMidNodes(), ho_file, read_file(), and write_and_read().
Referenced by test_hex20(), test_hex27(), test_hex9(), test_quad5(), test_quad8(), test_quad9(), test_tet10(), test_tet14(), test_tet8(), test_tri6(), and test_tri7().
void test_quad5 | ( | ) |
Definition at line 75 of file exodus_test.cpp.
References MBQUAD, and test_ho_elements().
Referenced by main().
void test_quad8 | ( | ) |
Definition at line 79 of file exodus_test.cpp.
References MBQUAD, and test_ho_elements().
Referenced by main().
void test_quad9 | ( | ) |
Definition at line 83 of file exodus_test.cpp.
References MBQUAD, and test_ho_elements().
Referenced by main().
void test_read_alternate_coord_format | ( | ) |
Definition at line 967 of file exodus_test.cpp.
References alt_file, CHECK_ARRAYS_EQUAL, CHECK_EQUAL, CHECK_ERR, ErrorCode, moab::Range::front(), moab::Core::get_connectivity(), moab::Core::get_coords(), moab::Core::get_entities_by_type(), moab::Core::load_file(), mb, MBHEX, and moab::Range::size().
Referenced by main().
void test_read_block_ids | ( | ) |
Definition at line 950 of file exodus_test.cpp.
References ho_file, MATERIAL_SET_TAG_NAME, and test_read_ids_common().
Referenced by main().
void test_read_hex20_side | ( | ) |
Definition at line 126 of file exodus_test.cpp.
References MBQUAD, and test_read_side().
Referenced by main().
void test_read_ids_common | ( | const char * | file_name, |
const char * | tag_name, | ||
const int * | expected_vals, | ||
int | num_expected | ||
) |
Definition at line 935 of file exodus_test.cpp.
References CHECK_EQUAL, CHECK_ERR, ErrorCode, mb, and moab::ReadNCDF::read_tag_values().
Referenced by test_read_block_ids(), test_read_nodeset_ids(), and test_read_sideset_ids().
void test_read_nodeset_ids | ( | ) |
Definition at line 962 of file exodus_test.cpp.
References DIRICHLET_SET_TAG_NAME, ho_file, and test_read_ids_common().
Referenced by main().
void test_read_polygons | ( | ) |
void test_read_polyhedra | ( | ) |
void test_read_shell_edge | ( | ) |
Definition at line 122 of file exodus_test.cpp.
References MBEDGE, and test_read_side().
Referenced by main().
void test_read_shell_side | ( | ) |
Definition at line 118 of file exodus_test.cpp.
References MBQUAD, and test_read_side().
Referenced by main().
void test_read_side | ( | int | sideset_id, |
EntityType | sideset_type, | ||
int | sideset_nodes_per_elem, | ||
bool | shell_side = false |
||
) |
Definition at line 904 of file exodus_test.cpp.
References moab::Range::begin(), CHECK, CHECK_EQUAL, CHECK_ERR, check_ho_elements(), dim, moab::CN::Dimension(), moab::Range::end(), ErrorCode, find_sideset(), moab::Core::get_adjacencies(), moab::Core::get_entities_by_handle(), moab::CN::HasMidNodes(), ho_file, read_file(), moab::Range::size(), and moab::Interface::UNION.
Referenced by test_read_hex20_side(), test_read_shell_edge(), test_read_shell_side(), and test_read_tri6_side().
void test_read_sideset_ids | ( | ) |
Definition at line 956 of file exodus_test.cpp.
References ho_file, NEUMANN_SET_TAG_NAME, and test_read_ids_common().
Referenced by main().
void test_read_tri6_side | ( | ) |
Definition at line 114 of file exodus_test.cpp.
References MBEDGE, and test_read_side().
Referenced by main().
void test_tet10 | ( | ) |
Definition at line 92 of file exodus_test.cpp.
References MBTET, and test_ho_elements().
Referenced by main().
void test_tet14 | ( | ) |
Definition at line 96 of file exodus_test.cpp.
References MBTET, and test_ho_elements().
Referenced by main().
void test_tet8 | ( | ) |
Definition at line 88 of file exodus_test.cpp.
References MBTET, and test_ho_elements().
Referenced by main().
void test_tri6 | ( | ) |
Definition at line 66 of file exodus_test.cpp.
References MBTRI, and test_ho_elements().
Referenced by main().
void test_tri7 | ( | ) |
Definition at line 70 of file exodus_test.cpp.
References MBTRI, and test_ho_elements().
Referenced by main().
void test_types | ( | ) |
Definition at line 697 of file exodus_test.cpp.
References check_type(), moab::EXOII_BAR, moab::EXOII_BAR2, moab::EXOII_BAR3, moab::EXOII_BEAM, moab::EXOII_BEAM2, moab::EXOII_BEAM3, moab::EXOII_HEX, moab::EXOII_HEX20, moab::EXOII_HEX27, moab::EXOII_HEX8, moab::EXOII_HEX9, moab::EXOII_HEXSHELL, moab::EXOII_KNIFE, moab::EXOII_PYRAMID, moab::EXOII_PYRAMID10, moab::EXOII_PYRAMID13, moab::EXOII_PYRAMID18, moab::EXOII_PYRAMID5, moab::EXOII_QUAD, moab::EXOII_QUAD4, moab::EXOII_QUAD5, moab::EXOII_QUAD8, moab::EXOII_QUAD9, moab::EXOII_SHELL, moab::EXOII_SHELL4, moab::EXOII_SHELL5, moab::EXOII_SHELL8, moab::EXOII_SHELL9, moab::EXOII_SPHERE, moab::EXOII_SPRING, moab::EXOII_TET4, moab::EXOII_TETRA, moab::EXOII_TETRA10, moab::EXOII_TETRA14, moab::EXOII_TETRA4, moab::EXOII_TETRA8, moab::EXOII_TRI, moab::EXOII_TRI3, moab::EXOII_TRI6, moab::EXOII_TRI7, moab::EXOII_TRUSS, moab::EXOII_TRUSS2, moab::EXOII_TRUSS3, moab::EXOII_WEDGE, MBEDGE, MBHEX, MBKNIFE, MBPRISM, MBPYRAMID, MBQUAD, MBTET, MBTRI, and MBVERTEX.
Referenced by main().
void test_write_polygons | ( | ) |
Definition at line 987 of file exodus_test.cpp.
References CHECK_ERR, ErrorCode, moab::Core::load_file(), mb, polyg, and moab::Core::write_file().
Referenced by main().
void test_write_polyhedra | ( | ) |
Definition at line 995 of file exodus_test.cpp.
References CHECK_ERR, ErrorCode, moab::Core::load_file(), mb, polyh, and moab::Core::write_file().
Referenced by main().
void write_and_read | ( | Interface & | write_mb, |
Interface & | read_mb, | ||
EntityHandle | block = 0 |
||
) |
Definition at line 753 of file exodus_test.cpp.
References CHECK_ERR, ErrorCode, moab::Interface::load_file(), MB_SUCCESS, tmp_file, and moab::Interface::write_file().
Referenced by test_ho_elements().
|
static |
Definition at line 33 of file exodus_test.cpp.
Referenced by test_read_alternate_coord_format().
|
static |
Definition at line 32 of file exodus_test.cpp.
Referenced by load_file_one().
|
static |
Definition at line 31 of file exodus_test.cpp.
Referenced by test_ho_elements(), test_read_block_ids(), test_read_nodeset_ids(), test_read_side(), and test_read_sideset_ids().
|
static |
Definition at line 34 of file exodus_test.cpp.
Referenced by moab::WriteNCDF::initialize_exodus_file(), main(), test_write_polygons(), and moab::WriteNCDF::write_poly_faces().
|
static |
Definition at line 35 of file exodus_test.cpp.
Referenced by moab::WriteNCDF::initialize_exodus_file(), test_write_polyhedra(), and moab::WriteNCDF::write_elementblocks().
|
static |
Definition at line 36 of file exodus_test.cpp.
Referenced by test_read_polygons().
|
static |
Definition at line 37 of file exodus_test.cpp.
Referenced by test_read_polyhedra().