Commit 21053a6b authored by Philipp Arras's avatar Philipp Arras

Remove output of new AbsDeltaIC to files for now

parent 53eb3379
Pipeline #60262 passed with stages
in 8 minutes and 37 seconds
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
# #
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik. # NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
import numpy as np
from ..logger import logger from ..logger import logger
from ..utilities import NiftyMeta from ..utilities import NiftyMeta
import numpy as np
from time import time
class IterationController(metaclass=NiftyMeta): class IterationController(metaclass=NiftyMeta):
...@@ -289,12 +289,11 @@ class AbsDeltaEnergyController(IterationController): ...@@ -289,12 +289,11 @@ class AbsDeltaEnergyController(IterationController):
""" """
def __init__(self, deltaE, convergence_level=1, iteration_limit=None, def __init__(self, deltaE, convergence_level=1, iteration_limit=None,
name=None, file_name=None): name=None):
self._deltaE = deltaE self._deltaE = deltaE
self._convergence_level = convergence_level self._convergence_level = convergence_level
self._iteration_limit = iteration_limit self._iteration_limit = iteration_limit
self._name = name self._name = name
self._file_name = file_name
def start(self, energy): def start(self, energy):
self._itcount = -1 self._itcount = -1
...@@ -334,9 +333,4 @@ class AbsDeltaEnergyController(IterationController): ...@@ -334,9 +333,4 @@ class AbsDeltaEnergyController(IterationController):
if self._ccount >= self._convergence_level: if self._ccount >= self._convergence_level:
return self.CONVERGED return self.CONVERGED
# Write energy to file
if self._file_name is not None:
with open(self._file_name, 'a+') as f:
f.write('{} {} {}\n'.format(time(), energy.value, diff))
return self.CONTINUE return self.CONTINUE
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