gemseo / problems / scalable / parametric / core / disciplines

# scalable_discipline module¶

A scalable discipline.

class gemseo.problems.scalable.parametric.core.disciplines.scalable_discipline.Coefficients(a_i, D_i0, D_ii, C_ij)[source]

Bases: NamedTuple

The coefficients of a scalable discipline.

The output of a scalable discipline indexed by $$i$$ is computed as $$y_i=a_i-D_{i,0}x_0-D_{i,i}x_i+\sum_{j=1\atop j\neq i}^NC_{i,j}y_j$$.

Create new instance of Coefficients(a_i, D_i0, D_ii, C_ij)

Parameters:
• a_i (NDArray[float]) –

• D_i0 (NDArray[float]) –

• D_ii (NDArray[float]) –

• C_ij (Mapping[str, NDArray[float]]) –

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

C_ij: Mapping[str, NDArray[float]]

The coefficient matrix $$C_{i,j}$$ to multiply $$y_j$$.

D_i0: NDArray[float]

The coefficient matrix $$D_{i,0}$$ to multiply $$x_0$$.

D_ii: NDArray[float]

The coefficient matrix $$D_{i,i}$$ to multiply $$x_i$$.

a_i: NDArray[float]

The coefficient vector $$a_i$$.

class gemseo.problems.scalable.parametric.core.disciplines.scalable_discipline.ScalableDiscipline(index, a_i, D_i0, D_ii, C_ij, **default_input_values)[source]

Bases: BaseDiscipline

A scalable discipline.

It computes the output $$y_i=a_i-D_{i,0}x_0-D_{i,i}x_i+\sum_{j=1\atop j\neq i}^N C_{i,j}y_j$$.

Parameters:
• index (int) – The index $$i$$ of the scalable discipline.

• a_i (NDArray[float]) – The offset vector $$a_i$$.

• D_i0 (NDArray[float]) – The coefficient matrix $$D_{i,0}$$ to multiply the shared design variable $$x_0$$.

• D_ii (NDArray[float]) – The coefficient matrix $$D_{i,i}$$ to multiply the local design variable $$x_i$$.

• C_ij (Mapping[str, NDArray[float]]) – The coefficient matrices $$\left(C_{i,j}\right)_{j=1\atop j\neq i}^N$$ where $$C_{i,j}$$ is used to multiply the coupling variable $$y_j$$.

• **default_input_values (NDArray[float]) – The default values of the input variables.

coefficients: Coefficients

The coefficient matrices defining the scalable discipline.

index: int

The index of the scalable discipline.

input_names: list[str]

The names of the input variables.

input_names_to_default_values: Mapping[str, NDArray[float]]

The default values of the input variables.

name: str

The name of the discipline.

names_to_sizes: dict[str, int]

The sizes of the input and output variables.

output_names: list[str]

The names of the output variables.