def test_mcp_FB_2(): mcp = N.MCP_old(n - 3, 3, mcp_function_2, mcp_Nablafunction_2) z = np.zeros(n) w = np.zeros(n) SO = N.SolverOptions(mcp, N.SICONOS_MCP_OLD_FB) N.mcp_old_driver_init(mcp, SO) info = N.mcp_old_FischerBurmeister(mcp, z, w, SO) N.mcp_old_driver_reset(mcp, SO) print("z = ", z) print("w = ", w) assert not info
def test_mcp_FB_2(): mcp = sn.MCP_old(n - 3, 3, mcp_function_2, mcp_Nablafunction_2) z = np.zeros(n) w = np.zeros(n) options = sn.SolverOptions(sn.SICONOS_MCP_OLD_FB) sn.mcp_old_driver_init(mcp, options) info = sn.mcp_old_FischerBurmeister(mcp, z, w, options) sn.mcp_old_driver_reset(mcp, options) print("z = ", z) print("w = ", w) assert not info
def test_mcp_FB(): mcp = N.MCP_old(1, 1, mcp_function, mcp_Nablafunction) z = np.array([0., 0.]) w = np.array([0., 0.]) SO = N.SolverOptions(mcp, N.SICONOS_MCP_OLD_FB) N.mcp_old_driver_init(mcp, SO) info = N.mcp_old_FischerBurmeister(mcp, z, w, SO) N.mcp_old_driver_reset(mcp, SO) print("z = ", z) print("w = ", w) assert (np.linalg.norm(z - zsol) <= ztol) assert not info