Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
8657bf15
Commit
8657bf15
authored
May 29, 2018
by
Martin Reinecke
Browse files
Merge branch 'NIFTy_4' of gitlab.mpcdf.mpg.de:ift/NIFTy into NIFTy_4
parents
2dfde4c2
a02b1a04
Pipeline
#30004
passed with stages
in 2 minutes and 13 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty4/extra/energy_tests.py
View file @
8657bf15
...
...
@@ -17,7 +17,6 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
import
numpy
as
np
from
..field
import
Field
from
..sugar
import
from_random
__all__
=
[
"check_value_gradient_consistency"
,
...
...
@@ -50,7 +49,7 @@ def check_value_gradient_consistency(E, tol=1e-6, ntries=100):
E2
=
_get_acceptable_energy
(
E
)
val
=
E
.
value
dir
=
E2
.
position
-
E
.
position
Enext
=
E2
#
Enext = E2
dirnorm
=
dir
.
norm
()
for
i
in
range
(
50
):
Emid
=
E
.
at
(
E
.
position
+
0.5
*
dir
)
...
...
@@ -70,7 +69,7 @@ def check_value_gradient_curvature_consistency(E, tol=1e-6, ntries=100):
E2
=
_get_acceptable_energy
(
E
)
val
=
E
.
value
dir
=
E2
.
position
-
E
.
position
Enext
=
E2
#
Enext = E2
dirnorm
=
dir
.
norm
()
for
i
in
range
(
50
):
Emid
=
E
.
at
(
E
.
position
+
0.5
*
dir
)
...
...
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