-
Notifications
You must be signed in to change notification settings - Fork 51
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
Visualization of quadrature functions #286
base: master
Are you sure you want to change the base?
Conversation
Unfortunately, there is nothing for high-order quadratures on non-tensor elements. The number of DOFs matches for L2 elements, but the points are different. We would need some special basis for that in MFEM 🤔 . |
Using the values at the quadrature points, one can compute a r.h.s vector for a local L2 projection on an appropriate L2 basis. There are probably multiple options for selecting the "appropriate" L2 basis. One possibility is to choose the order of the L2 basis based on the order of the quadrature rule -- e.g. if the quadrature rule is exact for polynomials of degree p, then we project on order p/2 basis -- this will ensure that we get invertible mass matrix if we use the same quadrature rule for the mass matrix as for the r.h.s. |
Well, that would work for sure, but there are many different ways, as you say, so it is less of visualization and more of processing. It might introduce some oscillations and does not necessarily match the quadrature point-wise. Therefore, I am not sure we want that 🤔 |
Ok, you convinced me @v-dobrev , that was quick 😄 . I added L2 projection as another option, which is also the fallback for the other two when non-tensor elements are used. The order is the same as with that collocation, so the same number of points, which seems to me as the most logical. As the quadrature points and DOFs are close, the resulting grid function looks fine 😉 . |
- <kbd>Q</kbd> – Cycle between representations of the quadrature (piece-wise constant refined/L2 element dof collocation) | ||
- <kbd>Q</kbd> – Cycle between representations of the quadrature (piece-wise constant refined | ||
/ L2 element dof collocation / L2 element projection) |
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.
Wasn't Q
supposed to close all GLVis windows? Or was that just an idea that never got implemented? @tzanio, do you remember?
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.
Wasn't
Q
supposed to close all GLVis windows? Or was that just an idea that never got implemented? @tzanio, do you remember?
I don't think such a functionality was implemented.
This PR adds support for visualization of quadratures (
QuadratureFunction
). They can be loaded from a file through the new command line argument-q
or in a socket stream with the keywordquadrature
(instead ofsolution
). Two options of visualization are offered (which can be switched byQ
key):Note that high-order quadratures are supported only for tensor finite elements with the first two options.
TODO 📑 :