Add F.plot(...) for one-line PyVista field visualization#1176
Open
Copilot wants to merge 21 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1176 +/- ##
==========================================
- Coverage 94.76% 94.68% -0.09%
==========================================
Files 46 47 +1
Lines 3534 3592 +58
==========================================
+ Hits 3349 3401 +52
- Misses 185 191 +6 ☔ 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
approved these changes
Jun 24, 2026
RemDelaporteMathurin
approved these changes
Jun 24, 2026
Collaborator
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.