On Mon, 3 Mar 2008, Yujie wrote:

> Assuming I know a dof, I want to know which element or point on the
> mesh this dof belongs to. How to do it? thanks a lot.

I'm afraid we don't currently have any mapping that lets you do an
O(1) lookup in that direction; it's easy to get a global DoF index
from an element and a local index, but it's not easy to go the other
way around.

If you have to do this once, I'd just loop over all elements and all
nodes, treat them as DofObjects, loop over all the indices they
contain, and stop when you find the one you're looking for.

If you have to do this repeatedly, your best bet is to loop through
elements and nodes once to construct a mapping (a vector, indexed by
global DoF index), then use that mapping for the second and subsequent
lookups.  Unfortunately, bear in mind that adaptive mesh changes
and/or repartitioning would invalidate such a map.


Are you still concerned about the interaction between solution
projections and localization?  I meant to double-check that code this
weekend, but haven't gotten around to it yet.  I can tell you that
I and others have been doing parallel adaptivity without seeing any
problems, but if there are subtle errors there we might just not have
noticed them yet.
---
Roy

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to