[MOAB-dev] commit/MOAB: iulian07: cubit 14 test for global id
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Fri Feb 21 17:10:42 CST 2014
1 new commit in MOAB:
https://bitbucket.org/fathomteam/moab/commits/33e1fa8c6482/
Changeset: 33e1fa8c6482
Branch: master
User: iulian07
Date: 2014-02-22 00:09:22
Summary: cubit 14 test for global id
also, correct the path for tqdcfr test; maybe it should be moved to
proper test folder.
Affected #: 3 files
diff --git a/MeshFiles/unittest/io/cubtest14.cub b/MeshFiles/unittest/io/cubtest14.cub
new file mode 100644
index 0000000..ae88269
Binary files /dev/null and b/MeshFiles/unittest/io/cubtest14.cub differ
diff --git a/src/io/Tqdcfr.cpp b/src/io/Tqdcfr.cpp
index 76767ea..afc0493 100644
--- a/src/io/Tqdcfr.cpp
+++ b/src/io/Tqdcfr.cpp
@@ -2920,7 +2920,7 @@ int main(int argc, char* argv[])
MPI_Init(&argc, &argv);
#endif
// Check command line arg
- const char* file = STRINGIFY(SRCDIR) "/brick_cubit10.2.cub";
+ const char* file = STRINGIFY(MESHDIR) "/io/brick_cubit10.2.cub";
if (argc < 2)
{
std::cout << "Usage: tqdcfr <cub_file_name>" << std::endl;
diff --git a/test/io/cub_file_test.cc b/test/io/cub_file_test.cc
index 691fea3..f9a65bf 100644
--- a/test/io/cub_file_test.cc
+++ b/test/io/cub_file_test.cc
@@ -3,6 +3,7 @@
#include "MBTagConventions.hpp"
#include "moab/CN.hpp"
#include "moab/Range.hpp"
+#include "moab/GeomTopoTool.hpp"
#include <math.h>
#include <algorithm>
@@ -80,10 +81,12 @@ using namespace moab;
static const char input_file_1[] = STRINGIFY(MESHDIR) "/io/test.cub";
static const char ho_file[] = STRINGIFY(MESHDIR) "/io/ho_test.cub";
static const char cubit12_file[] = STRINGIFY(MESHDIR) "/io/cubtest12.cub";
+static const char cubit14_file[] = STRINGIFY(MESHDIR) "/io/cubtest14.cub";
#else
static const char input_file_1[] = "test.cub";
static const char ho_file[] = "ho_test.cub";
static const char cubit12_file[] = "cubtest12.cub";
+static const char cubit12_file[] = "cubtest14.cub";
#endif
void read_file( Interface& moab, const char* input_file );
@@ -143,6 +146,7 @@ void test_hex27() { test_ho_elements(MBHEX, 27); }
void test_multiple_files();
void test_cubit12();
+void test_cubit14();
int main()
{
@@ -170,6 +174,7 @@ int main()
result += RUN_TEST(test_hex27);
result += RUN_TEST(test_multiple_files);
result += RUN_TEST(test_cubit12);
+ result += RUN_TEST(test_cubit14);
return result;
}
@@ -1075,3 +1080,22 @@ void test_cubit12()
Interface& mb = mb_impl;
read_file( mb, cubit12_file);
}
+
+void test_cubit14()
+{
+ Core mb_impl;
+ Interface& mb = mb_impl;
+ read_file( mb, cubit14_file);
+ // check the global id for some geometry sets
+ GeomTopoTool gtt(&mb_impl);
+ Range ranges[5];
+ ErrorCode rval = gtt.find_geomsets(ranges);
+ CHECK_ERR(rval);
+ EntityHandle set0=ranges[0][0]; // does it have a global id > 0?
+ Tag gid_tag;
+ rval = mb.tag_get_handle( "GLOBAL_ID", 1, MB_TYPE_INTEGER, gid_tag ); CHECK_ERR(rval);
+
+ int val;
+ rval = mb.tag_get_data(gid_tag, &set0, 1, &val );
+ CHECK ( val!=0 );
+}
Repository URL: https://bitbucket.org/fathomteam/moab/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the moab-dev
mailing list