grid_tools 1.14.0
|
Public Member Functions | |
subroutine | sqrtsym2 (em, z) |
Get the sqrt of a symmetric positive-definite 2*2 matrix. | |
subroutine | sqrtsym2d (x, z, zd) |
General routine to evaluate z=sqrt(x), and the symmetric derivative, zd = dz/dx, where x is a symmetric 2*2 positive-definite matrix. | |
subroutine psym2::sqrtsym2::sqrtsym2 | ( | real(dp), dimension(2,2), intent(in) | em, |
real(dp), dimension(2,2), intent(out) | z ) |
subroutine psym2::sqrtsym2::sqrtsym2d | ( | real(dp), dimension(2,2), intent(in) | x, |
real(dp), dimension(2,2), intent(out) | z, | ||
real(dp), dimension(2,2,2,2), intent(out) | zd ) |
General routine to evaluate z=sqrt(x), and the symmetric derivative, zd = dz/dx, where x is a symmetric 2*2 positive-definite matrix.
If the eigenvalues are very close together, extract their geometric mean for "preconditioning" a scaled version, px, of x, whose sqrt, and hence its derivative, can be easily obtained by the series expansion method. Otherwise, use the eigen-method (which entails dividing by the difference in the eignevalues to get zd, and which therefore fails when the eigenvalues become too similar).
[in] | x | symmetric 2*2 positive-definite matrix |
[out] | z | sqrt(x) result |
[out] | zd | symmetric derivative |
Definition at line 176 of file psym2.f90.
References pietc::u1.