openmc.RectilinearMesh

class openmc.RectilinearMesh(mesh_id=None, name='')[source]

A 3D rectilinear Cartesian mesh

Parameters:
  • mesh_id (int) – Unique identifier for the mesh
  • name (str) – Name of the mesh
Variables:
  • id (int) – Unique identifier for the mesh
  • name (str) – Name of the mesh
  • n_dimension (int) – Number of mesh dimensions (always 3 for a RectilinearMesh).
  • x_grid (Iterable of float) – Mesh boundary points along the x-axis.
  • y_grid (Iterable of float) – Mesh boundary points along the y-axis.
  • z_grid (Iterable of float) – Mesh boundary points along the z-axis.
  • indices (Iterable of tuple) – An iterable of mesh indices for each mesh element, e.g. [(1, 1, 1), (2, 1, 1), …]
classmethod from_hdf5(group)[source]

Create mesh from HDF5 group

Parameters:group (h5py.Group) – Group in HDF5 file
Returns:Instance of a MeshBase subclass
Return type:openmc.MeshBase
to_xml_element()[source]

Return XML representation of the mesh

Returns:element – XML element containing mesh data
Return type:xml.etree.ElementTree.Element