mdolab / idwarp

IDWarp is a mesh warping package for the MACH framework.
Other
17 stars 29 forks source link

`inflate_cube` test appears to fail #57

Open A-CGray opened 3 years ago

A-CGray commented 3 years ago

Description

When running testflo, the fortran function verifyWarpDeriv. In the inflate_cube test, the output from this test appears to show large errors in some of the derivative terms. However, these error values are not actually used as a unit test and so the entire test suite still passes.

Given how weird the FD values are for the two terms with big errors, it may be that the issue is in those rather than the AD values, but it's hard to see how that could be the case.

As well as fixing these errors, the values computed by verifyWarpDeriv should also be used as unit tests themselves.

Steps to reproduce issue

Please provide a minimum working example (MWE) if possible

  1. Download input files
  2. Run testflo -s -n 1 --pre_announce .

Current behavior

 Welcome to verifyWarpDeriv
 Checking            5  degrees of freedom
 Doing centered differnce with h:   9.9999999999999995E-007
 Running AD Version
DOF:    0 OrigVal:   1.10000000000     AD:  3.20276945718     FD: -82.5391959690     Err(%): 216.1477878    
DOF:    1 OrigVal:   0.00000000000     AD:  1.55441018422     FD:  1.55440962639     Err(%):-0.3588677678E-04
DOF:    2 OrigVal:   0.00000000000     AD:  2.37789159693     FD:  2.37789019958     Err(%):-0.5876415306E-04
DOF:    3 OrigVal:   1.10000000000     AD:  3.24466226094     FD: -76.8269017747     Err(%):  217.6382903    
DOF:    4 OrigVal:  0.480000000000E-01 AD:  1.57707427507     FD:  1.57707371725     Err(%):-0.3537008183E-04
DOF:    5 OrigVal:   0.00000000000     AD:  2.38147538319     FD:  2.38147398580     Err(%):-0.5867736573E-04
.

Expected behavior

Errors should be ~<1e-4

Code versions

List versions only if relevant