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
Add coupled elemental solution capability #9758
Conversation
We can couple values of elemental variables with |
@dschwen His methods are named |
Job Documentation on 2615b91 wanted to post the following: View the site here |
Call for review. |
This really expands a core interface in MOOSE. If you add to I agree with @dschwen, the name, although somewhat consistent with MOOSE internals will be exposed to users and it isn't very clear what it is? When do I use Tagging @idaholab/moose-team |
@YaqiWang I think you will need to add a check that if @permcody This can be used in any system of elemental-type, kernels, BCs, element UO, side UO. He is pulling out the solution coefficients from an element. Based on my understand from our conversation last week, he is trying to do his own numerical quadrature. Similar to what we do with nodal values for the porous flow guys. What I assume is that he has the need for 2 types quadrature rules at the same time, i.e. some parts of his system are integrated by the usual q-rule we provide, but some needs to be integrated by some other rule. So this would be the easiest way how to work around our "single q-rule rules them all" limitation we have in MOOSE. |
@andrsd Not true, even the variable is nodal, we can still get the local DoFs on an element for the variable, just like we can couple nodal variables in an elemental aux kernel. Like with LAGRANGE, we can break the variable into an elemental variable with L2_LAGRANGE. The second part is almost right. I have two parts, one part uses q-rule, the other part cannot use q-rule directly but with a sophisticated transform and ended up with a 1D q-rule. Most importantly, I need to do these integration in the setup stage and store the assembled matrices, otherwise on-the-fly evaluation would be too costly. |
You are right, but that's not what I am saying. If we are at a node (like in a Nodal BC), there is no concept of an element. We iterate over nodes, not elements in these systems. |
My problem here is preventing the user from calling the wrong coupling methods to get values. Calling |
I see, where is this |
I choose the returned type |
It is passed into |
Oh, I was not pay attention, thought it is nodal variable or not. You are right, I should protect these functions with |
bd128b3
to
bf3283e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation for this new method isn't very helpful. I'm not saying the old documentation is any better but now that we have so many interfaces, we really need to make this better. Take a look:
// Returns value of a coupled variable
coupledValue(...)
// Returns local DoFs of a coupled variable
coupledElementalSln(...)
So they both return something about a coupled variable? Why local DoFs? What does that mean? Do I care? Also what is "Sln"? How do I index into this thing?
Yes, some of these questions are definitely our fault. We don't have detailed instructions on how to use the existing interfaces either, but this is really adding fuel to the fire. I'm not against adding these, but I think the names should be changed, and I think the description of this new public API should be clearly laid out.
Yes, they both for coupled variables. Local DoFs means the elements in the solution vector relevant with the local elements, which is different from the variable values on the quadrature points in |
@YaqiWang - That's great! Please put that kind of description into the doxygen. I'm open for suggestions, but I think we should spell out the name of any word we use for the external interface. "Sln" is fine for internal use, but let's be smart about the API. |
Weird, I did not see your comments and about to complain the turn around time... I am afraid that the name will be too long. How about |
That's not bad. @andrsd, any thoughts on better name? |
|
Will make the change shortly. |
bf3283e
to
4d6da2e
Compare
Any more comments? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks ok to me, @andrsd - any other comments?
The testing can be improved to also test |
I am also going to make another postprocessor to get neighbor solutions. Will update the PR soon. |
4d6da2e
to
2615b91
Compare
This is ready. |
Did you see David's suggestion? He wants you to test the old and older APIs as well. Gives you a suggestion and tells you which test to use as template. |
Yes, I took an easier approach, adding a new parameter |
When will this be merged? Or more comments? |
@YaqiWang Your easier approach tested the API in |
Right, my approach actually tested the if statement in Old. I guess this is minor and we can leave it as it is unless you have strong opinions. |
Fix a valgrind unitialized-value error introduced in PR #9758
This is an enhancement of #9690 for coupling local DoFs. It is needed by my special kernels which has pre-assembled mass matrix.