gemseo / problems / topo_opt

Show inherited members

density_filter_disc module

A discipline for topology optimization density filter.

class gemseo.problems.topo_opt.density_filter_disc.DensityFilter(n_x=100, n_y=100, min_member_size=1.5, name=None)[source]

Bases: MDODiscipline

Apply density filter to the design variables of a topology optimization problem.

This helps to avoid checkerboard patterns in density based topology optimization. A filter matrix \(H\) is assembled at instantiation. The discipline computes the physical density \(xPhys\) from the design variables \(x\) with the formula \(xPhys=Hx\). This physical density is an approximation of a convolution integral.

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.

  • min_member_size (float) –

    The minimum structural member size.

    By default it is set to 1.5.

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