gemseo / core

Show inherited members

data_processor module

The data conversion processors.

class gemseo.core.data_processor.ComplexDataProcessor[source]

Bases: DataProcessor

Data 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 (MutableStrKeyMapping) – The data to process.

Returns:

The processed data.

Return type:

MutableStrKeyMapping

pre_process_data(data)[source]

Pre-process data.

Parameters:

data (MutableStrKeyMapping) – The data to process.

Returns:

The processed data.

Return type:

MutableStrKeyMapping

class gemseo.core.data_processor.DataProcessor[source]

Bases: object

Base 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.

abstract post_process_data(data)[source]

Execute a post-processing of the output data.

Parameters:

data (MutableStrKeyMapping) – The data to process.

Returns:

The processed data.

Return type:

MutableStrKeyMapping

abstract pre_process_data(data)[source]

Pre-process data.

Parameters:

data (MutableStrKeyMapping) – The data to process.

Returns:

The processed data.

Return type:

MutableStrKeyMapping

class gemseo.core.data_processor.FloatDataProcessor[source]

Bases: DataProcessor

A 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 (MutableStrKeyMapping) – The data to process.

Returns:

The processed data.

Return type:

MutableStrKeyMapping

pre_process_data(data)[source]

Pre-process data.

Parameters:

data (MutableStrKeyMapping) – The data to process.

Returns:

The processed data.

Return type:

MutableStrKeyMapping

class gemseo.core.data_processor.NameMapping(mapping)[source]

Bases: DataProcessor

A 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} where global_name must be consistent with the grammar of the discipline. The local name is the data provided to the MDODiscipline._run() method.

post_process_data(data)[source]

Execute a post-processing of the output data.

Parameters:

data (MutableStrKeyMapping) – The data to process.

Returns:

The processed data.

Return type:

MutableStrKeyMapping

pre_process_data(data)[source]

Pre-process data.

Parameters:

data (MutableStrKeyMapping) – The data to process.

Returns:

The processed data.

Return type:

MutableStrKeyMapping