Re: [Libmesh-users] Looping over local nodes

2015-08-25 Thread namu patel
I figured it out, I had to make certain that the loop appears after segments of the code dealing with the initialization and problem setup. -- ___ Libmesh-users mailing list Libme

Re: [Libmesh-users] Looping over local nodes

2015-08-24 Thread namu patel
Sorry, in the code I was comparing *mesh.n_nodes_on_proc()*, not the elements*. * I messed up when copy and pasting in the email. Thus, in the code I'm still having trouble. - Namu​ On Mon, Aug 24, 2015 at 6:08 PM, namu patel wrote: > Hello Everyone, > > In my code, I am trying to loop over al

[Libmesh-users] Looping over local nodes

2015-08-24 Thread namu patel
Hello Everyone, In my code, I am trying to loop over all the local nodes and then sum them up to make sure that the all the nodes are accounted for. To do so, I am using a simple loop: *int num_nodes = 0; * *for (MeshBase::node_iterator n_it = mesh.local_nodes_begin(); n_it != mesh.local_nodes_en

Re: [Libmesh-users] Looping over local nodes

2011-12-21 Thread Derek Gaston
If you look at nemesis_io_helper, you will see a few places in there where we build up lists of all nodes connected to any local elements... Like Roy said... I don't think there is a generic predicate that could be made that would be useful in the library. When you are needing to do something lik

Re: [Libmesh-users] Looping over local nodes

2011-12-20 Thread Vetter Roman
> Do you want all nodes attached to active local elements? Or all nodes attached to "semilocal" elements? Or all nodes containing ghosted degrees of freedom? I think what I need is the first (all nodes attached to active local elements) at one point in my program and the second (all nodes attache

Re: [Libmesh-users] Looping over local nodes

2011-12-20 Thread Roy Stogner
On Tue, 20 Dec 2011, Vetter Roman wrote: > what would be the easiest way of looping over all locally available nodes, > including ghosted ones? The local_node_begin() and end() iterators don't seem > to include ghosts... They don't. There's not actually any simple predicate that includes ghos

[Libmesh-users] Looping over local nodes

2011-12-20 Thread Vetter Roman
Hello libMesh users what would be the easiest way of looping over all locally available nodes, including ghosted ones? The local_node_begin() and end() iterators don't seem to include ghosts... Thanks, Roman -- Write o