HASEonGPU.vtkWedge

HASEonGPU.vtkWedge(file_name, data=None, geometry=None, field='phiAse', scalar_name=None, every=1, fields=None)

Write scalar data on a wedge mesh to a legacy ASCII VTK file.

The preferred simulation callback form is vtkWedge(file_name, state, fields=...) inside a user onStep function. state must be a TimeStepState produced by Simulation; it carries both the dynamic arrays and the static topology needed to write VTK geometry. file_name may contain {step}, {time}, and {field} placeholders.

field selects attributes or mapping keys from data. A string writes one scalar array, a sequence writes several arrays with their original names, and a mapping writes aliased names, for example field={"phi": "phiAse"}. fields is for explicit arrays and maps VTK scalar names to arrays, for example fields={"phiASE": state.phiAse, "cladAbs": state.phiAse * 5.5}. fields takes precedence over field.

Point-shaped arrays (numberOfPoints, levels) are written as POINT_DATA. Prism-shaped arrays (numberOfTriangles, levels - 1) are written as CELL_DATA. Mixed point and cell arrays can be written to the same file. For standalone array exports outside a TimeStepState, pass geometry as a GainMedium or MeshTopology.

The legacy callback-factory form simulation.onStep(vtkWedge(path, geometry, ...)) is still accepted. In that form, every controls the output period and must be a positive integer.