Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
a9f3e7a1
Commit
a9f3e7a1
authored
Jul 22, 2019
by
Philipp Arras
Browse files
Temporary: Add energyhistory to iteration controllers
parent
d8aa2644
Pipeline
#52277
passed with stages
in 8 minutes and 30 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty5/minimization/iteration_controllers.py
View file @
a9f3e7a1
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment