openmc.CompiledSource

class openmc.CompiledSource(library: Optional[str] = None, parameters: Optional[str] = None, strength=1.0)[source]

A source based on a compiled shared library

New in version 0.14.0.

Parameters
  • library (str or None) – Path to a compiled shared library

  • parameters (str) – Parameters to be provided to the compiled shared library function

  • strength (float) – Strength of the source

Variables
  • library (str or None) – Path to a compiled shared library

  • parameters (str) – Parameters to be provided to the compiled shared library function

  • strength (float) – Strength of the source

  • type (str) – Indicator of source type: ‘compiled’

classmethod from_xml_element(elem: Element, meshes=None) CompiledSource[source]

Generate a compiled source from an XML element

Parameters
  • elem (lxml.etree._Element) – XML element

  • meshes (dict) – Dictionary with mesh IDs as keys and openmc.MeshBase instances as values

Returns

Source generated from XML element

Return type

openmc.CompiledSource

populate_xml_element(element)[source]

Add necessary compiled source information to an XML element

Returns

element – XML element containing source data

Return type

lxml.etree._Element