openmc.UnstructuredMesh¶
- class openmc.UnstructuredMesh(filename, library, mesh_id=None, name='', length_multiplier=1.0)[source]¶
A 3D unstructured mesh
New in version 0.12.
Changed in version 0.12.2: Support for libMesh unstructured meshes was added.
- 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
length_multiplier (float) – Multiplicative factor to apply to mesh coordinates
library ({'moab', 'libmesh'}) – Mesh library used for the unstructured mesh tally
output (bool) – Indicates whether or not automatic tally output should be generated for this mesh
specified_length_multiplier (bool) – Indicates whether a non-unity length multiplier has been applied to this 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
- to_xml_element()[source]¶
Return XML representation of the mesh
- Returns
element – XML element containing mesh data
- Return type