data_processor module¶
Data conversion between discipline data check and _run()¶
Classes:
A data preprocessor that converts all gemseo complex arrays input data to floats arrays, and converts all discipline output data to numpy complex arrays. |
|
Abstract class for pre and post processing data of MDODisciplines. |
|
A data preprocessor that converts all gemseo scalar input data to floats, and converts all discipline output data to numpy arrays. |
|
|
A data preprocessor that maps process level data names to local discipline data names. |
- 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.
Methods:
post_process_data
(data)Executes a post processing of discipline output data after the _run method of the discipline, before they are checked by MDODiscipline.check_output_data,
pre_process_data
(data)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.
- 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
Methods:
post_process_data
(data)Executes a post processing of discipline output data after the _run method of the discipline, before they are checked by MDODiscipline.check_output_data,
pre_process_data
(data)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.
- 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.
Methods:
post_process_data
(data)Executes a post processing of discipline output data after the _run method of the discipline, before they are checked by MDODiscipline.check_output_data,
pre_process_data
(data)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.
- 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.
Construcor.
- Parameters
mapping – dictionary of names mapping data structure is {global_key:local_key} the global_key must be consistent with the discipline Grammar. The local key is the data provided to the _run method
Methods:
post_process_data
(data)Executes a post processing of discipline output data after the _run method of the discipline, before they are checked by MDODiscipline.check_output_data,
pre_process_data
(data)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.