我正在尝试分析 different iterative sub-solvers of the Newton equation system, using a Newton-Fischer reformulation of the LCP(linear complementarity problem) 的结果 . 到目前为止,我已经实现了精确求解器 - Gauss-Siedel和牛顿修改方法,该方法使用 bicg matlab 作为J * h = -p等式的子求解器(其中 J 是雅可比, p 是Fischer函数的值)和 h 是我的实现步骤) .
我实现bicg子解析器和精确求解器的部分代码:
if itt
% use iterative solver for newton eq
while ~all(fischer(x, A*x+b) == 0) & its < max_it
% compute the Jacobian
J = eval_jacobian(A, b, x);
% compute the value of the Fischer function
p = fischer(x, A*x + b);
% the natural merit function for convergence measure
residual(its) = .5*(p'*p);
% the newton eq, solve J*h = -p
h = bicg(J, -p, eps, s_its);
% update the solution vector
x = x + h;
% increment the iteration counter
its = its + 1;
end
else
% the exact solver for newton equation
while ~all(fischer(x, A*x+b) == 0) & its < max_it
% compute the Jacobian
J = eval_jacobian(A, b, x);
% compute the value of the Fischer function
p = fischer(x, A*x + b);
% the natural merit function for convergence measure
residual(its) = .5*(p'*p);
% the newton eq, solve J*h = -p
h = - J/p;
% update the solution vector
x = x + h;
% increment the iteration counter
its = its + 1;
end
那么,我的问题是你会使用其他迭代子解算器吗?如果在matlab中没有它们的功能,我不介意为它们实现代码 . 我意识到这更像是一个理论问题 . 谢谢 .