-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MooseMesh::nodeToElemMap() indexes all elements, including ancestors #6031
Comments
also quite a bit of that code in |
Hmmm... I doubt that it's intentional to have all ancestors in there, but I might not be remembering all of the use cases. It is easy to filter yourself by just doing
|
Well, in #6032 I did already implement the filtering, and there you can see why it takes two loops. If you can figure it out in one loop I'll gladly implement it that way ;-) |
Right, I missed that part. This could be made into a function template though, as the code in the body is identical. |
And does it really GREATLY reduce storage? The vector is indexed by node ID. Aren't those pretty dense? Especially on serial meshes. And considering this map includes ancestors? Isn't there a substantial overhead on maps storage wise? Just making sure I'm not missing something here. |
It does greatly reduce the memory in the case of ParallelMesh... which is when we normally have hundreds of millions of elements/nodes so the size will matter ;-) That said, I think we could definitely use a few different maps:
|
I'll add |
Ahhhhhhh! That's what SemiLocal is :-) Yeah, of course, I'll change it to semilocal. Do I need to put semilocal into all the names though? Or can we just make this the conceptual default? |
Yes, put semilocal in the name. |
I'm actually hoping that once you get this in play we can try to switch everything over to using it... we should really try avoid making that global map :-) |
There is no |
Or you could, you know, use this: https://github.com/idaholab/moose/blob/devel/framework/include/mesh/MooseMesh.h#L769 |
But... I need an element range, not a node range... |
Probably since no one needed it before now. It seems like a good thing to cache, because determining whether an Elem "semilocal" is kind of expensive, you have to call |
Wait - you added new predicates to libMesh for getting ghosted elements. On Tue, Dec 8, 2015 at 4:17 PM John W. Peterson notifications@github.com
|
Well, he only wants active ones so it might not be the same exact thing. Anyway, no one is saying we don't know how to do it, just that it hasn't been needed till now. |
MooseMesh::nodeToElemMap()
builds a map that points from nodes to adjacent elements. It its current state it includes ancestor elements (i.e. elements that are parents holding refined elements). Is this desired behavior @friedmud ? This is tripping me up quite a bit in EBSD Reader.if the lines
were changed to
we'd get a map that only holds real elements. I wonder if there is a usecase for having ancestor elements.
I know that I can filter these elements out by myself, but it makes my algorithm a lot less elegant (because I'll have to iterate over the element list twice to get the number of non-ancestor elements first).
FYI @frombs
The text was updated successfully, but these errors were encountered: