Skip to content
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

Merged
merged 60 commits into from
Jul 19, 2024
Merged

Visualization of quadrature functions #286

merged 60 commits into from
Jul 19, 2024

Conversation

najlkin
Copy link
Contributor

@najlkin najlkin commented Jul 1, 2024

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 keyword quadrature (instead of solution). Two options of visualization are offered (which can be switched by Q key):

  • Piece-wise constant function on a refined mesh (closed Gauss-Legendre refinement)
  • Discontinuous elements with DOFs collocated with the quadrature on the original mesh
  • L2 projection onto discontinuous elements

Note that high-order quadratures are supported only for tensor finite elements with the first two options.

TODO 📑 :

  • a key for switching
  • maintain consistency of quadrature / grid function
  • testing
    • 1D
    • vector
    • stream
    • animation
    • scripts
    • parallel
  • proper refinement (ClosedGL?)
  • check for tensor basis
  • README, CHANGELOG

@najlkin najlkin added this to the glvis-4.3 milestone Jul 1, 2024
@najlkin najlkin self-assigned this Jul 1, 2024
@najlkin najlkin mentioned this pull request Jul 1, 2024
22 tasks
@tzanio
Copy link
Member

tzanio commented Jul 18, 2024

Looks like f25e99e fixed the CI

@justinlaughlin justinlaughlin self-requested a review July 18, 2024 20:32
@tzanio
Copy link
Member

tzanio commented Jul 18, 2024

Here is the above picture with the mesh drawn as @vladotomov suggested

Screenshot 2024-07-18 at 4 45 54 PM

@tzanio
Copy link
Member

tzanio commented Jul 18, 2024

I like the latest changes @najlkin, re-approving 👍

@najlkin
Copy link
Contributor Author

najlkin commented Jul 18, 2024

Wait for 3D 😮 😎

@justinlaughlin
Copy link
Contributor

justinlaughlin commented Jul 19, 2024

Looks very cool! Just curious, is there a way to toggle back and forth between quadrature function / grid function or is it one or the other? I naively tried doing both but it didn't like that.

./glvis -np 8 -m ../mfem-parallel/examples/mesh -g ../mfem-parallel/examples/sol -q ../mfem-parallel/examples/sol_qf

I see a lot of nice refactoring work here too like with the enum :).

@najlkin
Copy link
Contributor Author

najlkin commented Jul 19, 2024

Nice to hear @justinlaughlin , you need to choose what you want to visualize - a grid function or quadrature function. If you have a bit of time, please test different options, like dimensions, vector/scalar, shadings, ...

@najlkin
Copy link
Contributor Author

najlkin commented Jul 19, 2024

Ok, I think I am done 🙌 . There is 3D scalar/vector visualization of original quadrature mesh lines, including element-wise cutting plane (cplane=2) 😉 Flat cutting plane (cplane=1) would be difficult and I will leave it for some other day.

@justinlaughlin
Copy link
Contributor

Nice to hear @justinlaughlin , you need to choose what you want to visualize - a grid function or quadrature function. If you have a bit of time, please test different options, like dimensions, vector/scalar, shadings, ...

Forgot to mention I tried some things using ex1: different meshes, mesh refinement, function space order, serial/parallel, shadings, stream/command line; I saw no issues. I can test it out more but it would be next week. Looks good to me!

@justinlaughlin
Copy link
Contributor

oh, forgot to mention I tested on WSL2 ubuntu 20.04

@tzanio
Copy link
Member

tzanio commented Jul 19, 2024

Very cool, thanks @najlkin!!

Screenshot 2024-07-19 at 1 07 25 PM

@tzanio tzanio merged commit 883cdc0 into master Jul 19, 2024
10 checks passed
@tzanio tzanio deleted the najlkin/quad-func-dev branch July 19, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants