[MOAB-dev] r4019 - MOAB/trunk/src/io
jain at mcs.anl.gov
jain at mcs.anl.gov
Fri Jun 25 17:41:23 CDT 2010
Author: jain
Date: 2010-06-25 17:41:23 -0500 (Fri, 25 Jun 2010)
New Revision: 4019
Modified:
MOAB/trunk/src/io/WriteCCMIO.cpp
Log:
o Opening compress again..
o Filtering out the faces with 2 adjacent elements before calling write_external_faces
Modified: MOAB/trunk/src/io/WriteCCMIO.cpp
===================================================================
--- MOAB/trunk/src/io/WriteCCMIO.cpp 2010-06-25 19:22:48 UTC (rev 4018)
+++ MOAB/trunk/src/io/WriteCCMIO.cpp 2010-06-25 22:41:23 UTC (rev 4019)
@@ -330,8 +330,8 @@
// to call CCMIOCompress() here to ensure that the file is as small as
// possible. Please see the Core API documentation for caveats on its
// usage.
- // CCMIOCompress(&error, const_cast<char*>(filename));
- // CHKCCMERR(error, "Error compressing file.");
+ CCMIOCompress(&error, const_cast<char*>(filename));
+ CHKCCMERR(error, "Error compressing file.");
return MB_SUCCESS;
}
@@ -968,9 +968,31 @@
// write external faces
//================================================
for (unsigned int i = 0; i < neuset_data.size(); i++) {
- result = write_external_faces(rootID, topologyID, neuset_data[i].neusetId,
- neuset_data[i].elems);
+ Range::reverse_iterator rit;
+ unsigned char cmarks[2];
+ Range ext_faces;
+ std::vector<EntityHandle> cells;
+ // removing the faces connected to two regions
+ for (rit = neuset_data[i].elems.rbegin(); rit != neuset_data[i].elems.rend(); ++rit) {
+ cells.clear();
+ result = mbImpl->get_adjacencies(&(*rit), 1, mDimension, false, cells);
+ CHKERR(result, "Trouble getting bounding cells.");
+
+ result = mbImpl->tag_get_data(mEntityMark, &cells[0], cells.size(), cmarks);
+ CHKERR(result, "Trouble getting mark tags on cells bounding facets.");
+
+ if( cells.size() == 2 && (mWholeMesh || (cmarks[0] && cmarks[1]))) {
+ }
+ else{
+ // external face
+ ext_faces.insert(*rit);
+ }
+ }
+ if (ext_faces.size() != 0)
+ result = write_external_faces(rootID, topologyID, neuset_data[i].neusetId,
+ ext_faces);
CHKERR(result, "Trouble writing Neumann set facets.");
+ ext_faces.clear ();
}
if (!skin_facets.empty()) {
@@ -1203,10 +1225,6 @@
CCMIONewEntity(&error, rootID, kCCMIOMap, NULL, &mapID);
More information about the moab-dev
mailing list