Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NIFTy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ift
NIFTy
Commits
a02b1a04
Commit
a02b1a04
authored
May 30, 2018
by
Philipp Arras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Readability
parent
597286b4
Pipeline
#29991
passed with stages
in 2 minutes and 20 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
nifty4/extra/energy_tests.py
nifty4/extra/energy_tests.py
+2
-3
No files found.
nifty4/extra/energy_tests.py
View file @
a02b1a04
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
# and financially supported by the Studienstiftung des deutschen Volkes.
import
numpy
as
np
import
numpy
as
np
from
..field
import
Field
from
..sugar
import
from_random
from
..sugar
import
from_random
__all__
=
[
"check_value_gradient_consistency"
,
__all__
=
[
"check_value_gradient_consistency"
,
...
@@ -50,7 +49,7 @@ def check_value_gradient_consistency(E, tol=1e-6, ntries=100):
...
@@ -50,7 +49,7 @@ def check_value_gradient_consistency(E, tol=1e-6, ntries=100):
E2
=
_get_acceptable_energy
(
E
)
E2
=
_get_acceptable_energy
(
E
)
val
=
E
.
value
val
=
E
.
value
dir
=
E2
.
position
-
E
.
position
dir
=
E2
.
position
-
E
.
position
Enext
=
E2
#
Enext = E2
dirnorm
=
dir
.
norm
()
dirnorm
=
dir
.
norm
()
dirder
=
E
.
gradient
.
vdot
(
dir
)
/
dirnorm
dirder
=
E
.
gradient
.
vdot
(
dir
)
/
dirnorm
for
i
in
range
(
50
):
for
i
in
range
(
50
):
...
@@ -70,7 +69,7 @@ def check_value_gradient_curvature_consistency(E, tol=1e-6, ntries=100):
...
@@ -70,7 +69,7 @@ def check_value_gradient_curvature_consistency(E, tol=1e-6, ntries=100):
for
_
in
range
(
ntries
):
for
_
in
range
(
ntries
):
E2
=
_get_acceptable_energy
(
E
)
E2
=
_get_acceptable_energy
(
E
)
dir
=
E2
.
position
-
E
.
position
dir
=
E2
.
position
-
E
.
position
Enext
=
E2
#
Enext = E2
dirnorm
=
dir
.
norm
()
dirnorm
=
dir
.
norm
()
dirder
=
E
.
gradient
.
vdot
(
dir
)
/
dirnorm
dirder
=
E
.
gradient
.
vdot
(
dir
)
/
dirnorm
dgrad
=
E
.
curvature
(
dir
)
/
dirnorm
dgrad
=
E
.
curvature
(
dir
)
/
dirnorm
...
...
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