-
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
SIDE_HIERARCHIC doesn't work with array variables #27610
Comments
@roystgnr FYI |
Is this being run in parallel? You don't say anything about that in "Steps to Reproduce", but I'd be very surprised to see a ghosting error triggered by a serial run. I'm somewhat baffled by this even on top of that. I wouldn't have been surprised if someone wrote an array variable implementation that breaks for some FE types - in the bad old days there was a lot of MOOSE that worked for Looking at the failure ... we're in MooseVariableDataBase.C, We're on a mesh with 1 QUAD8, so for the The So ... who thought adding 48 to that would give us the indices for the second component? Its indices are 300-311, 324-335, 348-359, 372-383, offset by 12. Are we even sure Which makes sense, looking at |
I guess only side variables reveal this bug? |
This issue libMesh/libmesh#2114 and this #13417 could be related. |
If you never actually use your variable, then it takes a non-discontinuous non- Scrambled indices will give garbage results eventually, though, even if they don't hit an assertion or a segfault first. |
This is the logic for |
#13417 is related in the sense that it has the same "is it elemental or is it nodal" false dichotomy. Most finite elements are not elemental (because their support spans multiple elements) and also not nodal (because they have zero or multiple components at some nodes, or because they have a component which is not the value at non-vertex nodes). There might be valid use cases for |
I always giggle when I get to witness @roystgnr rants about MOOSE |
I don't think |
I need to edit my rants better, or maybe only post the conclusions rather than the full stream-of-consciousness. I did get to that same "thereby gets garbage" conclusion eventually. |
Code below fixes
|
Does L2_ HIERARCHIC have this issue? |
Maybe we can have a function to return how many dofs associated with an object and a function to return which object a dof is associated with? In this way, we can use the number of dofs of the object to stride the dofs for higher components and consolidate nodal and elemental variables as well. Using map may cause performance penalty (not sure how much the impact could be). |
Doesn't seem like there are issues with L2_HIERARCHIC. |
This is
This would require an inverse lookup table that in the best case would double the memory we use for indexing. The typical case would be a proportion similar to the number of variables you have in one variable group. (IIRC this was in the thousands for some of your use cases?) |
The number of components for an array variable could be thousands, but the number of local dofs on an element for a component is very limited. We often at most use third order polynomials. |
is not the number of dofs you have in one variable. Thousands of components in an array variable would mean thousands of variables in one variable group. In the forward case we use the component number to avoid storing thousands of indices instead of one, but the reverse lookup would not have the a priori information needed to make the same optimization. |
Not sure what you mean |
The normal lookup here is the function which returns which dofs are associated with an object; hence
is the reverse of that. But,
It sounds like you're talking about a local reverse lookup, not global? Why not just loop over nodes once, then, and operate on indices node-wise, when you know what node they're associated with and you know they're contiguous there? Even with third-order polynomials (wait, how are you using array variables with these, if you never added |
When I added the code, I thought the stride is either 1 for nodal variables or number of dofs of one variable for elemental variables. Right, I never added HIERARCHIC support. In the case @maxnezdyur gave above with I think I know what you mean now. |
Bug Description
SIDE_HIERARCHIC doesn't work with array variables while HIERARCHIC does. This seems like an error because of the similarity of the two variables.
Steps to Reproduce
Error:
Impact
Prevents the use of SIDE_HIERARCHIC with array variables.
[Optional] Diagnostics
No response
The text was updated successfully, but these errors were encountered: