[MOAB-dev] Trouble Creating AEntities

Iulian Grindeanu iulian at mcs.anl.gov
Mon Oct 14 16:21:45 CDT 2013


Hello, 
Did you call ReadUtil::update_adjacencies? 
If you create some elements, when you do the first adjacency call, the internal adjacencies are created . 
If you create more elements after the first adjacency call, you have to call "update_adjacencies" for the new elements created, otherwise the up-vertex adjacencies are not updated. 

This is my guess, it is hard to figure why it is not working for you with the limited info you sent :( 

Best Regards, 
Iulian 

----- Original Message -----

| Hey MOAB-Dev,

| I am having trouble creating AEntities for a simple 2D planar mesh. I
| adapted ReadTemplate.cpp to create a mesh generator and it appears
| to be working fine (vertices are all present with correct
| vertex-vertex and vertex-face adjacencies and positions, faces are
| all present with correct vertex connectivity). However, when I try
| to create AEntities (ie edges) using the following code (iface is my
| Core instance):

| Range verts;
| result = iface->get_entities_by_type(0, MBVERTEX, verts);
| if (MB_SUCCESS != result) return result;
| result = MeshTopoUtil(iface).construct_aentities(verts);
| if (MB_SUCCESS != result) return result;

| //get edge entities, by type
| Range edges;
| rval = iface->get_entities_by_type(0, MBEDGE, edges);
| assert(rval == MB_SUCCESS);

| cout << "Number of edges is " << edges.size() << endl;

| I get the following output:

| Number of edges is 0

| Also, attempting to get vertex-edge adjacencies or bridge adjacencies
| through edges returns null sets.

| Any ideas as to what is going wrong?

| -Chris

| --
| Chris Eldred
| DOE Computational Science Graduate Fellow
| Graduate Student, Atmospheric Science, Colorado State University
| B.S. Applied Computational Physics, Carnegie Mellon University, 2009
| chris.eldred at gmail.com / celdred at atmos.colostate.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20131014/93af2ced/attachment.html>


More information about the moab-dev mailing list