data_processor module¶
Data conversion between discipline data check and _run()¶
- class gemseo.core.data_processor.ComplexDataProcessor[source]¶
Bases:
gemseo.core.data_processor.DataProcessor
A data preprocessor that converts all gemseo complex arrays input data to floats arrays, and converts all discipline output data to numpy complex arrays.
- class gemseo.core.data_processor.DataProcessor[source]¶
Bases:
object
Abstract class for pre and post processing data of MDODisciplines.
Executes a pre processing of input data after they are checked by MDODiscipline.check_data, and before the _run method of the discipline is called. Similarly, the post processing method is executed after the _run method and before the output data is checked by GEMSEO
This is usefull to cast the data types, since the GEMSEO kernel only handles numpy arrays, and interfaces to disciplinary tools, workflow engines or environment can require different types
- class gemseo.core.data_processor.FloatDataProcessor[source]¶
Bases:
gemseo.core.data_processor.DataProcessor
A data preprocessor that converts all gemseo scalar input data to floats, and converts all discipline output data to numpy arrays.
- class gemseo.core.data_processor.NameMapping(mapping)[source]¶
Bases:
gemseo.core.data_processor.DataProcessor
A data preprocessor that maps process level data names to local discipline data names.
- Parameters
mapping – A mapping structure of the form
{global_name: local_name}
whereglobal_name
must be consistent with the grammar of the discipline. The local name is the data provided to theMDODiscipline._run()
method.