shore.mesh.inspect
File-based inspection utilities: info, check, export, view.
These functions operate on already-written .geo / .npz / .vtm files without requiring a live Mesh object in memory. They mirror the in-memory Mesh methods for offline or post-hoc inspection.
info_geo function
python
info_geo(path: str | Path) -> dictReturn metadata for a single-block .geo file.
Parameters
path— Path to a.geofile.
Returns
dict with keys ``shape``, ``n_points``, ``n_cells``,- ```xyz_min
,xyz_max``.`
info_surface function
python
info_surface(path: str | Path) -> dictReturn metadata for a .npz surface file.
Parameters
path— Path to a.npzfile with a'k0'key.
Returns
dict with keys ``shape``, ``n_points``, ``xyz_min``, ``xyz_max``.
check_geo function
python
check_geo(
path: str | Path,
warn_threshold: float = 1e-06,
periodic_j: bool = False,
) -> dictCheck cell Jacobians layer-by-layer for a single-block .geo file.
Parameters
path— Path to a.geofile.warn_threshold— Warn if jmin drops below this (but remains positive).periodic_j— Use the periodic-j Jacobian (True) or the open (non-periodic) Jacobian (False, default). Cubed-sphere topology blocks are always open; passTruefor single-block O-grid topology blocks.
Returns
dict with keys ``ok`` (bool), ``jmins`` (list of per-layer minimums),- ```any_negative
,any_warn``.`
export_geo function
python
export_geo(
path: str | Path,
output: str | Path | None = None,
with_jacobian: bool = True,
) -> PathExport a .geo file to VTK StructuredGrid .vts for ParaView.
Parameters
path— Input.geofile.output— Output.vtspath. Defaults to same stem with.vtsextension.with_jacobian— Attach per-cell Jacobian as CellData.
Returns
Path— The written.vtsfile path.
export_surface function
python
export_surface(path: str | Path, output: str | Path | None = None) -> PathExport a .npz surface file to VTK StructuredGrid .vts.
Parameters
path— Input.npzfile with'k0'key.output— Output.vtspath. Defaults to same stem with.vtsextension.
Returns
Path— The written.vtsfile path.
view_geo_file function
python
view_geo_file(
path: str | Path,
*,
colorby: str = 'Jacobian',
show_edges: bool = True,
opacity: float = 0.6,
jupyter: bool = False,
off_screen: bool = False,
) -> objectOpen an interactive PyVista window for a .geo file.
Parameters
path— Input.geofile.colorby—"Jacobian"(default) or"none".show_edges— Draw cell edges.opacity— Grid opacity [0-1].jupyter— Use HTML backend for inline Jupyter display.off_screen— Render off-screen (for testing).
Returns
pyvista.Plotter
view_surface_file function
python
view_surface_file(
path: str | Path,
*,
colorby: str = 'radius',
show_edges: bool = True,
jupyter: bool = False,
off_screen: bool = False,
) -> objectOpen an interactive PyVista window for a .npz surface file.
Parameters
path— Input.npzfile with'k0'key.colorby—"radius"(default) or"none".show_edges— Draw cell edges.jupyter— Use HTML backend for inline Jupyter display.off_screen— Render off-screen (for testing).
Returns
pyvista.Plotter