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
3f730f24
Commit
3f730f24
authored
Jul 23, 2018
by
Reimar H Leike
Browse files
found an inconsistency in model tests if the domain of position and value do not agree
parent
3517e77d
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/extra/energy_and_model_tests.py
View file @
3f730f24
...
...
@@ -34,9 +34,9 @@ def _get_acceptable_model(M):
dir
=
from_random
(
"normal"
,
M
.
position
.
domain
)
dirder
=
M
.
jacobian
(
dir
)
if
dirder
.
norm
()
==
0
:
dir
=
dir
*
val
*
1e-5
dir
=
dir
*
val
.
norm
()
*
1e-5
else
:
dir
=
dir
*
val
*
(
1e-5
/
dirder
.
norm
())
dir
=
dir
*
val
.
norm
()
*
(
1e-5
/
dirder
.
norm
())
# Find a step length that leads to a "reasonable" Model
for
i
in
range
(
50
):
try
:
...
...
Write
Preview
Supports
Markdown
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