openmc.Mesh

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

A structured Cartesian mesh in two or three dimensions

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
  • type (str) – Type of the mesh
  • dimension (Iterable of int) – The number of mesh cells in each direction.
  • lower_left (Iterable of float) – The lower-left corner of the structured mesh. If only two coordinate are given, it is assumed that the mesh is an x-y mesh.
  • upper_right (Iterable of float) – The upper-right corner of the structrued mesh. If only two coordinate are given, it is assumed that the mesh is an x-y mesh.
  • width (Iterable of float) – The width of mesh cells in each direction.
get_mesh_xml()[source]

Return XML representation of the mesh

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