[MOAB-dev] r4940 - in MOAB/trunk: src src/moab test

Iulian Grindeanu iulian at mcs.anl.gov
Fri Jun 3 10:59:02 CDT 2011


Well, maybe I should then separate the mesh entity related tests and the child/parent tests.

The method just returns false if some checks are not passed. It is user responsibility to use the method accordingly.

It is mostly for checking if a model is good enough for mesh-based geometry.

(until now, the only tests were actual meshing )

Iulian

----- Original Message -----
> Sometimes the geom topo sets will be created before the mesh is
> actually generated, is this still possible? Maybe it
> just fails the test, but that's ok?
> 
> - tim
> 
> On 06/03/2011 10:40 AM, iulian at mcs.anl.gov wrote:
> > Author: iulian
> > Date: 2011-06-03 10:40:53 -0500 (Fri, 03 Jun 2011)
> > New Revision: 4940
> >
> > Modified:
> >     MOAB/trunk/src/GeomTopoTool.cpp
> >     MOAB/trunk/src/moab/GeomTopoTool.hpp
> >     MOAB/trunk/test/gttool_test.cpp
> > Log:
> > add a method on GeomTopoTool for checking the model consistency
> > for example:
> >    vertex sets need to have one node inside
> >    edge sets need to be ordered with mesh edges chained
> >    edge ends need to be in children vertex sets
> >    face/edge senses need to be consistent with the embedded mesh
> >    entities
> >    face skins are indeed forming the boundary edges
> >
> > more checks might need to be added:
> >    can we build edge loops?
> >    face/region checks are not done yet
> >
> >
> >
> > Modified: MOAB/trunk/src/GeomTopoTool.cpp
> > ===================================================================
> > --- MOAB/trunk/src/GeomTopoTool.cpp 2011-06-03 03:30:59 UTC (rev
> > 4939)
> > +++ MOAB/trunk/src/GeomTopoTool.cpp 2011-06-03 15:40:53 UTC (rev
> > 4940)
> > @@ -1059,6 +1059,8 @@
> >   // this would be a deep copy, into a new geom topo tool
> >     // sets will be duplicated, but entities not
> >     // modelSet will be a new one
> > + // if the original set was null (root), a new model set will be
> > created for
> > + // original model, and its entities will be the original g sets
> >   GeomTopoTool * GeomTopoTool::duplicate_model()
> >   {
> >     // will
> > @@ -1181,10 +1183,202 @@
> >           return NULL;
> >       }
> >     }
> > + // if the original root model set for this model is 0 (root set),
> > then create
> > + // a new set and put all the old sets in the new model set
> > + // in this way, the existing gtt remains valid (otherwise, the
> > modelSet would contain all the
> > + // gsets, the old ones and the new ones; the root set contains
> > everything)
> > + if (modelSet==0)
> > + {
> > + rval = mdbImpl->create_meshset(MESHSET_SET, modelSet);
> > + if (MB_SUCCESS != rval)
> > + return NULL;
> > + // add to this new set all previous sets (which are still in
> > ranges)
> > + for (int dim=0; dim<4; dim++)
> > + {
> > + rval = mdbImpl->add_entities(modelSet, geomRanges[dim]);
> > + if (MB_SUCCESS != rval)
> > + return NULL;
> > + }
> >
> > + }
> > +
> >     return newgtt;
> >   }
> >
> > +#define RETFALSE(a) { std::cout<<a<<"\n"; return false; }
> > +bool GeomTopoTool::check_model()
> > +{
> > + // vertex sets should have one node
> > + Range::iterator rit;
> > + ErrorCode rval;
> > + for (rit = geomRanges[0].begin(); rit!=geomRanges[0].end(); rit++)
> > + {
> > + EntityHandle vSet = *rit;
> > + Range nodes;
> > + rval = mdbImpl->get_entities_by_handle(vSet, nodes);
> > + if (MB_SUCCESS!=rval)
> >
> 
> --
> ================================================================
> "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