On Nov 15, 2013, at 12:15 AM, John Peterson <jwpeter...@gmail.com>
 wrote:

> Would it be possible to have the mesh_inserter_iterator do something other 
> than call mesh.add_node(n)?  I think if it did something with logic more 
> similar to Mesh::add_point(), which inserts a node with a valid ID in the 
> appropriate location of the _nodes vector, MeshCommunication::broadcast() 
> might actually just work...  Thoughts?

The serial mesh has a long history of expecting contiguous node numbers, and 
that (nodes[i]->id() == i).  This was required *way* back when elements stored 
the indices of their nodes rather than pointers to them.

Relaxing this while still using a vector as underlying storage should be 
technically possible, we just need some synchronization to (i) sort the nodes 
vector based on node->id(), and then (ii) implement a binary search lookup 
instead of direct access by id.  This would be a pretty big change though.  Am  
I understanding you, that for some reason this is important?

-Ben



------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to