Add F.plot(...) for one-line PyVista field visualization#1176
Merged
RemDelaporteMathurin merged 25 commits intoJul 16, 2026
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1176 +/- ##
=======================================
Coverage 94.79% 94.79%
=======================================
Files 46 47 +1
Lines 3437 3496 +59
=======================================
+ Hits 3258 3314 +56
- Misses 179 182 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Copilot
AI
changed the title
[WIP] Add basic functionality for plotting fields with pyvista
Add Jun 23, 2026
F.plot(...) for one-line PyVista field visualization
RemDelaporteMathurin
marked this pull request as ready for review
June 24, 2026 13:03
RemDelaporteMathurin
approved these changes
Jun 24, 2026
RemDelaporteMathurin
approved these changes
Jun 24, 2026
Collaborator
jhdark
reviewed
Jul 7, 2026
jhdark
requested changes
Jul 7, 2026
jhdark
left a comment
Collaborator
There was a problem hiding this comment.
Just some minor changes from me
|
|
||
| from festim.species import Species | ||
|
|
||
| DEFAULT_TITLE_FONT_SIZE = 12 |
Collaborator
There was a problem hiding this comment.
This is only used in one place, dont think its needed
Collaborator
There was a problem hiding this comment.
I would keep it here as 1. we may use it in other places 2. it helps keep the "config" variables easily accessible
Co-authored-by: James Dark <65899899+jhdark@users.noreply.github.com>
jhdark
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary
This PR adds a lightweight plotting API for species fields so users can generate PyVista visuals in one line, including multi-species and subdomain-aware cases.
F.plot(...)entrypoint (src/festim/plot.py, exported viasrc/festim/__init__.py).subdomain=...for mixed-domain/discontinuous workflows.filename=...for screenshot output andshow_edges=Trueshortcut.**kwargstoplotter.add_mesh(...).pyvistadependency.test/test_plot.pycovering API behavior, edge cases, and error paths.Related Issues
Handled by automatic issue linking in the PR system.
Motivation and Context
Plotting fields with PyVista currently requires repetitive boilerplate (
vtk_mesh, grid wiring, plotter setup). This change introduces a small wrapper to make field visualization immediate while preserving control through optional arguments.Type of Change
Testing
pytest)Code Quality Checklist
ruff format .)ruff check .)Documentation
Breaking Changes
None.
Screenshots/Examples
Additional Notes
This PR keeps scope intentionally narrow: one public plotting helper plus focused tests around that API surface.