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
Work Product of GSoC 2021 project "[Gridap] Visualizing PDE approximations in Julia with Gridap.jl and Makie.jl" #24
Conversation
Clean-up of the module and first tests.
Visualize a Grid() or UnstructuredGrid() using mesh and wireframe from Makie.
Add nodaldata and colormap. Send .DS_Store to .gitignore.
Extension of wireframe function to fit quad meshes. Addition of colormap and colorbar in the tests.
Added a couple of lines in the conversion in 3D: the connectivity cns is converted via SimplexFace{D+1,Type} instead of NgonFace{D+1,Type} since the latter creates quads in 3D. Also, Makie.mesh does not support the type tetrahedron, so the grid is converted with normal_mesh.
Paur task1
This reverts commit bcadf31.
This implementation is capable of plotting every figure in #Task2.
New approach to plot cell fields in 3D grids along with subtle modifications.
Change single color edges to avoid missing corners.
Implement dg_mesh, introduce vertices, add all attributes to plotting functions, remove shading.
New approach to plot 3D grids
End of Task 2 and beginning of Task 3
Adding animation
…ie.jl into gsoc2021-master
Fix @amartinhuertas suggestions
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.
Excellent, job, @paurierap! My review is finished.
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.
@paurierap excellent job! The examples in the README look very nice!
See some minor comments below.
I'll accept and merge the PR once we have the description with the summary of the work done.
@fverdugo The description is on its way! |
Final version of README file with comments from @amartinhuertas, @ericneiva and @fverdugo.
Overview
This Pull Request serves as a general description for the GridapMakie project as part of the Google Summer of Code 2021 program. The main goal of the project is to improve the data visualization experience of Gridap.jl, a numerical software for the solution of partial differential equations, by providing the tools towards a fully integrated, end-to-end workflow, from code development and testing, to data visualization. To this end, a new integration with Makie.jl, a plotting environment in the Julia programming language, has been developed in GridapMakie.jl. By doing so, the user no longer needs to rely on external applications (e.g., Paraview), to visualize Gridap data types.
Package Summary
Using conversions from Gridap types to GeometryBasics.jl, GridapMakie.jl allows to plot finite element (FE) triangulations as well as FE functions defined on them via the color attribute. Moreover, the API that GridapMakie uses is quite intuitive for previous Makie users: to visualize surface or volume meshes, we have extended the functions
mesh
andplot
, whereas the visualization of lines (e.g., cell boundaries) and points (e.g., cell vertices) is handled bywireframe
andscatter
. Of course, each plotting function has its mutating variant (plot!
,mesh!
, etc.) in order to superpose to existing plots.Student-Mentor Communication
Overall, the process has been as smooth as velvet. I joined the Gridap Slack channel, where I communicated with my mentors towards the accomplishment of the project goals, as stated in the project proposal. Additionally, we hold a weekly meeting every Tuesday morning to discuss problems as well as new directions and perspectives. These meetings did usually surpass a two-hour duration and were always clarifying for both parties, the student and the mentors.
Coding Work
We started off trying to visualize 2D and 3D plot objects (as in #16) with straightforward plot conversions. We then turned to create our own Plot Recipes in #17 and extending the visualization to account for FE approximations in #18. However, we were not convinced by our plot recipes due to potentially confusing functions names, and restructured the way GridapMakie plots objects: instead of relying on the recipes, we would just extend the existing Makie functions. This way, the user would feel more comfortable with an easy-to-understand API (see #23). All along, these functions do have Observable support, allowing the creation of animations and interactive plots. For proof of results, see the Examples in GridapMakie.jl README file. As seen, most of the objectives set in the project proposal have been reached. Also, the GSoC 2021 blog contains a follow-up of the steps taken towards the completion of GridapMakie, which, by the way, can always be expanded.
Next steps
Finally, future work on the package will concern higher-order visualization in #27 (for example, meshes with curved elements and quadratic polynomials) or quadrilateral meshes in #33, the creation of PackageCompiler.jl warm-up files to reduce Makie start-up time (in #26), or the extension of the Makie function
arrows
to visualize vector fields (currently, any vectorial field is plotted according to the norm of the function at a certain point). In addition to those, we could attain the visualization of sections and slices of triangulations (e.g., the section created by the intersection of a grid and a plane), which would be achieved using GridapEmbedded.jl and the latest Makie release, where support for slices was announced.