On Sun, 29 May 2016, Pepijn Kessels wrote:

>    std::vector<Number> u_permute(mesh.n_nodes());
...
>      u_permute[node->id()] = soln[node->dof_number(0,0,0)];

Depending on your mesh options, this isn't even guaranteed to not give
you a segmentation fault.  E.g. imagine doing an adaptive coarsening
step with renumbering disabled - nodes disappeared, so n_nodes()
decreases, but unless the node with maximum id is one of the ones
coarsened away, mesh.max_node_id() won't have decreased at all, and
when you try to index with that id into a too-small vector the result
is undefined.

Conversely, imagine that you are renumbering after refinement and
coarsening operations (which we do by default; contiguous numbers can
be nice for efficiency).  *We* keep your internal solution values
correct with the new indexing, but if you're making copies of those
values and relying on the indexing remaining unchanged you'll be
disappointed.
---
Roy

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to