MOAB: Mesh Oriented datABase
(version 5.5.0)
|
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include "iMesh.h"
#include "iMesh_extensions.h"
#include "moab/Types.hpp"
#include "TestUtil.hpp"
Go to the source code of this file.
Classes | |
struct | TagStruct |
Macros | |
#define | FALSE 0 |
#define | TRUE 1 |
#define | DEFAULT_TEST_FILE brick.vtk |
#define | DEFAULT_INPUT_FILE STRINGIFY( DEFAULT_TEST_FILE ) |
#define | ASSERT(COND) |
#define | CHK(err) |
#define | TEST_ERROR_CODE(A, B) |
Variables | |
enum iBase_ErrorType | iBase_ERROR_MAP [MB_FAILURE+1] |
static bool | assert_pass |
static iBase_EntitySetHandle | root_set |
#define ASSERT | ( | COND | ) |
Definition at line 82 of file testc_cbind.cpp.
#define CHK | ( | err | ) |
Definition at line 96 of file testc_cbind.cpp.
#define DEFAULT_INPUT_FILE STRINGIFY( DEFAULT_TEST_FILE ) |
Definition at line 78 of file testc_cbind.cpp.
#define DEFAULT_TEST_FILE brick.vtk |
Definition at line 71 of file testc_cbind.cpp.
#define FALSE 0 |
Definition at line 68 of file testc_cbind.cpp.
#define TEST_ERROR_CODE | ( | A, | |
B | |||
) |
Definition at line 143 of file testc_cbind.cpp.
#define TRUE 1 |
Definition at line 69 of file testc_cbind.cpp.
int all_adjacency_regression | ( | iMesh_Instance | mesh | ) |
Definition at line 2659 of file testc_cbind.cpp.
References iBase_ALL_TYPES, iBase_INTERLEAVED, iBase_NEW, iBase_SUCCESS, iMesh_createEnt, iMesh_createVtxArr, iMesh_dtor, iMesh_getEntAdj, iMesh_LINE_SEGMENT, iMesh_newMesh, and mesh.
Referenced by main().
int array_allocation | ( | iMesh_Instance | mesh | ) |
Definition at line 2749 of file testc_cbind.cpp.
References CHK, iBase_ALL_TYPES, iBase_BAD_ARRAY_DIMENSION, iBase_BAD_ARRAY_SIZE, iBase_FAILURE, iBase_INTERLEAVED, iBase_SUCCESS, iMesh_ALL_TOPOLOGIES, iMesh_createVtxArr, iMesh_dtor, iMesh_getEntities, iMesh_getRootSet, iMesh_newMesh, mesh, and root_set.
Referenced by main().
int check_esets | ( | iMesh_Instance | mesh, |
const int | num_sets | ||
) |
Definition at line 1623 of file testc_cbind.cpp.
References FALSE, iBase_SUCCESS, iMesh_getNumEntSets, mesh, root_set, and TRUE.
Referenced by entity_sets_subtest().
int compare_array_iter | ( | const char * | info, |
iMesh_Instance | mesh, | ||
iBase_EntitySetHandle | set, | ||
iBase_EntityHandle * | contents, | ||
int | contents_size, | ||
int | array_size, | ||
enum iBase_EntityType | type, | ||
enum iMesh_EntityTopology | topo | ||
) |
Definition at line 2893 of file testc_cbind.cpp.
References iBase_FAILURE, iBase_SUCCESS, iMesh_endEntArrIter, iMesh_getNextEntArrIter, iMesh_initEntArrIter, iMesh_resetEntArrIter, and mesh.
Referenced by test_iterator_common().
int compare_single_iter | ( | const char * | info, |
iMesh_Instance | mesh, | ||
iBase_EntitySetHandle | set, | ||
iBase_EntityHandle * | contents, | ||
int | contents_size, | ||
enum iBase_EntityType | type, | ||
enum iMesh_EntityTopology | topo | ||
) |
Definition at line 2806 of file testc_cbind.cpp.
References iBase_FAILURE, iBase_SUCCESS, iMesh_endEntIter, iMesh_getNextEntIter, iMesh_initEntIter, iMesh_resetEntIter, and mesh.
Referenced by test_iterator_common().
int entity_connectivity_test | ( | iMesh_Instance | mesh | ) |
Definition at line 514 of file testc_cbind.cpp.
References ASSERT, assert_pass, entities, FALSE, iBase_ALL_TYPES, iBase_EDGE, iBase_SUCCESS, iBase_VERTEX, iMesh_ALL_TOPOLOGIES, iMesh_getAdjEntIndices, iMesh_getEntAdj, iMesh_getEntities, mesh, qsort_comp_handles(), root_set, size, and TRUE.
Referenced by main().
int entity_sets_subtest | ( | iMesh_Instance | mesh, |
int | is_list, | ||
int | |||
) |
Definition at line 754 of file testc_cbind.cpp.
References check_esets(), entities, FALSE, iBase_ALL_TYPES, iBase_EDGE, iBase_FACE, iBase_REGION, iBase_SUCCESS, iBase_VERTEX, iMesh_addEntArrToSet, iMesh_addEntSet, iMesh_addPrntChld, iMesh_ALL_TOPOLOGIES, iMesh_createEntSet, iMesh_destroyEntSet, iMesh_getEntArrAdj, iMesh_getEntArrType, iMesh_getEntities, iMesh_getEntSets, iMesh_getNumChld, iMesh_getNumEntSets, iMesh_getNumOfType, iMesh_getPrnts, iMesh_HEXAHEDRON, iMesh_intersect, iMesh_isChildOf, iMesh_rmvEntArrFromSet, iMesh_subtract, iMesh_unite, mesh, root_set, and TRUE.
Referenced by entity_sets_test().
int entity_sets_test | ( | iMesh_Instance | mesh | ) |
Definition at line 1650 of file testc_cbind.cpp.
References entity_sets_subtest(), mesh, and TRUE.
Referenced by main().
int entityset_double_tag_test | ( | iMesh_Instance | mesh, |
iBase_EntitySetHandle * | sets, | ||
int | sets_size, | ||
iBase_TagHandle * | double_tag | ||
) |
Definition at line 2156 of file testc_cbind.cpp.
References FALSE, iBase_DOUBLE, iBase_SUCCESS, iMesh_createTag, iMesh_getEntSetData, iMesh_setEntSetData, mesh, and TRUE.
Referenced by entityset_tag_test().
int entityset_int_tag_test | ( | iMesh_Instance | mesh, |
iBase_EntitySetHandle * | sets, | ||
int | sets_size, | ||
iBase_TagHandle * | int_tag | ||
) |
Definition at line 2091 of file testc_cbind.cpp.
References FALSE, iBase_INTEGER, iBase_SUCCESS, iMesh_createTag, iMesh_getEntSetData, iMesh_setEntSetData, mesh, and TRUE.
Referenced by entityset_tag_test().
int entityset_struct_tag_test | ( | iMesh_Instance | mesh, |
iBase_EntitySetHandle * | , | ||
int | , | ||
iBase_TagHandle * | struct_tag | ||
) |
Definition at line 2225 of file testc_cbind.cpp.
References FALSE, iBase_BYTES, iBase_SUCCESS, iMesh_createTag, iMesh_getEntSetData, iMesh_setEntSetData, mesh, root_set, TagStruct::test_double, TagStruct::test_int1, TagStruct::test_int2, and TRUE.
Referenced by entityset_tag_test().
int entityset_tag_delete_test | ( | iMesh_Instance | mesh, |
iBase_EntitySetHandle * | sets, | ||
int | sets_size | ||
) |
Definition at line 2277 of file testc_cbind.cpp.
References FALSE, iBase_SUCCESS, iMesh_destroyTag, iMesh_getAllEntSetTags, iMesh_rmvEntSetTag, mesh, and TRUE.
Referenced by entityset_tag_test().
int entityset_tag_test | ( | iMesh_Instance | mesh | ) |
Definition at line 2339 of file testc_cbind.cpp.
References entityset_double_tag_test(), entityset_int_tag_test(), entityset_struct_tag_test(), entityset_tag_delete_test(), FALSE, iBase_SUCCESS, iMesh_getEntSets, mesh, and root_set.
Referenced by main().
int error_code_test | ( | iMesh_Instance | ) |
Definition at line 151 of file testc_cbind.cpp.
References iBase_FAILURE, iBase_FILE_NOT_FOUND, iBase_INVALID_ARGUMENT, iBase_INVALID_ENTITY_HANDLE, iBase_INVALID_ENTITY_TYPE, iBase_MEMORY_ALLOCATION_FAILED, iBase_NOT_SUPPORTED, iBase_SUCCESS, iBase_TAG_NOT_FOUND, MB_ENTITY_NOT_FOUND, MB_FILE_DOES_NOT_EXIST, MB_MEMORY_ALLOCATION_FAILED, MB_SUCCESS, MB_TAG_NOT_FOUND, MB_TYPE_OUT_OF_RANGE, MB_UNHANDLED_OPTION, MB_UNSUPPORTED_OPERATION, TEST_ERROR_CODE, and TRUE.
Referenced by main().
void handle_error_code | ( | const int | result, |
int * | number_failed, | ||
int * | , | ||
int * | number_successful | ||
) |
prints out a result string based on the value of error_code
Definition at line 110 of file testc_cbind.cpp.
Referenced by main().
int load_mesh_test | ( | const char * | filename, |
iMesh_Instance | mesh | ||
) |
Definition at line 129 of file testc_cbind.cpp.
References FALSE, filename, iBase_SUCCESS, iMesh_load, mesh, root_set, and TRUE.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 3093 of file testc_cbind.cpp.
References all_adjacency_regression(), array_allocation(), DEFAULT_INPUT_FILE, entity_connectivity_test(), entity_sets_test(), entityset_tag_test(), error_code_test(), filename, handle_error_code(), iBase_SUCCESS, iMesh_dtor, iMesh_getRootSet, iMesh_newMesh, load_mesh_test(), mesh, mesh_tag_test(), number_tests, number_tests_failed, number_tests_successful, ordered_set_regression(), root_set, set_remove_contained_regression(), test_iterator(), topology_adjacency_test(), topology_dimension_test(), vertex_coordinates_test(), and vertex_tag_test().
int mesh_double_tag_test | ( | iMesh_Instance | mesh, |
iBase_TagHandle * | double_tag | ||
) |
Definition at line 2437 of file testc_cbind.cpp.
References FALSE, iBase_DOUBLE, iBase_SUCCESS, iMesh_createTag, iMesh_getEntSetData, iMesh_setEntSetData, mesh, root_set, and TRUE.
Referenced by mesh_tag_test().
int mesh_int_tag_test | ( | iMesh_Instance | mesh, |
iBase_TagHandle * | int_tag | ||
) |
Definition at line 2372 of file testc_cbind.cpp.
References FALSE, iBase_INTEGER, iBase_SUCCESS, iMesh_createTag, iMesh_getEntSetData, iMesh_setEntSetData, mesh, root_set, and TRUE.
Referenced by mesh_tag_test().
int mesh_struct_tag_test | ( | iMesh_Instance | mesh, |
iBase_TagHandle * | struct_tag | ||
) |
Definition at line 2502 of file testc_cbind.cpp.
References FALSE, iBase_BYTES, iBase_SUCCESS, iMesh_createTag, iMesh_getEntSetData, iMesh_setEntSetData, mesh, root_set, TagStruct::test_double, TagStruct::test_int1, TagStruct::test_int2, and TRUE.
Referenced by mesh_tag_test().
int mesh_tag_delete_test | ( | iMesh_Instance | mesh | ) |
Definition at line 2551 of file testc_cbind.cpp.
References FALSE, iBase_SUCCESS, iMesh_destroyTag, iMesh_getAllEntSetTags, iMesh_rmvEntSetTag, mesh, root_set, and TRUE.
Referenced by mesh_tag_test().
int mesh_tag_test | ( | iMesh_Instance | mesh | ) |
Definition at line 2606 of file testc_cbind.cpp.
References mesh, mesh_double_tag_test(), mesh_int_tag_test(), mesh_struct_tag_test(), and mesh_tag_delete_test().
Referenced by main().
|
static |
Definition at line 2711 of file testc_cbind.cpp.
References CHK, iBase_ALL_TYPES, iBase_INTERLEAVED, iBase_NEW, iMesh_addEntArrToSet, iMesh_ALL_TOPOLOGIES, iMesh_createEnt, iMesh_createEntSet, iMesh_createVtxArr, iMesh_dtor, iMesh_getEntities, iMesh_LINE_SEGMENT, iMesh_newMesh, and mesh.
Referenced by main().
void PRINT_ASSERT_FAILURE | ( | const char * | cond, |
const char * | file, | ||
int | line | ||
) |
Definition at line 90 of file testc_cbind.cpp.
int qsort_comp_handles | ( | const void * | h1, |
const void * | h2 | ||
) |
Definition at line 503 of file testc_cbind.cpp.
References h1.
Referenced by entity_connectivity_test().
int set_remove_contained_regression | ( | iMesh_Instance | mesh | ) |
Definition at line 2624 of file testc_cbind.cpp.
References contained(), iBase_SUCCESS, iMesh_addEntSet, iMesh_createEntSet, iMesh_isEntSetContained, iMesh_rmvEntSet, and mesh.
Referenced by main().
int tag_info_test | ( | iMesh_Instance | mesh | ) |
Definition at line 1724 of file testc_cbind.cpp.
References moab::error(), FALSE, iBase_INTEGER, iBase_SUCCESS, iMesh_createTag, iMesh_destroyTag, iMesh_getTagHandle, iMesh_getTagName, iMesh_getTagSizeBytes, mesh, and TRUE.
Referenced by vertex_tag_test().
int test_iterator | ( | iMesh_Instance | mesh | ) |
Definition at line 3027 of file testc_cbind.cpp.
References CHK, iBase_ALL_TYPES, iBase_SUCCESS, iMesh_addEntArrToSet, iMesh_ALL_TOPOLOGIES, iMesh_createEntSet, iMesh_getEntities, iMesh_getRootSet, mesh, and test_iterator_common().
Referenced by main().
int test_iterator_common | ( | const char * | info, |
iMesh_Instance | mesh, | ||
iBase_EntitySetHandle | set, | ||
int | array_size, | ||
enum iBase_EntityType | type, | ||
enum iMesh_EntityTopology | topo | ||
) |
Definition at line 3006 of file testc_cbind.cpp.
References CHK, compare_array_iter(), compare_single_iter(), iMesh_getEntities, and mesh.
Referenced by test_iterator().
int topology_adjacency_test | ( | iMesh_Instance | mesh | ) |
Definition at line 229 of file testc_cbind.cpp.
References entities, FALSE, iBase_ALL_TYPES, iBase_FACE, iBase_REGION, iBase_SUCCESS, iMesh_ALL_TOPOLOGIES, iMesh_getEntArrAdj, iMesh_getEntArrTopo, iMesh_getEntities, iMesh_getNumOfTopo, iMesh_HEXAHEDRON, iMesh_POINT, iMesh_PRISM, iMesh_PYRAMID, iMesh_SEPTAHEDRON, iMesh_TETRAHEDRON, mesh, root_set, and TRUE.
Referenced by main().
int topology_dimension_test | ( | iMesh_Instance | mesh | ) |
Definition at line 170 of file testc_cbind.cpp.
References FALSE, iBase_FACE, iBase_SUCCESS, iMesh_ALL_TOPOLOGIES, iMesh_getEntArrType, iMesh_getEntities, mesh, root_set, and TRUE.
Referenced by main().
int vertex_coordinates_test | ( | iMesh_Instance | mesh | ) |
Definition at line 1671 of file testc_cbind.cpp.
References FALSE, iBase_INTERLEAVED, iBase_SUCCESS, iBase_VERTEX, iMesh_getDfltStorage, iMesh_getEntities, iMesh_getVtxArrCoords, iMesh_POINT, mesh, root_set, and TRUE.
Referenced by main().
int vertex_double_tag_test | ( | iMesh_Instance | mesh, |
iBase_EntityHandle * | verts, | ||
int | , | ||
iBase_TagHandle * | double_tag | ||
) |
Definition at line 1873 of file testc_cbind.cpp.
References FALSE, iBase_DOUBLE, iBase_SUCCESS, iMesh_createTag, iMesh_getArrData, iMesh_setArrData, mesh, and TRUE.
Referenced by vertex_tag_test().
int vertex_int_tag_test | ( | iMesh_Instance | mesh, |
iBase_EntityHandle * | verts, | ||
int | , | ||
iBase_TagHandle * | int_tag | ||
) |
Definition at line 1804 of file testc_cbind.cpp.
References FALSE, iBase_INTEGER, iBase_SUCCESS, iMesh_createTag, iMesh_getArrData, iMesh_setArrData, mesh, and TRUE.
Referenced by vertex_tag_test().
int vertex_struct_tag_test | ( | iMesh_Instance | mesh, |
iBase_EntityHandle * | verts, | ||
int | , | ||
iBase_TagHandle * | struct_tag | ||
) |
Definition at line 1950 of file testc_cbind.cpp.
References FALSE, iBase_BYTES, iBase_SUCCESS, iMesh_createTag, iMesh_getArrData, iMesh_setArrData, mesh, TagStruct::test_double, TagStruct::test_int1, TagStruct::test_int2, and TRUE.
Referenced by vertex_tag_test().
int vertex_tag_delete_test | ( | iMesh_Instance | mesh, |
iBase_EntityHandle * | verts, | ||
int | |||
) |
Definition at line 2004 of file testc_cbind.cpp.
References FALSE, iBase_SUCCESS, iMesh_destroyTag, iMesh_getAllTags, iMesh_rmvArrTag, mesh, and TRUE.
Referenced by vertex_tag_test().
int vertex_tag_test | ( | iMesh_Instance | mesh | ) |
Definition at line 2056 of file testc_cbind.cpp.
References FALSE, iBase_ALL_TYPES, iBase_SUCCESS, iMesh_getEntities, iMesh_POINT, mesh, root_set, tag_info_test(), vertex_double_tag_test(), vertex_int_tag_test(), vertex_struct_tag_test(), and vertex_tag_delete_test().
Referenced by main().
|
static |
Definition at line 81 of file testc_cbind.cpp.
Referenced by entity_connectivity_test().
|
extern |
Definition at line 12 of file FBiGeom_MOAB.hpp.
Referenced by iMesh_destroyTag(), iMesh_rmvArrTag(), iMesh_rmvEntSetTag(), iMeshP_getPartsArrOnRank(), iMeshP_getPartsOnRank(), and MBiMesh::set_last_error().
|
static |
Definition at line 105 of file testc_cbind.cpp.
Referenced by array_allocation(), check_esets(), check_ray_intersect_sets(), check_ray_intersect_tris(), create_mesh(), do_closest_point_test(), do_ray_fire_test(), entity_connectivity_test(), entity_sets_subtest(), entityset_struct_tag_test(), entityset_tag_test(), FBiGeom_getRootSet(), gentityset_test(), geometry_evaluation_test(), get_imesh_mesh(), get_itaps_domain(), moab::Coupler::get_matching_entities(), moab::FBEngine::getRootSet(), gLoad_test(), iMesh_getRootSet(), load_mesh_test(), main(), mesh_double_tag_test(), mesh_int_tag_test(), mesh_struct_tag_test(), mesh_tag_delete_test(), moab::Coupler::normalize_mesh(), moab::Coupler::normalize_subset(), normals_test(), query_elem_to_vert(), query_vert_to_elem(), moab::OrientedBoxTreeTool::ray_intersect_boxes(), moab::OrientedBoxTreeTool::ray_intersect_sets(), moab::OrientedBoxTreeTool::ray_intersect_triangles(), ray_test(), root_set_test(), smooth_test(), split_quads_test(), split_test(), split_test_across(), tag_get_set_test(), tag_info_test(), test_load(), test_step_iter(), test_tag_iterate(), test_tags_retrieval(), topology_adjacencies_test(), topology_adjacency_test(), topology_dimension_test(), vertex_coordinates_test(), vertex_tag_test(), volume_test(), and moab::TempestOnlineMap::WriteHDF5MapFile().