IMTEK-Simulation / NuMPI

Utilities for MPI-parallel numerical calculations with Python
MIT License
2 stars 1 forks source link

Interface of solvers #51

Open sannant opened 3 years ago

sannant commented 3 years ago

Currenly the argument list in polonsky and keer is:

def constrained_conjugate_gradients(fun, hessp, x0, gtol=1e-8,
                                    mean_value=None, residual_plot=False,
                                    maxiter=5000):
 """
    fun : callable.
                The objective function to be minimized.
                            fun(x) -> float(energy),ndarray(gradient)
.....
"""

This is made to match the scipy interface.

But I find it a bit stupid because the energy is never used.

We should probably also allow for:


def constrained_conjugate_gradients(gradient, hessp, x0, gtol=1e-8,
                                    mean_value=None, residual_plot=False,
                                    maxiter=5000):