pyHarm.NonLinearSolver.NewtonRaphson

Classes

Solver_NewtonRaphson

This nonlinear solver is an implementation of iterative Newton Raphson solving procedure.

Module Contents

class pyHarm.NonLinearSolver.NewtonRaphson.Solver_NewtonRaphson(residual, jacobian, solver_options)

Bases: pyHarm.NonLinearSolver.ABCNonLinearSolver.ABCNLSolver

This nonlinear solver is an implementation of iterative Newton Raphson solving procedure.

factory_keyword

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

Type:

str

solver_options

dictionary containing other options for creation of the solver class.

Type:

dict

residual

function that returns the residual vector of the system to be solved.

Type:

Callable

jacobian

function that returns the jacobian matrix of the system to be solved.

Type:

Callable

solver_options_root

dictionary containing options for the root function.

Type:

dict

extcall

root function of scipy.optimize.

Type:

Callable

factory_keyword: str = 'NewtonRaphson'

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

Type:

str

default

dictionary containing the default solver_options

Type:

dict

__post_init__()
Solve(sol: pyHarm.Solver.SystemSolution, SolList: list) pyHarm.Solver.SystemSolution

Runs the solver.

Parameters:
  • sol (SystemSolution) – SystemSolution that contains the starting point.

  • SolList (SystemSolution) – list of previously solved solutions.

Returns:

SystemSolution solved and completed with the output information.

Return type:

sol (SystemSolution)

CompleteSystemSolution(sol, SolList)

Function that allows to retrieve information of interest

Parameters:
  • sol (SystemSolution) – SystemSolution that contains the starting point.

  • SolList (SystemSolution) – list of previously solved solutions.

linSysdeltak()

Calculation of the ‘deltak’ correction to apply to the current iteration in order to converge towards the solution.

Returns:

Correction ‘deltak’

Return type:

self.extcall_newton(matA,matB)