gemseo / problems / topo_opt

Show inherited members

volume_fraction_disc module

A discipline for topology optimization volume fraction.

class gemseo.problems.topo_opt.volume_fraction_disc.VolumeFraction(n_x=100, n_y=100, empty_elements=None, full_elements=None, name=None)[source]

Bases: MDODiscipline

Compute the volume fraction from the density.

Volume fraction is computed as the average of the density value (rho) on each finite element.

Initialize self. See help(type(self)) for accurate signature.

Parameters:
  • n_x (int) –

    The number of elements in the x-direction.

    By default it is set to 100.

  • n_y (int) –

    The number of elements in the y-direction.

    By default it is set to 100.

  • empty_elements (Sequence[int] | None) – The index of the empty element ids that are not part of the design space.

  • full_elements (Sequence[int] | None) – The index of the full element ids that are not part of the design space.

  • name (str | None) – The name of the discipline. If None, use the class name.

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.