MOAB: Mesh Oriented datABase
(version 5.5.0)
|
#include "moab/ParallelComm.hpp"
#include "MBParallelConventions.h"
#include "MBTagConventions.hpp"
#include "moab/Core.hpp"
#include "moab/MeshTopoUtil.hpp"
#include "ReadParallel.hpp"
#include "moab/FileOptions.hpp"
#include "TestUtil.hpp"
#include <algorithm>
#include <vector>
#include <set>
#include <sstream>
Go to the source code of this file.
Macros | |
#define | MPI_COMM_WORLD 0 |
#define | P 4 |
#define | INDEXG(i, j, k) ( (k)*NIJK[1] * NIJK[0] + (j)*NIJK[0] + ( i ) ) |
#define | INDEXL(i, j, k) ( ( (k)-ijkmin[p][2] ) * nijk[p][1] * nijk[p][0] + ( (j)-ijkmin[p][1] ) * nijk[p][0] + ( (i)-ijkmin[p][0] ) ) |
Variables | |
int | rank = 0 |
#define INDEXG | ( | i, | |
j, | |||
k | |||
) | ( (k)*NIJK[1] * NIJK[0] + (j)*NIJK[0] + ( i ) ) |
#define INDEXL | ( | i, | |
j, | |||
k | |||
) | ( ( (k)-ijkmin[p][2] ) * nijk[p][1] * nijk[p][0] + ( (j)-ijkmin[p][1] ) * nijk[p][0] + ( (i)-ijkmin[p][0] ) ) |
#define MPI_COMM_WORLD 0 |
Definition at line 19 of file pcomm_unit.cpp.
#define P 4 |
void check_sizes | ( | Interface & | moab, |
int | num_vtx, | ||
int | num_edge, | ||
int | num_tri, | ||
int | num_quad, | ||
int | num_polygon, | ||
int | num_tet, | ||
int | num_pyr, | ||
int | num_wedge, | ||
int | num_knife, | ||
int | num_hex, | ||
int | num_polyhedron | ||
) |
Definition at line 140 of file pcomm_unit.cpp.
References CHECK_EQUAL, CHECK_ERR, ErrorCode, MBEDGE, MBHEX, MBKNIFE, MBPOLYGON, MBPOLYHEDRON, MBPRISM, MBPYRAMID, MBQUAD, MBTET, MBTRI, and MBVERTEX.
Referenced by test_pack_elements(), test_pack_higher_order(), and test_pack_poly().
ErrorCode create_patch | ( | Interface * | moab, |
Range & | verts, | ||
Range & | quads, | ||
unsigned int | n, | ||
double * | xyz, | ||
int * | gids | ||
) |
Definition at line 224 of file pcomm_unit.cpp.
References ErrorCode, moab::Range::insert(), MB_SUCCESS, and MBQUAD.
Referenced by create_shared_grid_2d().
ErrorCode create_shared_grid_2d | ( | ParallelComm ** | pc, |
Range * | verts, | ||
Range * | quads | ||
) |
Definition at line 258 of file pcomm_unit.cpp.
References CHECK_ERR, create_patch(), ErrorCode, and moab::ParallelComm::resolve_shared_ents().
Referenced by test_pack_shared_entities_2d().
ErrorCode create_shared_grid_3d | ( | ParallelComm ** | pc, |
Range * | verts, | ||
Range * | hexes | ||
) |
Definition at line 313 of file pcomm_unit.cpp.
References CHECK_ERR, moab::Interface::create_element(), moab::Interface::create_vertices(), ErrorCode, fname, moab::ParallelComm::get_moab(), moab::Interface::globalId_tag(), INDEXG, INDEXL, moab::Range::insert(), MB_SUCCESS, MBHEX, P, rank, moab::ParallelComm::resolve_shared_ents(), moab::Interface::tag_set_data(), and moab::Interface::write_file().
Referenced by test_pack_shared_entities_3d().
void create_simple_grid | ( | Interface & | moab, |
unsigned | x, | ||
unsigned | y, | ||
unsigned | z | ||
) |
Definition at line 196 of file pcomm_unit.cpp.
References CHECK_ERR, ErrorCode, and MBHEX.
Referenced by create_simple_grid(), test_filter_pstatus(), test_pack_bit_tag_data(), test_pack_set_contents(), test_pack_sets_simple(), test_pack_tag_data_default_value(), test_pack_tag_data_dense(), test_pack_tag_data_sparse(), test_pack_tag_handle_data(), and test_pack_variable_length_tag().
void create_simple_grid | ( | Interface & | moab, |
unsigned | xyz = 3 |
||
) |
Definition at line 192 of file pcomm_unit.cpp.
References create_simple_grid().
ErrorCode get_entities | ( | Interface * | mb, |
std::vector< EntityHandle > & | ent_verts, | ||
int | verts_per_entity, | ||
int | dim, | ||
Range & | ents | ||
) |
Definition at line 1575 of file pcomm_unit.cpp.
References CHECK_ERR, moab::Range::clear(), dim, ErrorCode, moab::Core::get_adjacencies(), mb, MB_SUCCESS, moab::Range::merge(), and moab::Range::size().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 59 of file pcomm_unit.cpp.
References MPI_COMM_WORLD, rank, RUN_TEST, test_filter_pstatus(), test_new_pcomm_instance(), test_pack_elements(), test_pack_higher_order(), test_pack_poly(), test_pack_set_contents(), test_pack_set_parent_child(), test_pack_sets_of_sets(), test_pack_sets_simple(), test_pack_shared_entities_2d(), test_pack_shared_entities_3d(), test_pack_tag_data_default_value(), test_pack_tag_data_dense(), test_pack_tag_data_sparse(), test_pack_tag_handle_data(), test_pack_variable_length_tag(), and test_pack_vertices().
void pack_unpack_noremoteh | ( | Core & | moab | ) |
Definition at line 133 of file pcomm_unit.cpp.
References pack_unpack_noremoteh().
Definition at line 93 of file pcomm_unit.cpp.
References moab::ParallelComm::Buffer::buff_ptr, CHECK_ERR, entities, ErrorCode, moab::ParallelComm::INITIAL_BUFF_SIZE, MBENTITYSET, MPI_COMM_WORLD, moab::ParallelComm::pack_buffer(), moab::ParallelComm::Buffer::reset_ptr(), moab::ParallelComm::Buffer::set_stored_size(), moab::subtract(), moab::Interface::UNION, and moab::ParallelComm::unpack_buffer().
Referenced by pack_unpack_noremoteh(), test_pack_bit_tag_data(), test_pack_elements(), test_pack_higher_order(), test_pack_poly(), test_pack_set_contents(), test_pack_set_parent_child(), test_pack_sets_of_sets(), test_pack_sets_simple(), test_pack_tag_data_default_value(), test_pack_tag_data_dense(), test_pack_tag_data_sparse(), test_pack_tag_handle_data(), test_pack_variable_length_tag(), and test_pack_vertices().
void test_filter_pstatus | ( | ) |
Test filter_pstatus function
Definition at line 1656 of file pcomm_unit.cpp.
References moab::Range::begin(), CHECK, CHECK_ERR, create_simple_grid(), ErrorCode, moab::ParallelComm::filter_pstatus(), moab::Core::get_entities_by_type(), moab::Range::insert(), mb, MBVERTEX, MPI_COMM_WORLD, PSTATUS_AND, PSTATUS_GHOST, PSTATUS_INTERFACE, PSTATUS_MULTISHARED, PSTATUS_NOT, PSTATUS_NOT_OWNED, PSTATUS_SHARED, moab::ParallelComm::pstatus_tag(), moab::Range::rbegin(), moab::ParallelComm::sharedp_tag(), moab::ParallelComm::sharedps_tag(), and moab::Range::size().
Referenced by main().
void test_new_pcomm_instance | ( | ) |
Test creating a new ParallelComm instance in addition to an existing one
Definition at line 1745 of file pcomm_unit.cpp.
References CHECK_ERR, ErrorCode, example, moab::Core::load_file(), mb, MPI_COMM_WORLD, and read_options.
Referenced by main().
void test_pack_bit_tag_data | ( | ) |
Test pack/unpack tag values
Definition at line 1312 of file pcomm_unit.cpp.
References moab::Range::begin(), CHECK, CHECK_EQUAL, CHECK_ERR, moab::Range::clear(), create_simple_grid(), moab::Range::empty(), moab::Range::end(), ErrorCode, moab::Core::get_coords(), moab::Core::get_entities_by_type(), mb, MB_TAG_BIT, MB_TAG_EXCL, MB_TYPE_BIT, MBVERTEX, pack_unpack_noremoteh(), 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(), moab::Core::tag_set_data(), and TagType.
void test_pack_elements | ( | ) |
Test pack/unpack of elements
Definition at line 450 of file pcomm_unit.cpp.
References moab::Range::back(), CHECK_EQUAL, CHECK_ERR, CHECK_REAL_EQUAL, check_sizes(), moab::Range::clear(), ErrorCode, moab::Range::front(), hex_corners, moab::Range::insert(), MBHEX, MBPRISM, MBPYRAMID, MBQUAD, MBTET, MBTRI, pack_unpack_noremoteh(), moab::Range::size(), and swap().
Referenced by main().
void test_pack_higher_order | ( | ) |
Test pack/unpack of higher-order elements
Definition at line 580 of file pcomm_unit.cpp.
References moab::Range::back(), CHECK_EQUAL, CHECK_ERR, CHECK_REAL_EQUAL, check_sizes(), moab::Range::clear(), ErrorCode, moab::Range::front(), moab::Range::insert(), MBTET, MBTRI, pack_unpack_noremoteh(), moab::Range::size(), and swap().
Referenced by main().
void test_pack_poly | ( | ) |
Test pack/unpack of polygons & polyhedra
Definition at line 671 of file pcomm_unit.cpp.
References moab::Range::begin(), CHECK, CHECK_EQUAL, CHECK_ERR, CHECK_REAL_EQUAL, check_sizes(), moab::Range::clear(), moab::Range::end(), ErrorCode, moab::Range::front(), moab::Range::insert(), MBPOLYGON, MBPOLYHEDRON, MBTRI, pack_unpack_noremoteh(), and moab::Range::size().
Referenced by main().
void test_pack_set_contents | ( | ) |
Test pack/unpack of entity sets including implicit packing of set contents
Definition at line 883 of file pcomm_unit.cpp.
References CHECK_EQUAL, CHECK_ERR, moab::Range::clear(), create_simple_grid(), moab::Range::empty(), entities, ErrorCode, MBENTITYSET, MBVERTEX, MESHSET_SET, pack_unpack_noremoteh(), and moab::Range::size().
Referenced by main().
void test_pack_set_parent_child | ( | ) |
Test pack/unpack of set parent/child relations
Definition at line 1008 of file pcomm_unit.cpp.
References moab::Range::begin(), CHECK, CHECK_EQUAL, CHECK_ERR, children, moab::Range::clear(), moab::Range::empty(), moab::Range::end(), ErrorCode, moab::Range::insert(), MB_SUCCESS, MBENTITYSET, MESHSET_SET, pack_unpack_noremoteh(), and moab::Range::size().
Referenced by main().
void test_pack_sets_of_sets | ( | ) |
Test pack/unpack of entity sets containing entity sets
Definition at line 929 of file pcomm_unit.cpp.
References moab::Range::back(), moab::Range::begin(), CHECK, CHECK_EQUAL, CHECK_ERR, moab::Range::clear(), moab::Range::empty(), moab::Range::end(), ErrorCode, moab::Range::front(), moab::Range::insert(), MBENTITYSET, MESHSET_SET, pack_unpack_noremoteh(), and moab::Range::size().
Referenced by main().
void test_pack_sets_simple | ( | ) |
Test pack/unpack of entity sets
Definition at line 759 of file pcomm_unit.cpp.
References moab::Range::begin(), CHECK_EQUAL, CHECK_ERR, moab::Range::clear(), create_simple_grid(), moab::Range::empty(), moab::Range::end(), entities, ErrorCode, moab::Range::front(), MBENTITYSET, MBHEX, MBVERTEX, moab::Range::merge(), MESHSET_SET, MESHSET_TRACK_OWNER, pack_unpack_noremoteh(), and moab::Range::size().
Referenced by main().
void test_pack_shared_entities_2d | ( | ) |
Test pack/unpack of shared entities in 2d
Definition at line 1595 of file pcomm_unit.cpp.
References CHECK_ERR, create_shared_grid_2d(), ErrorCode, moab::ParallelComm::exchange_ghost_cells(), MPI_COMM_WORLD, and moab::ParallelComm::set_rank().
Referenced by main().
void test_pack_shared_entities_3d | ( | ) |
Test pack/unpack of shared entities in 3d
Definition at line 1623 of file pcomm_unit.cpp.
References CHECK_ERR, create_shared_grid_3d(), ErrorCode, moab::ParallelComm::exchange_ghost_cells(), moab::ParallelComm::get_buffers(), MPI_COMM_WORLD, and moab::ParallelComm::set_rank().
Referenced by main().
void test_pack_tag_data_default_value | ( | ) |
Definition at line 1224 of file pcomm_unit.cpp.
References moab::Range::begin(), CHECK, CHECK_EQUAL, CHECK_ERR, moab::Range::clear(), moab::Core::create_meshset(), create_simple_grid(), moab::Range::empty(), moab::Range::end(), ErrorCode, moab::Range::front(), moab::Core::get_entities_by_type(), mb, MB_TAG_DENSE, MB_TAG_EXCL, MB_TYPE_OPAQUE, MBENTITYSET, MBHEX, MBVERTEX, MESHSET_SET, pack_unpack_noremoteh(), 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(), moab::Core::tag_set_data(), and TagType.
Referenced by main().
void test_pack_tag_data_dense | ( | ) |
Definition at line 1164 of file pcomm_unit.cpp.
References moab::Range::begin(), CHECK, CHECK_EQUAL, CHECK_ERR, CHECK_REAL_EQUAL, moab::Range::clear(), create_simple_grid(), moab::Range::empty(), moab::Range::end(), ErrorCode, moab::Core::get_coords(), moab::Core::get_entities_by_type(), mb, MB_ENTITY_NOT_FOUND, MB_TAG_DENSE, MB_TAG_EXCL, MB_TYPE_DOUBLE, MBVERTEX, pack_unpack_noremoteh(), 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(), moab::Core::tag_set_data(), and TagType.
Referenced by main().
void test_pack_tag_data_sparse | ( | ) |
Test pack/unpack tag values
Definition at line 1091 of file pcomm_unit.cpp.
References moab::Range::begin(), CHECK, CHECK_EQUAL, CHECK_ERR, moab::Range::clear(), create_simple_grid(), moab::Range::empty(), moab::Range::end(), ErrorCode, moab::Core::get_connectivity(), moab::Core::get_coords(), moab::Core::get_entities_by_type(), moab::Core::get_entities_by_type_and_tag(), mb, MB_ENTITY_NOT_FOUND, MB_TAG_CREAT, MB_TAG_SPARSE, MB_TYPE_INTEGER, MBHEX, pack_unpack_noremoteh(), size, moab::Range::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(), moab::Core::tag_set_data(), and TagType.
Referenced by main().
void test_pack_tag_handle_data | ( | ) |
Test pack/unpack tag values
Definition at line 1466 of file pcomm_unit.cpp.
References moab::Range::begin(), CHECK, CHECK_EQUAL, CHECK_ERR, moab::Range::clear(), create_simple_grid(), moab::Range::empty(), moab::Range::end(), ErrorCode, moab::Core::get_connectivity(), moab::Core::get_entities_by_type(), mb, MB_TAG_EXCL, MB_TAG_SPARSE, MB_TYPE_HANDLE, MBHEX, MBVERTEX, pack_unpack_noremoteh(), 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(), moab::Core::tag_set_data(), and TagType.
Referenced by main().
void test_pack_variable_length_tag | ( | ) |
Test pack/unpack of variable length tag values
Definition at line 1381 of file pcomm_unit.cpp.
References moab::Range::begin(), CHECK, CHECK_EQUAL, CHECK_ERR, moab::Range::clear(), create_simple_grid(), moab::Range::empty(), moab::Range::end(), ErrorCode, moab::Core::get_coords(), moab::Core::get_entities_by_type(), mb, MB_TAG_DENSE, MB_TAG_EXCL, MB_TAG_VARLEN, MB_TYPE_INTEGER, MB_VARIABLE_DATA_LENGTH, MBVERTEX, pack_unpack_noremoteh(), size, moab::Core::tag_get_by_ptr(), 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(), moab::Core::tag_set_by_ptr(), and TagType.
Referenced by main().
void test_pack_vertices | ( | ) |
Test pack/unpack of vertices
Definition at line 418 of file pcomm_unit.cpp.
References CHECK, CHECK_EQUAL, CHECK_ERR, ErrorCode, pack_unpack_noremoteh(), and moab::Range::size().
Referenced by main().
int rank = 0 |
Definition at line 57 of file pcomm_unit.cpp.
Referenced by create_shared_grid_3d(), and main().