You're modifying the mesh, so you need to be sure to do it the same on all 
processors.  In this case, the culprit I think is looping over the local 
elements.  What happens when you loop over mesh.elements_{begin,end}(); instead?

-Ben

On Apr 16, 2014, at 8:35 PM, walter kou <[email protected]> wrote:

> 1) Given a 3D mesh, I try to write a separate code to add boundary id,
> using:
> 
>    Mesh::element_iterator       it_el      =
> mesh.active_local_elements_begin();
>    const Mesh::element_iterator it_last_el =
> mesh.active_local_elements_end();
>    for ( ; it_el != it_last_el ; ++it_el) {
>        Elem* elem = *it_el;
> // some code to detect null-neighbour
>  mesh.boundary_info->add_side(elem->id(), side, bc_code);
> 
>  equation_systems.init();


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to