Correct. Even if each processor does not have all the mesh data, looping over
every element it does store is still a local operation and the proper way to
ensure mesh consistency.
-Ben
On Apr 16, 2014, at 10:18 PM, "walter kou"
mailto:walter4c...@gmail.com>> wrote:
Can I consider that each pr
Can I consider that each processor have all the mesh data, such that
looping the whole mesh does not cause extra communication?
On Wed, Apr 16, 2014 at 9:41 PM, Kirk, Benjamin (JSC-EG311) <
benjamin.k...@nasa.gov> wrote:
> Correct. If you only iterate over local elements and modify the mesh
Correct. If you only iterate over local elements and modify the mesh it will
become inconsistent across processors; and you'd need to fix that with
communication. So it's cleaner to loop over all elements.
On Apr 16, 2014, at 9:35 PM, "walter kou"
mailto:walter4c...@gmail.com>> wrote:
So I gue
So I guess, If I want to modify the subdomain_id, I will also need to use
mesh.elements_{begin,end},
Right?
On Wed, Apr 16, 2014 at 9:33 PM, walter kou wrote:
> It works with mesh.elements_{begin,end}().
>
> Thanks,
>
>
>
>
> On Wed, Apr 16, 2014 at 8:42 PM, Kirk, Benjamin (JSC-EG311) <
> benj
It works with mesh.elements_{begin,end}().
Thanks,
On Wed, Apr 16, 2014 at 8:42 PM, Kirk, Benjamin (JSC-EG311) <
benjamin.k...@nasa.gov> wrote:
> 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 loc
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 wrote:
> 1) Given a
Hi all,
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) {