def compute_dK_mean_dh(A, R, dA_dh, dR_dh, n_manning): return 0.5/n_manning*(dA_dh*R**(2/3) + 2/3*A/R**(1/3)*dR_dh) # friction term is high and constant. This makes ...
Indeed, depending on the current evaluation mode (forward or reverse), a variable in AutoDiff can be interpreted precisely as a particular mathematical function.