gemseo_scilab

Show inherited members

scilab_discipline module

Scilab discipline.

class gemseo_scilab.scilab_discipline.ScilabDataProcessor(scilab_function)[source]

Bases: DataProcessor

A scilab function data processor.

Constructor.

Parameters:

scilab_function (ScilabFunction) – The scilab function.

post_process_data(local_data)[source]

Convert the output data from scilab to GEMSEO.

Parameters:

local_data (Mapping[str, float | ndarray]) – The data obtained after executing scilab.

Returns:

The processed data to be given to GEMSEO.

Return type:

dict[str, ndarray]

pre_process_data(input_data)[source]

Convert the input from GEMSEO to scilab.

Parameters:

input_data (MutableMapping[str, ndarray]) – The input data.

Returns:

The data to be passed to scilab.

Return type:

Mapping[str, ndarray]

class gemseo_scilab.scilab_discipline.ScilabDiscipline(function_name, script_dir_path)[source]

Bases: MDODiscipline

Base wrapper for OCCAM problem discipline wrappers and SimpleGrammar.

Constructor.

Parameters:
  • function_name (str) – The name of the scilab function to generate the discipline from.

  • script_dir_path (str) – The path to the directory to scan for .sci files.

Raises:

ValueError – If the function is not in any of the files of the script_dir_path.

cache: AbstractCache | None

The cache containing one or several executions of the discipline according to the cache policy.

data_processor: DataProcessor

A tool to pre- and post-process discipline data.

exec_for_lin: bool

Whether the last execution was due to a linearization.

input_grammar: BaseGrammar

The input grammar.

jac: MutableMapping[str, MutableMapping[str, ndarray | csr_array | JacobianOperator]]

The Jacobians of the outputs wrt inputs.

The structure is {output: {input: matrix}}.

name: str

The name of the discipline.

output_grammar: BaseGrammar

The output grammar.

re_exec_policy: ReExecutionPolicy

The policy to re-execute the same discipline.

residual_variables: dict[str, str]

The output variables mapping to their inputs, to be considered as residuals; they shall be equal to zero.

run_solves_residuals: bool

Whether the run method shall solve the residuals.