Skip to content
ForCADDocumentation

gradient_sensitivity Subroutine

public pure subroutine gradient_sensitivity(basis, gradient, q, Xc, ids, valid, dgradient_dXc, dgradient_dlogWc, param_gradient)

Design derivatives of the ambient physical basis gradients at fixed parameters. Write N=I-QQ^T, h_ab=g_a dot g_b, and v_b=P_b-X. Then d g_a/d P_bj = h_ab N(:,j) - g_b g_aj, including changes of the tangent plane. The log-weight derivative contracts this tensor against v_b and adds (delta_ab-R_a)g_b from differentiating the rational basis.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in) :: basis(:)
real(kind=rk), intent(in) :: gradient(:,:)
real(kind=rk), intent(in) :: q(:,:)
real(kind=rk), intent(in) :: Xc(:,:)
integer, intent(in), optional :: ids(:)
logical, intent(out) :: valid
real(kind=rk), intent(out), optional :: dgradient_dXc(:,:,:,:)
real(kind=rk), intent(out), optional :: dgradient_dlogWc(:,:,:)
real(kind=rk), intent(in), optional :: param_gradient(:,:)