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

Tim Tautges tautges at mcs.anl.gov
Fri Jun 25 14:26:49 CDT 2010



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;
>
>
>
>
>
>
>
>
>
>
>
>
>
>

-- 
================================================================
"You will keep in perfect peace him whose mind is
   steadfast, because he trusts in you."               Isaiah 26:3

              Tim Tautges            Argonne National Laboratory
          (tautges at mcs.anl.gov)      (telecommuting from UW-Madison)
          phone: (608) 263-8485      1500 Engineering Dr.
            fax: (608) 263-4499      Madison, WI 53706



More information about the moab-dev mailing list