openmc.stats.PointCloud

class openmc.stats.PointCloud(positions: Sequence[Sequence[float]], strengths: Sequence[float] | None = None)[source]

Spatial distribution from a point cloud.

This distribution specifies a discrete list of points, with corresponding relative probabilities.

Added in version 0.15.1.

Parameters:
  • positions (iterable of 3-tuples) – The points in space to be sampled

  • strengths (iterable of float, optional) – An iterable of values that represents the relative probabilty of each point.

Variables:
  • positions (numpy.ndarray) – The points in space to be sampled with shape (N, 3)

  • strengths (numpy.ndarray or None) – An array of relative probabilities for each mesh point

classmethod from_xml_element(elem: Element) PointCloud[source]

Generate spatial distribution from an XML element

Parameters:

elem (lxml.etree._Element) – XML element

Returns:

Spatial distribution generated from XML element

Return type:

openmc.stats.PointCloud

to_xml_element() Element[source]

Return XML representation of the spatial distribution

Returns:

element – XML element containing spatial distribution data

Return type:

lxml.etree._Element