I want to use the ForwardDiff package to perform automatic differentiation of a function. However, this function requires an structure in which I am declaring like this:
One option is to construct (and deconstruct) a vector with those numbers, and call that from ForwardDiff. but they are all of different types? Maybe parametrizing with one type can help
I do not think this will help. The structure is something that is used inside a complicated algorithm. Those are not the values I want to differentiate. The problem is that, when the structure is allocated, some are dual numbers and some are not.
It is very difficult to provide a MWE because it is the SGP4 propagator. The code is big, and I am not sure where the error is created. I only know that using a different type for each variable solves the problem.