File: src/c/cores/controlvalidation_core.cpp:201
Code:
codi_global.setGradient(0, 1.0); // TODO: This is different form J. Also: Only one output is seeded and not all.
When validating gradients with CoDiPack, only output index 0 is seeded with weight 1.0.
For inversions with multi-component cost functions (e.g. combined velocity + thickness misfits),
the gradient check is incomplete — it tests only the first dependent, not the full Jacobian row.
ADOL-C handles this more carefully with per-dependent registration. The CoDiPack path needs
equivalent treatment, otherwise controlvalidation may silently pass on incorrect gradients.
Impact: High — affects correctness of AD gradient validation for all multi-objective inversions.
File:
src/c/cores/controlvalidation_core.cpp:201Code:
When validating gradients with CoDiPack, only output index 0 is seeded with weight 1.0.
For inversions with multi-component cost functions (e.g. combined velocity + thickness misfits),
the gradient check is incomplete — it tests only the first dependent, not the full Jacobian row.
ADOL-C handles this more carefully with per-dependent registration. The CoDiPack path needs
equivalent treatment, otherwise controlvalidation may silently pass on incorrect gradients.
Impact: High — affects correctness of AD gradient validation for all multi-objective inversions.