gemseo.core.discipline.data_processor module#
The data conversion processors.
- class ComplexDataProcessor[source]#
Bases:
DataProcessorData preprocessor to convert complex arrays to float arrays back and forth.
- post_process_data(data)[source]#
Execute a post-processing of the output data.
- Parameters:
data (StrKeyMapping) -- The data to process.
- Returns:
The processed data.
- Return type:
- pre_process_data(data)[source]#
Pre-process data.
- Parameters:
data (StrKeyMapping) -- The data to process.
- Returns:
The processed data.
- Return type:
- class DataProcessor[source]#
Bases:
objectBase class for pre- and post-processing data.
This is useful 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.
- abstractmethod post_process_data(data)[source]#
Execute a post-processing of the output data.
- Parameters:
data (StrKeyMapping) -- The data to process.
- Returns:
The processed data.
- Return type:
- abstractmethod pre_process_data(data)[source]#
Pre-process data.
- Parameters:
data (StrKeyMapping) -- The data to process.
- Returns:
The processed data.
- Return type:
- class FloatDataProcessor[source]#
Bases:
DataProcessorA data preprocessor that converts all scalar input data to floats.
It converts all discipline output data to numpy arrays
- post_process_data(data)[source]#
Execute a post-processing of the output data.
- Parameters:
data (StrKeyMapping) -- The data to process.
- Returns:
The processed data.
- Return type:
- pre_process_data(data)[source]#
Pre-process data.
- Parameters:
data (StrKeyMapping) -- The data to process.
- Returns:
The processed data.
- Return type:
- class NameMapping(mapping)[source]#
Bases:
DataProcessorA data preprocessor to map process level names to local discipline names.
Initialize self. See help(type(self)) for accurate signature.
- Parameters:
mapping (Mapping[str, str]) -- A mapping structure of the form
{global_name: local_name}whereglobal_namemust be consistent with the grammar of the discipline. The local name is the data provided to theDiscipline._run()method. When missing, the global name is the local name.
- post_process_data(data)[source]#
Execute a post-processing of the output data.
- Parameters:
data (StrKeyMapping) -- The data to process.
- Returns:
The processed data.
- Return type:
- pre_process_data(data)[source]#
Pre-process data.
- Parameters:
data (StrKeyMapping) -- The data to process.
- Returns:
The processed data.
- Return type: