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
Provide centralized facilities for quadrature formulas. #4536
Conversation
I have a few questions/comments:
|
Good question about the copy -- I guess I should make it a reference. The copy of these objects is cheap (a call to About the failing tests: Unsure. Let me remove one of the changes and see whether that fixes anything. As for how I plan on doing this in the end: We have a function |
I agree. |
I don't know what the issue was with the changes in the melt postprocessor I had previously changed, so I dropped this and converted a couple of other places for now. This patch now tests cleanly; I will start converting all of the other places in steps once this is merged. |
👍 |
If we ever want to use anything other than hypercube cells, then we must also switch quadrature formulas. In other words, every occurrence of
QGauss
has to be replaced by something that depends on the cell type.Rather than having lots of
if
or?:
statements in the code, I thought I'd use this as an opportunity to provide centralized infrastructure for these cases. That's what the first commit does. I think it makes the code easier to read in general because one no longer has to know that adding one to the polynomial degree is what one should be doing to get an appropriate quadrature formula.The second commit shows how this can be used. There are some 30 places left that need to be looked at, but I thought I'd put this patch out already for comment, and then just work through the remaining places by hand.
(Right now, I set quadrature objects up in a way that only works for hypercubes. That's because it's not trivial to know up front what kind of cell a mesh is going to use, and the introspection object is set up pretty early. I will have to think about how to address this, but at least it will have to be addressed in only one place, rather than at every location where we currently set up quadrature formulas.)
/rebuild