Commit e0ece1e4 authored by Philipp Arras's avatar Philipp Arras
Browse files

Add preconditioner to DescentMinimizer interface

parent 5104854f
Pipeline #52272 failed with stages
in 5 minutes and 23 seconds
......@@ -43,7 +43,7 @@ class DescentMinimizer(Minimizer):
self._controller = controller
self.line_searcher = line_searcher
def __call__(self, energy):
def __call__(self, energy, preconditioner=None):
"""Performs the minimization of the provided Energy functional.
Parameters
......@@ -79,7 +79,7 @@ class DescentMinimizer(Minimizer):
# compute a step length that reduces energy.value sufficiently
new_energy, success = self.line_searcher.perform_line_search(
energy=energy, pk=self.get_descent_direction(energy),
energy=energy, pk=self.get_descent_direction(energy, preconditioner),
f_k_minus_1=f_k_minus_1)
if not success:
self.reset()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment