Skip to content
GitLab
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
35cbd38a
Commit
35cbd38a
authored
May 13, 2020
by
Martin Reinecke
Browse files
Merge branch 'complex_jac_tests' into 'NIFTy_6'
Add consistency check to jacobian tests See merge request
!456
parents
05512d65
c50024d1
Pipeline
#74843
passed with stages
in 24 minutes and 30 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty6/extra.py
View file @
35cbd38a
...
...
@@ -296,3 +296,11 @@ def check_jacobian_consistency(op, loc, tol=1e-8, ntries=100, perf_check=True):
print
(
hist
)
raise
ValueError
(
"gradient and value seem inconsistent"
)
loc
=
locnext
# FIXME The following code shows that we need prober tests for complex
# derivatives
ddtype
=
loc
.
values
()[
0
].
dtype
if
isinstance
(
loc
,
MultiField
)
else
loc
.
dtype
tdtype
=
dirder
.
values
()[
0
].
dtype
if
isinstance
(
dirder
,
MultiField
)
else
dirder
.
dtype
only_r_linear
=
ddtype
!=
tdtype
consistency_check
(
linmid
.
jac
,
domain_dtype
=
ddtype
,
target_dtype
=
tdtype
,
only_r_linear
=
only_r_linear
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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