-
Notifications
You must be signed in to change notification settings - Fork 56
[WIP] Visualization of complex functions #352
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
base: master
Are you sure you want to change the base?
Conversation
…r commands enums.
|
@mlstowell , if you are testing it with example 22 in parallel, GLVis crashes quite often, but it is not fault of this PR. I realized the ordering is wrong there and should be fixed eventually. Check other examples, it should be:
While you batch all operations which causes mismatches in received data as GLVis has no way to know what sockets should be grouped together 🤪 . |
|
I'm just starting to look at this but I like it. I can visualize the four fields mentioned in the header but I haven't found the animation option. I can adjust the phase rate as you mention but I'm not seeing an animation so the phase rate doesn't seem to do anything. Perhaps this feature is not available yet... |
|
It should be, it works for me 🤔 . Have you switched the representation? Magnitude does not show anything, because it is independent of the phase 😅 . |
|
Okay, I see it now. The comment written to screen misled me. When I saw: Another thing I might change is the limits on the color bar. For the phase plot I would suggest a constant range from -pi to pi. For the real and imaginary parts I would suggest a constant range from -max(magnitude) to max(magnitude). I find these constant ranges are more illustrative during animations. What do you think? |
|
Done, the maximal magnitude is not exact for high-order elements, but should be good enough 😉 |
|
I have not looked closely at the code but functionally I think this is perfect! Thanks for doing this, @najlkin. It looks great! |
|
Incidentally, I looked briefly at the available keys for changing this mode and I don't see a better choice. At some point soon I suspect we'll have to add a GUI control panel of some sort. |
|
@mlstowell , I fixed ex22p along the lines above ☝️(mfem/mfem#5198) , so it should run fine now. Hopefully, we will be able to remove most of the visualization stuff from there after this PR and the release of GLVis 🙌 . |
This PR adds visualization of complex grid functions, which are represented different ways:
To switch the representation, you may use
Qkey (like for quadratures) TODO: find a better one 😄The functions can be loaded from files as normally (the file reader recognizes the format based on the header) or through a socket stream
by the new command(also automatically detected).csolutionMagnitude and phase in example 22.
The complex solution can be also animated by varying the complex phase. To increase the phase rate, press
;, and to decrease:🎞️ .↪️dependency: #336