pymoto.StaticCondensation

class pymoto.StaticCondensation(main, free, **kwargs)

Static condensation of a linear system of equations

The partitioned system of equations

\(\begin{bmatrix} \mathbf{A}_\text{mm} & \mathbf{A}_\text{ms} \\ \mathbf{A}_\text{sm} & \mathbf{A}_\text{ss} \end{bmatrix} \begin{bmatrix} \mathbf{x}_\text{m} \\ \mathbf{x}_\text{s} \end{bmatrix} = \begin{bmatrix} \mathbf{b}_\text{m} \\ \mathbf{b}_\text{s} \end{bmatrix} ,\) with subscripts (m) and (s) referring to the main and secondary dofs, respectively.

The system is solved in two steps:

\(\begin{aligned} \mathbf{A}_\text{ss} \mathbf{x}_\text{sm} &= \mathbf{A}_\text{sm} \\ \tilde{\mathbf{A}} &= \mathbf{A}_\text{mm} - \mathbf{A}_\text{ms} \mathbf{x}_\text{sm}. \end{aligned}\)

Assumptions:
  1. It is assumed the prescribed DOFs (all dof - main dof - free dof) are prescribed to zero.

  2. It is assumed the applied load on the free DOFs is zero; there is no reduced load.

Implemented by @artofscience (s.koppen@tudelft.nl).

References:

Koppen, S., Langelaar, M., & van Keulen, F. (2022). Efficient multi-partition topology optimization. Computer Methods in Applied Mechanics and Engineering, 393, 114829. DOI: https://doi.org/10.1016/j.cma.2022.114829

Input Signals:
  • A (dense or sparse matrix): The system matrix \(\mathbf{A}\) of size (n, n)

Output Signal:
  • Ared (dense or sparse matrix): The reduced system matrix \(\tilde{\mathbf{A}}\) of size (m, m)

Parameters:
  • free – The indices corresponding to the free degrees of freedom

  • main – The indices corresponding to the main degrees of freedom

  • **kwargs – See pymoto.LinSolve, as they are directly passed into the LinSolve module

__init__(main, free, **kwargs)

Initialize the static condensation module

Parameters:
  • main – The indices corresponding to the free degrees of freedom

  • free – The indices corresponding to the main degrees of freedom

  • **kwargs – Are passed to pymoto.LinSolve module

Methods

__init__(main, free, **kwargs)

Initialize the static condensation module

connect(sig_in[, sig_out])

Connect without automatic adding to a function network

get_input_sensitivities([as_list])

get_input_states([as_list])

get_output_sensitivities([as_list])

get_output_states([as_list])

reset()

Reset the state of the sensitivities (they are set to zero or to None)

response()

Calculate the response from sig_in and output this to sig_out

sensitivity()

Calculate sensitivities using backpropagation

Attributes

n_in

Get the number of input signals

n_out

Get the number of output signals

sig_in

sig_out

connect(sig_in: Signal | Iterable[Signal], sig_out: Signal | Iterable[Signal] = None)

Connect without automatic adding to a function network

get_input_sensitivities(as_list=False)
get_input_states(as_list=False)
get_output_sensitivities(as_list=False)
get_output_states(as_list=False)
property n_in: int

Get the number of input signals

property n_out: int

Get the number of output signals

Note: Cannot be used in the initial __call__()

reset()

Reset the state of the sensitivities (they are set to zero or to None)

response()

Calculate the response from sig_in and output this to sig_out

sensitivity()

Calculate sensitivities using backpropagation

Based on the sensitivity we get from sig_out, reverse the process and output the new sensitivities to sig_in

sig_in: List = None
sig_out: List = None