Click or drag to resize

IExternalNonLinearSystemSolverSolve Method

Solves a system of non-linear equations.

Namespace: DWSIM.Interfaces
Assembly: DWSIM.Interfaces (in DWSIM.Interfaces.dll) Version: 8.8.1.0
Syntax
double[] Solve(
	Func<double[], double[]> functionbody,
	Func<double[], double[,]> functiongradient,
	Func<double[], double[], bool> iterationcallback,
	double[] vars,
	int maxits,
	double tolerance
)
Request Example

Parameters

functionbody  FuncDouble, Double
Function which gets the current x values and returns the function values.
functiongradient  FuncDouble, Double
Optional. Function which gets the current x values and returns the gradient values.
iterationcallback  FuncDouble, Double, Boolean
Function called n each iteration step. First argument is the x-vector, second argument is f-vector. Return true to stop the iterations or false to continue.
vars  Double
Initial value of the variables.
maxits  Int32
Maximum iterations.
tolerance  Double
Tolerance for solution.

Return Value

Double
The solution vector.
See Also