pyHarm.Reductors.ChainReductor

Classes

ChainReductor

This is a ABCReductor that is a list of ABCReductor allowing to chain the reducing operations.

Module Contents

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

Bases: pyHarm.Reductors.ABCReductor.ABCReductor

This is a ABCReductor that is a list of ABCReductor allowing to chain the reducing operations.

Attributes :

reductors (list[ABCReductor]): list of ABCReductor.

factory_keyword: str = 'ChainReductor'

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, J_f, expl_dofs, system, *args)

Loops over the reducers in the list and update them.

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

  • expl_dofs (pd.DataFrame) – explicit dof DataFrame created by the ABCSystem studied.

  • system (ABCSystem) – System studied.

Returns:

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

Return type:

np.ndarray

expand(q: numpy.ndarray) numpy.ndarray

Expands the reduced dof vector by looping over the reducers contained in the list.

Parameters:

q (np.ndarray) – vector of reduced displacement.

Returns:

vector of original displacement with the linear dof being exact solution.

Return type:

np.ndarray

reduce_vectorx(x: numpy.ndarray) numpy.ndarray

Reduces the displacement vector by applying the chain of reductor methods.

Parameters:

x (np.ndarray) – vector of displacement.

Returns:

vector of reduced displacement.

Return type:

np.ndarray

reduce_vector(R: numpy.ndarray) numpy.ndarray

Reduces the residual vector by applying the chain of reductor methods.

Parameters:

R (np.ndarray) – vector of residual.

Returns:

vector of reduced residual.

Return type:

np.ndarray

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

From original jacobian, performs the reduction by applying the chain of reduction.

Parameters:

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

Returns:

reduced jacobian matrix with respect to displacement and angular frequency.

Return type:

np.ndarray