Commit 5d33abf8 authored by Philipp Arras's avatar Philipp Arras
Browse files

Fixup

parent 3b1cb4ec
Pipeline #52619 passed with stages
in 8 minutes and 44 seconds
...@@ -133,7 +133,7 @@ class SteepestDescent(DescentMinimizer): ...@@ -133,7 +133,7 @@ class SteepestDescent(DescentMinimizer):
functional's gradient for minimization. functional's gradient for minimization.
""" """
def get_descent_direction(self, energy): def get_descent_direction(self, energy, _):
return -energy.gradient return -energy.gradient
...@@ -150,7 +150,7 @@ class RelaxedNewton(DescentMinimizer): ...@@ -150,7 +150,7 @@ class RelaxedNewton(DescentMinimizer):
super(RelaxedNewton, self).__init__(controller=controller, super(RelaxedNewton, self).__init__(controller=controller,
line_searcher=line_searcher) line_searcher=line_searcher)
def get_descent_direction(self, energy): def get_descent_direction(self, energy, _):
return -energy.metric.inverse_times(energy.gradient) return -energy.metric.inverse_times(energy.gradient)
...@@ -204,7 +204,7 @@ class L_BFGS(DescentMinimizer): ...@@ -204,7 +204,7 @@ class L_BFGS(DescentMinimizer):
self._s = [None]*self.max_history_length self._s = [None]*self.max_history_length
self._y = [None]*self.max_history_length self._y = [None]*self.max_history_length
def get_descent_direction(self, energy): def get_descent_direction(self, energy, _):
x = energy.position x = energy.position
s = self._s s = self._s
y = self._y y = self._y
...@@ -267,7 +267,7 @@ class VL_BFGS(DescentMinimizer): ...@@ -267,7 +267,7 @@ class VL_BFGS(DescentMinimizer):
def reset(self): def reset(self):
self._information_store = None self._information_store = None
def get_descent_direction(self, energy): def get_descent_direction(self, energy, _):
x = energy.position x = energy.position
gradient = energy.gradient gradient = energy.gradient
# initialize the information store if it doesn't already exist # initialize the information store if it doesn't already exist
......
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