pyHarm.Reductors.AllgowerPreconditioner

Classes

AllgowerPreconditioner

This Reductor is a preconditioner that does not reduce the system size but preconditions the system to make it easier to solve for the solvers.

Module Contents

class pyHarm.Reductors.AllgowerPreconditioner.AllgowerPreconditioner(data: dict, expl_dofs: pandas.DataFrame, *args)

Bases: pyHarm.Reductors.ABCReductor.ABCReductor

This Reductor is a preconditioner that does not reduce the system size but preconditions the system to make it easier to solve for the solvers.

This reductor is based on the preconditioning proposal made in Allgower et al. book named Numerical Continuation Methods: An Introduction. It uses QR decomposition of the Jacobian matrix and normalises the Jacobian using the diagonal terms in the R matrix.

Attributes :

qr (Callable): QR decomposition function from scipy.linalg

factory_keyword: str = 'AllgowerPreconditioner'

keyword that is used to call the creation of this class in the factory.

Type:

str

default

dictionary containing default parameters.

Type:

dict

__post_init__(*args)

A post init method to be customized if needed when building new class.

update_reductor(xpred: numpy.ndarray, J_f: numpy.ndarray, *args)

Computes a preconditioning scaling matrix based on the QR decomposition of the jacobian.

Parameters:
  • xpred (np.ndarray) – point predicted as the new starting point for the next iteration of the analysis process.

  • J_f (np.ndarray) – full jacobian with respect to displacement and angular frequency (contains the correction equation residual).

Returns:

modified displacement vector given as input after passing through the reductor np.ndarray: modified jacobian matrix given as input after passing through the reductor pd.DataFrame: modified explicit dof DataFrame after passing through the reductor

Return type:

np.ndarray

expand(q: numpy.ndarray) numpy.ndarray

Does nothing for this class, as the preconditioner does not change size of the system.

Parameters:

q (np.ndarray) – vector of displacement.

Returns:

same vector than the input.

Return type:

np.ndarray

reduce_vector_x(x: numpy.ndarray) numpy.ndarray

Does nothing for this class, as the preconditioner does not change size of the system.

Parameters:

x (np.ndarray) – vector of displacement.

Returns:

same vector than the input.

Return type:

np.ndarray

reduce_vector(R: numpy.ndarray) numpy.ndarray

From original residual vector, performs the transformation to get the preconditioned residual vector.

Parameters:

R (np.ndarray) – residual vector.

Returns:

preconditioned residual vector.

Return type:

np.ndarray

reduce_matrix(dJdxom: numpy.ndarray, *args) numpy.ndarray

From original matrix, performs the transformation to get the preconditioned matrix.

Parameters:

dJdxom (np.ndarray) – full size jacobian matrix with respect to displacement and angular frequency.

Returns:

preconditioned jacobian matrix with respect to displacement and angular frequency.

Return type:

np.ndarray

_get_output_expl_dofs() pandas.DataFrame

Returns the explicit dof list after transforamtion buy the reducer.

Returns:

reduced explicit dof DataFrame after passing through the reducer.

Return type:

pd.DataFrame