You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The getDerivative method in the pyCurve class returns inaccurate derivatives when it is run under complex step mode. This routine is supposed to produce the first derivatives, and if the input coefficients have complex parts, it returns the second derivative in the complex part of the output. However, these complex routines are hand differentiated and differ slightly from the original routines.
One side effect of this, is that the even the real part of the first derivative it returns appears to be wrong when the "complex" routines are used. This can be verified by comparing a FD check on the function value, vs the first derivative with all real coefficients, vs the first derivative with complex coefficients.
I will write a test for this, and if there is actually a bug, will try to fix it. The issue might also be caused by me messing up the data types so the values are not passed properly between fortran and python.
If these type of bugs do exist, then it might also explain the behavior described in #51
Steps to reproduce issue
WIP: will add a test that demonstrates this behavior before fixing this.
…
…
…
Current behavior
…
Expected behavior
…
Code versions
Operating System:
Python:
OpenMPI:
CGNS:
PETSc:
Compiler:
This repository:
The text was updated successfully, but these errors were encountered:
Description
The
getDerivative
method in the pyCurve class returns inaccurate derivatives when it is run under complex step mode. This routine is supposed to produce the first derivatives, and if the input coefficients have complex parts, it returns the second derivative in the complex part of the output. However, these complex routines are hand differentiated and differ slightly from the original routines.One side effect of this, is that the even the real part of the first derivative it returns appears to be wrong when the "complex" routines are used. This can be verified by comparing a FD check on the function value, vs the first derivative with all real coefficients, vs the first derivative with complex coefficients.
I will write a test for this, and if there is actually a bug, will try to fix it. The issue might also be caused by me messing up the data types so the values are not passed properly between fortran and python.
If these type of bugs do exist, then it might also explain the behavior described in #51
Steps to reproduce issue
WIP: will add a test that demonstrates this behavior before fixing this.
Current behavior
…
Expected behavior
…
Code versions
The text was updated successfully, but these errors were encountered: