On Tue, 12 Mar 2013, John Peterson wrote: > On Tue, Mar 12, 2013 at 11:13 AM, Manav Bhatia <[email protected]>wrote: > >> Should I be iterating over the pid_nodes or the active_nodes if my >> intention is to set the values of dof on each node for output. > > Neither. You should be checking to see if a given dof lies between the > first_local_dof and last_local_dof on a processor before trying to set it > directly.
For problems with lots of variables it should be a tiny bit more efficient to just test the DofObject::processor_id(); we never put dofs on a processor other than the one where their DofObject lives. So looping over active_local_nodes() and active_local_elements() ought to do it, for LAGRANGE codes on unrefined meshes. On refined meshes, setting hanging node values isn't guaranteed to leave them consistent; you'll need to do a System::update and an enforce_constraints_exactly call afterwards. For codes that want to generalize to arbitrary elements, the best thing to do is write a functor to do the transformations and pass it to System::project_vector() to do the interpolations/projections/communications/constraints etc. --- Roy ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
