This PR introduces routines for the calculation of partial derivatives of density profiles with respect to chemical potential, pressure, and temperature. Since the calculation of the density profiles is implicit, a procedure similiar to that used in the Newton solver is used. The derivatives are calculated analytically using automatic differentiation. Therefore, the calculation is faster and more robust compared to approximating the profiles using numerical differentiation.
With the derivatives in place, enthalpies of adsorption should be readily available. In addition, the derivatives can be used to generate better initial values for the calculation of adsorption isotherms or surface tension diagrams.
While derivatives with respect to $p$ or $\mu$ are also available for heterosegmented functionals, temperature derivatives currently can not be implemented without breaking the interface.
This PR introduces routines for the calculation of partial derivatives of density profiles with respect to chemical potential, pressure, and temperature. Since the calculation of the density profiles is implicit, a procedure similiar to that used in the Newton solver is used. The derivatives are calculated analytically using automatic differentiation. Therefore, the calculation is faster and more robust compared to approximating the profiles using numerical differentiation.
With the derivatives in place, enthalpies of adsorption should be readily available. In addition, the derivatives can be used to generate better initial values for the calculation of adsorption isotherms or surface tension diagrams.
While derivatives with respect to $p$ or $\mu$ are also available for heterosegmented functionals, temperature derivatives currently can not be implemented without breaking the interface.