mod_chain¶
A module to store functions that calculate chain derivatives. author: Alexander Knoll, Moritz R. Schäfer
Dependencies¶
Procedures Summary¶
| Name | Type | Description |
|---|---|---|
chain_rule_outprod |
Subroutine | Calculate the outer product of a chain derivative For a given property x(z, y(z)), with given... |
Procedure Details¶
subroutine chain_rule_outprod¶
subroutine chain_rule_outprod( &
dx_dy, &
dy_dz, &
dx_dz, &
lnegative &
)
Calculate the outer product of a chain derivative
For a given property x(z, y(z)), with given full derivative dx/dz = dl_x_dl_z + dl_x_dl_y dl_y_dl_z where dl denotes the partial derivative \(\dell\), this procedure calculates the second sum in the expression which is the outer product of the chain rule. The elements vectors which are derived are the first dimension of the dx_dz array.
Arguments
-
dx_dy: real(DP) (dim: (:)) [in]– The partial derivative of x with respect to (a vector) y. -
dy_dz: real(DP) (dim: (size(dx_dz,1),size(dx_dz,2),size(dx_dy))) [in]– The partial derivative of (the vector) y with respect to (the matrix) z. -
dx_dz: real(DP) (dim: (:,:)) [inout]– On input, the partial derivative of x with respect to (a matrix) z. On output, the full derivative of x with respect to z. -
lnegative: logical [in]– if true, subtract the outer product, else add it.
Called By