[MOAB-dev] r4711 - MOAB/trunk/src

Tim Tautges tautges at mcs.anl.gov
Mon Apr 4 10:06:42 CDT 2011


Are you certain it's the case that the face uses the edge twice, or is the code just adding one sense one time and 
another another time, and they happen to be different?  I want to make sure it's actually a both-type sense, rather than 
the same edge-face inclusion being entered twice.

- tim

On 04/02/2011 03:22 PM, iulian at mcs.anl.gov wrote:
> Author: iulian
> Date: 2011-04-02 15:22:34 -0500 (Sat, 02 Apr 2011)
> New Revision: 4711
>
> Modified:
>     MOAB/trunk/src/GeomTopoTool.cpp
> Log:
> if an edge is reset with 2 senses in the same face, forward and reverse,
> change the sense to SENSE_BOTH
> with this change, dagmc_preproc iter_vol.sat seems to finish; Steve, please
> check if this is fine.
>
>
> Modified: MOAB/trunk/src/GeomTopoTool.cpp
> ===================================================================
> --- MOAB/trunk/src/GeomTopoTool.cpp	2011-04-01 17:07:01 UTC (rev 4710)
> +++ MOAB/trunk/src/GeomTopoTool.cpp	2011-04-02 20:22:34 UTC (rev 4711)
> @@ -608,14 +608,25 @@
>         std::vector<EntityHandle>::iterator it = std::find(higher_ents.begin(),
>             higher_ents.end(), wrt_entity);
>         if (it != higher_ents.end()) {
> -        // we should not reset the sense
> -        return MB_MULTIPLE_ENTITIES_FOUND;
> +        // we should not reset the sense, if the sense is the same
> +        // if the sense is different, put BOTH
> +        unsigned int idx = it - higher_ents.begin();
> +        int oldSense = senses[idx];
> +        if (oldSense == sense)
> +          return MB_SUCCESS; // sense already set fine
> +        if (0!=oldSense&&  oldSense+sense !=0)
> +          return MB_MULTIPLE_ENTITIES_FOUND;
> +        senses[idx]=SENSE_BOTH; // allow double senses
> +
>         }
>       }
> -    // what happens if a var tag data was already set before, and now it is
> -    // reset with a different size??
> -    higher_ents.push_back(wrt_entity);
> -    senses.push_back(sense);
> +    else
> +    {
> +      // what happens if a var tag data was already set before, and now it is
> +      // reset with a different size??
> +      higher_ents.push_back(wrt_entity);
> +      senses.push_back(sense);
> +    }
>       // finally, set the senses :
>       int dum_size = higher_ents.size() * sizeof(EntityHandle);
>       void *dum_ptr =&higher_ents[0];
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

-- 
================================================================
"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