The Open FUSION Toolkit 26.9
An open-source framework for fusion and plasma science and engineering
Loading...
Searching...
No Matches
OpenFUSIONToolkit.meshing Namespace Reference

Detailed Description

General OFT utilities for mesh generation and manipulation.

Authors
Chris Hansen
Date
July 2026

Functions

 convert_mesh_to_pyvista (mesh_type, r, lc)
 Convert mesh to pyvista representation.
 read_native_mesh (filename)
 write_native_mesh (filename, mesh_type, r, lc, reg, nodesets=None, sidesets=None, ho_info=None, periodic_info=None, reg_attrs=None, reg_names=None)

Function Documentation

◆ convert_mesh_to_pyvista()

convert_mesh_to_pyvista ( mesh_type,
r,
lc )

Convert mesh to pyvista representation.

Parameters
mesh_typeMesh integer type (10=line, 21=tri, 23=quad, 31=tet, 33=hex)
rPoints list [np,3]
lcCell list [nc,3]
Returns
pyvista.UnstructuredGrid object for grid

◆ read_native_mesh()

read_native_mesh ( filename)
Read mesh information from a native OFT HDF5 mesh file

@param filename Filename for mesh file

@returns Dictionary containing the mesh information

◆ write_native_mesh()

write_native_mesh ( filename,
mesh_type,
r,
lc,
reg,
nodesets = None,
sidesets = None,
ho_info = None,
periodic_info = None,
reg_attrs = None,
reg_names = None )
Create a native HDF5 mesh file for OFT from the given mesh information

    @param filename Filename for mesh file
    @param mesh_type Mesh type string ( "tri", "quad", "tet", "hex")
    @param r Points list [np,3]
    @param lc Cell list [nc,np_per_cell] (0-based)
    @param reg Region list [nc]
    @param nodesets List of node sets (0-based)
    @param sidesets List of side sets (0-based)
    @param ho_info High-order grid information
    @param periodic_info Information for mesh periodicity
    @param reg_attrs List of region attributes
    @param block_names List of block names