[MOAB-dev] r4018 - MOAB/trunk/src/io

Rajeev Jain jain at mcs.anl.gov
Fri Jun 25 14:41:18 CDT 2010


Compress usually isn't a problem, but I thought it would be better to be 
safe and have it works always; at some cost.
You are right, there are no errors, but the o/p is not right. Some hexes 
have become polyhedra's, as you pointed out that we have cell bounded by 
the wrong # of faces.
May be we need another function for writing neusets with internal faces?

Rajeev
On 06/25/2010 02:26 PM, Tim Tautges wrote:
>
>
> On 06/25/2010 02:22 PM, jain at mcs.anl.gov wrote:
>> Author: jain
>> Date: 2010-06-25 14:22:48 -0500 (Fri, 25 Jun 2010)
>> New Revision: 4018
>>
>> Modified:
>>     MOAB/trunk/src/io/WriteCCMIO.cpp
>> Log:
>> o Commented CCMIOCompress
>
> You shouldn't do this, the compress usually isn't the problem.
>
>> o Skipping empty neumann sets when writing external faces
>> o Commented the check for internal faces in write_external_faces 
>> function, since neumann sets can have internal faces
>
> You should also not do this; just because the check isn't done doesn't 
> mean the write will be correct (in this case, you'll have a cell 
> bounded by the wrong # of faces).
>
> - tim
>
>>
>>
>> Modified: MOAB/trunk/src/io/WriteCCMIO.cpp
>> ===================================================================
>> --- MOAB/trunk/src/io/WriteCCMIO.cpp    2010-06-24 11:31:05 UTC (rev 
>> 4017)
>> +++ MOAB/trunk/src/io/WriteCCMIO.cpp    2010-06-25 19:22:48 UTC (rev 
>> 4018)
>> @@ -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;
>>   }
>> @@ -1203,6 +1203,10 @@
>>     CCMIONewEntity(&error, rootID, kCCMIOMap, NULL,&mapID);
>>     CHKCCMERR(error, "Problem creating face id map.");
>>
>> +  // ignoring an empty neuset, just return
>> +  if(facets.size()==0)
>> +    return MB_SUCCESS;
>> +
>>     CCMIOWriteMap(&error, mapID, CCMIOSIZEC(facets.size()),
>>                   CCMIOSIZEC(maxid), gids,
>>                   CCMIOINDEXC(kCCMIOStart), CCMIOINDEXC(kCCMIOEnd));
>> @@ -1254,8 +1258,9 @@
>>       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]))) {
>> -      result = MB_FILE_WRITE_ERROR;
>> -      CHKERR(result, "External facet with two output bounding cells.");
>> +      // commenting since neuset_data can have internal faces
>> +      // result = MB_FILE_WRITE_ERROR;
>> +      // CHKERR(result, "External facet with two output bounding 
>> cells.");
>>       }
>>       else if (1 == cells.size()&&  !mWholeMesh&&  !cmarks[0]) {
>>         result = MB_FILE_WRITE_ERROR;
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>


-- 
Rajeev



More information about the moab-dev mailing list