IExternalNonLinearSystemSolverSolve Method |
Solves a system of non-linear equations.
Namespace: DWSIM.InterfacesAssembly: 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
)
Function Solve (
functionbody As Func(Of Double(), Double()),
functiongradient As Func(Of Double(), Double(,)),
iterationcallback As Func(Of Double(), Double(), Boolean),
vars As Double(),
maxits As Integer,
tolerance As Double
) As Double()
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
DoubleThe solution vector.
See Also