msml.exporter¶
msml.exporter – base functionality for all exporters.
An exporter is like an operator but with great power! It is a cut-off in the execution of an msml file and can read/manipulate the whole and processed memory content.
For more information: msml.exporter.Exporter
Functions
get_exporter(name) |
Find an Exporter under the given name |
get_known_exporters() |
|
register_exporter(name, clazz) |
Register an exporter class under the given name. |
Classes
Exceptions
-
msml.exporter.register_exporter(name, clazz)[source]¶ Register an exporter class under the given name.
- Args:
- name (str): name to select the Exporter from the command line interface clazz (type): the type object or a factory function for the Exporter
-
msml.exporter.get_exporter(name)[source]¶ Find an Exporter under the given
name- Args:
- name (str): common name of the Exporter,
- Returns:
- type: a factory function
See Also:
-
class
msml.exporter.Exporter(msml_file)[source]¶ Bases:
object-
datamodel¶
-
features¶
-
gather_inputs()[source]¶ find all references needed by this exporter from workflow :param msml_file: msml.model.base.MSMLFile :return:
-
gather_output()[source]¶ finds all variables that is provided by the exporter :param msmlfile: msml.model.base.MSMLFile :return: list of MSMLVariables
-
get_input_constraint_name(const)[source]¶ generates the input for a given
OAConstraint:param const: :type msml.model.OAConstraint :return:
-
get_input_material_name(region)[source]¶ Parameters: region (MaterialRegion) – :rtype str :return: a name for the indices input slot for the given material region
-
get_input_mesh_name(mesh)[source]¶ generates the name for an output request within an object declaration :param mesh: :type msml.model.base.Mesh :return: :rtype str
-
get_input_objectelement_name(objectelement, parameter)[source]¶ generates the slot name for an objectelement
Parameters: - objectelement (msml.model.base.ObjectElement) – ObjectElement
- parameter (msml.model.alphabet.Slot) – the slot of the given object element
Returns:
-
get_input_set_name(setelement)[source]¶ the input slot name for the given setelement :param setelement: :type setelement: IndexGroup :return: :type str
-
init_exec(executer)[source]¶ initialization by the executor, sets memory and executor member :param executer: msml.run.Executer :return:
-
initialize(msml_file, name='base', output_type_of_elements=None, features=frozenset([]), mesh_sort=('VTK', 'Mesh'))[source]¶ Call this in derived classes for initializing the input, output and arguments structures.
Parameters: - msml_file (msml.model.base.MSMLFile) – the given msml in the constructor
- name (str) – a name for your exporter
- output_type_of_elements (dict[str, dict[str, msml.sorts.Sort]]) – a dictionary of dictionaries for every element and parameter
- features (set) – a list of string with supported features
- mesh_sort (tuple[str, str]) – a tuple of (physical, logical) type name
Returns:
-
-
class
msml.exporter.AbaqusExporter(msml_file)[source]¶ Bases:
msml.exporter.base.XMLExporter
-
class
msml.exporter.SofaExporter(msml_file)[source]¶ Bases:
msml.exporter.base.XMLExporter
-
class
msml.exporter.HiFlow3Exporter(msml_file)[source]¶ Bases:
msml.exporter.base.ExporterExporter for hiflow3
Todo
What does this exporter support? - See GitHub issue n73.
-
create_bcdata(obj, step)[source]¶ Parameters: obj (msml.model.base.SceneObject) – Returns: a object of BcData Return type: BcData
-