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

Temporary: Add energyhistory to iteration controllers

parent d8aa2644
Pipeline #52277 passed with stages
in 8 minutes and 30 seconds
......@@ -100,6 +100,7 @@ class GradientNormController(IterationController):
self._name = name
def start(self, energy):
self.energyhistory = []
self._itcount = -1
self._ccount = 0
if self._tol_rel_gradnorm is not None:
......@@ -128,6 +129,7 @@ class GradientNormController(IterationController):
"{}: Iteration #{} energy={:.6E} gradnorm={:.2E} clvl={}"
.format(self._name, self._itcount, energy.value,
energy.gradient_norm, self._ccount))
self.energyhistory.append(energy.value)
# Are we done?
if self._iteration_limit is not None:
......
Supports Markdown
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