To use ForwardDiff during nlsolve for either the homotopy or relaxation algorithms, we need to choose the chunk size appropriately so that, when re-interpreting arrays to be able to use caches, we will not get a "cannot reinterpret" error b/c "the resulting array would have non-integral first dimension." The problem is that different caches have different sizes (sometimes it's a vector and sometimes a matrix) and the inputs have different lengths, depending on whether you want to use homotopy or relaxation. The input variables are z, y, and/or Psi, which have dimensions Nz, Ny, and Nz * Ny, respectively. For homotopy, all three are inputs, but for relaxation, only z and y will be inputs. My understanding of chunk sizes doesn't seem to be entirely correct, so I'm having difficulty.
One approach is, whenever using homotopy or relaxation, we add an option to recalculate the chunk size so we can specialize for homotopy and relaxation.
To use ForwardDiff during nlsolve for either the homotopy or relaxation algorithms, we need to choose the chunk size appropriately so that, when re-interpreting arrays to be able to use caches, we will not get a "cannot reinterpret" error b/c "the resulting array would have non-integral first dimension." The problem is that different caches have different sizes (sometimes it's a vector and sometimes a matrix) and the inputs have different lengths, depending on whether you want to use homotopy or relaxation. The input variables are
z
,y
, and/orPsi
, which have dimensionsNz
,Ny
, andNz * Ny
, respectively. For homotopy, all three are inputs, but for relaxation, onlyz
andy
will be inputs. My understanding of chunk sizes doesn't seem to be entirely correct, so I'm having difficulty.One approach is, whenever using homotopy or relaxation, we add an option to recalculate the chunk size so we can specialize for homotopy and relaxation.