SFEPY-VIEW(1)
β¨ NAME β¨
sfepy-view β okay so bestie, this lil icon views SfePy meshes or the results of SfePy calculations. That's the whole job. And yes, you're in the SfePy manual rn, welcome π
π SYNOPSIS π
sfepy-view [-h] [-f field_spec [field_spec β¦]]
[--fields-map map [map β¦]] [-s step] [-l] [-i ISOSURFACES] [-e]
[-w field] [--factor factor] [--opacity opacity] [--color-map cmap]
[--axes-options options [options β¦]] [--no-axes] [--grid-vector1
grid_vector1] [--grid-vector2 grid_vector2] [--max-plots MAX_PLOTS]
[--no-labels] [--label-position position] [--no-scalar-bars]
[--scalar-bar-size size] [--scalar-bar-position position] [-v
position] [--camera-position camera_position] [--window-size
window_size] [-a output_file] [-r rate] [-o output_file]
[--off-screen] [-2] filenames [filenames β¦]
π¦ DESCRIPTION π¦
It's a script that gives you quick VTK-based visualizations of your finite element computations results. No cap, that's the vibe: you computed the thing, now you get to look at the thing. π
In the examples below it is supposed that sfepy is installed. When using the in-place build, replace sfepy-view by python3 sfepy/scripts/resview.py. (iykyk π«Ά)
π Examples π
The examples assume that python -c "import sfepy; sfepy.test('--output-dir=output-tests')" has been run successfully and the resulting data files are present. Do that first, bestie, otherwise it's giving file not found energy π
- View data in
output-tests/test_navier_stokes.vtk:
sfepy-view output-tests/navier_stokes-navier_stokes.vtk
- Customize the above output: plot0: field
p, switch on edges, plot1: fieldu, surface with opacity0.4, glyphs scaled by factor2e-2:
sfepy-view output-tests/navier_stokes-navier_stokes.vtk -f p:e:p0 u:o.4:p1 u:g:f2e-2:p1
- As above, but glyphs are scaled by the factor determined automatically as 20% of the minimum bounding box size:
sfepy-view output-tests/navier_stokes-navier_stokes.vtk -f p:e:p0 u:o.4:p1 u:g:f10%:p1
- View data and take a screenshot:
sfepy-view output-tests/diffusion-poisson.vtk -o image.png
- Take a screenshot without a window popping up (stealth mode β¨):
sfepy-view output-tests/diffusion-poisson.vtk -o image.png --off-screen
- Create animation from
output-tests/diffusion-time_poisson.*.vtk:
sfepy-view output-tests/diffusion-time_poisson.*.vtk -a mov.mp4
- Create animation from
output-tests/test_hyperelastic.*.vtk, set frame rate to3, plot displacements andmooney_rivlin_stress:
sfepy-view output-tests/test_hyperelastic_TL.*.vtk -f u:wu:e:p0 mooney_rivlin_stress:p1 -a mov.mp4 -r 3
π POSITIONAL ARGUMENTS π
filenamesβ your results/mesh files. Feed her the goods. πΈ
π OPTIONAL ARGUMENTS π
-h,--helpβ show this help message and exit. Classic. The girlies love a help flag.-f field_spec [field_spec β¦],--fields field_spec [field_spec β¦]β the fields to plot, bestie, and the options get separated by":". Here's the whole menu, no skips:"cX"- plot only Xth field component"e"- print edges"fX"- scale factor for warp/glyphs, see--factoroption"g"- glyphs (for vector fields only), scale by factor"iX"- plot X isosurfaces"tX"- plot X streamlines, gradient employed for scalar fields"mX"- plot cells withmat_id=X"oX"- set opacity to X"pX"- plot in slot X"r"- recalculate cell data to point data"sX"- plot data in step X"vX"- plotting style:s=surface,w=wireframe,p=points"wX"- warp mesh by vector field X, scale by factor
--fields-map map [map β¦]β map fields and cell groups, e.g.1:u1,p1 2:u2,p2. Matchmaking, but for fields π-s step,--step stepβ select data in a given time step.-l,--outlineβ plot mesh outline. Just the silhouette, the contour, the lewk.-i ISOSURFACES,--isosurfaces ISOSURFACESβ plot isosurfaces [default:0]-e,--edgesβ plot cell edges.-w field,--warp fieldβ warp mesh by vector field.--factor factorβ scaling factor for mesh warp and glyphs. Append"%"to scale relatively to the minimum bounding box size. (That's thef10%flex from the examples above π)--opacity opacityβ set opacity [default:1.0]--color-map cmapβ setcolor_map, e.g.hot,cool,bone, etc. [default:viridis]--axes-options options [options β¦]β options for directional axes, e.g.xlabel="z1" ylabel="z2", zlabel="z3"--no-axesβ hide orientation axes. Gone. Poof. π--grid-vector1 grid_vector1β define positions of plots along grid axis 1 [default:"0, 0, 1.6"]--grid-vector2 grid_vector2β define positions of plots along grid axis 2 [default:"0, 1.6, 0"]--max-plots MAX_PLOTSβ maximum number of plots along grid axis 1 [default:4]--no-labelsβ hide plot labels.--label-position positionβ define position of plot labels [default:"-1, -1, 0, 0.2"]--no-scalar-barsβ hide scalar bars.--scalar-bar-size sizeβ define size of scalar bars [default:"0.15, 0.05"]--scalar-bar-position positionβ define position of scalar bars [default:"0.8, 0.02, 0, 1.5"]-v position,--view positionβ camera azimuth, elevation angles, and optionally zoom factor [default:"225,75,0.9"]--camera-position camera_positionβ define camera position.--window-size window_sizeβ define size of plotting window.-a output_file,--animation output_fileβ create animation,mp4file type supported. Main character gets a movie deal π¬-r rate,--frame-rate rateβ set framerate for animation.-o output_file,--screenshot output_fileβ save screenshot to file.--off-screenβ off screen plots, e.g. when screenshotting.-2,--2d-viewβ 2d view of XY plane.
π Author π
SfePy developers β the collective, the crew, the founding mothers and fathers of this whole operation π«Ά
π Copyright π
2020, Robert Cimrman and SfePy developers
And that's the whole page, bestie. Go visualize something gorgeous. π β¨
version: 2026.1 β dated Apr 26, 2026 β from the SfePy girlies at SFEPY-VIEW(1). Slay, bye! π¦π
π¦ where this page comes from
- ubuntu stonking: python3-sfepy 2026.1-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms