3.1.2.5. opengate.element

3.1.2.5.1. Module Contents

3.1.2.5.1.1. Functions

get_element_class(element_type, type_name)

Return the class of the given type_name (in the element_type list)

get_builder(element_type, type_name)

Return a function that build an element of the class type_name

new_element(user_info[, simulation])

Create a new element (Volume, Source, Actor, Filter), according to the type name

copy_user_info(v1, v2)

Copy all attributes from v1 to v2, except the name.

3.1.2.5.1.2. Attributes

element_builders

opengate.element.element_builders[source]
opengate.element.get_element_class(element_type, type_name)[source]

Return the class of the given type_name (in the element_type list)

opengate.element.get_builder(element_type, type_name)[source]

Return a function that build an element of the class type_name Check everything first.

opengate.element.new_element(user_info, simulation=None)[source]

Create a new element (Volume, Source, Actor, Filter), according to the type name - use the element_builders to find the class to build - create a new element, with the name as parameter to the constructor - initialize the default list of keys in the user_info - set a pointer to the Simulation object

opengate.element.copy_user_info(v1, v2)[source]

Copy all attributes from v1 to v2, except the name. v1 is assumed to be a UserInfo object with several attribute members. v2 must have the (at least) the same set of attributes. Values are (deep) copied.