padne.paraview¶
ParaView VTK XML export functionality for FEM simulation results.
This module provides functions to export padne’s FEM simulation results to the VTK XML UnstructuredGrid format, compatible with ParaView and other VTK-based visualization tools.
Attributes¶
Functions¶
|
Append an ASCII DataArray of the given VTK type (e.g. "Float64") to parent. |
|
Create the root VTKFile element for an UnstructuredGrid. |
|
Create a PointData element holding the voltage at each vertex. |
|
Create a Points element with z=0 and Y negated for ParaView orientation. |
|
Create a Cells element with triangle connectivity, offsets and types. |
|
Create a Piece element for one triangular mesh with its voltage field. |
|
Export a Solution to VTK XML, one .vtu file per layer. |
Module Contents¶
- padne.paraview.create_data_array(parent: lxml.etree.Element, data_type: str, values: Iterable[int | float], name: str | None = None, number_of_components: int | None = None) lxml.etree.Element[source]¶
Append an ASCII DataArray of the given VTK type (e.g. “Float64”) to parent.
- padne.paraview.create_vtk_root() lxml.etree.Element[source]¶
Create the root VTKFile element for an UnstructuredGrid.
- padne.paraview.create_point_data(potentials: padne.mesh.ZeroForm) lxml.etree.Element[source]¶
Create a PointData element holding the voltage at each vertex.
- padne.paraview.create_points(mesh_obj: padne.mesh.Mesh) lxml.etree.Element[source]¶
Create a Points element with z=0 and Y negated for ParaView orientation.
- padne.paraview.create_cells(mesh_obj: padne.mesh.Mesh) lxml.etree.Element[source]¶
Create a Cells element with triangle connectivity, offsets and types.
- padne.paraview.create_piece(mesh_obj: padne.mesh.Mesh, potentials: padne.mesh.ZeroForm) lxml.etree.Element[source]¶
Create a Piece element for one triangular mesh with its voltage field.
- padne.paraview.export_solution(solution: padne.solver.Solution, output_dir: pathlib.Path) None[source]¶
Export a Solution to VTK XML, one .vtu file per layer.