openmc.UnstructuredMesh¶
-
class
openmc.
UnstructuredMesh
(filename, mesh_id=None, name='')[source]¶ A 3D unstructured mesh
New in version 0.12.
Parameters: Variables: - id (int) – Unique identifier for the mesh
- name (str) – Name of the mesh
- filename (str) – Name of the file containing the unstructured mesh
- volumes (Iterable of float) – Volumes of the unstructured mesh elements
- total_volume (float) – Volume of the unstructured mesh in total
- centroids (Iterable of tuple) – An iterable of element centroid coordinates, e.g. [(0.0, 0.0, 0.0), (1.0, 1.0, 1.0), …]
-
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
-
classmethod
from_xml_element
(elem)[source]¶ Generate unstructured mesh object from XML element
Parameters: elem (xml.etree.ElementTree.Element) – XML element Returns: UnstructuredMesh generated from an XML element Return type: openmc.UnstructuredMesh
-
to_xml_element
()[source]¶ Return XML representation of the mesh
Returns: element – XML element containing mesh data Return type: xml.etree.ElementTree.Element