diff --git a/base/modules/psb_d_mat_mod.f90 b/base/modules/psb_d_mat_mod.f90 index b2ac7bb4..b6276558 100644 --- a/base/modules/psb_d_mat_mod.f90 +++ b/base/modules/psb_d_mat_mod.f90 @@ -44,7 +44,7 @@ ! the functionalities to have the encapsulated class change its ! type dynamically, and to extract/input an inner object. ! -! A sparse matric has a state corresponding to its progression +! A sparse matrix has a state corresponding to its progression ! through the application life. ! In particular, computational methods can only be invoked when ! the matrix is in the ASSEMBLED state, whereas the other states are diff --git a/base/modules/psb_serial_mod.f90 b/base/modules/psb_serial_mod.f90 index cec82b12..2d7776c4 100644 --- a/base/modules/psb_serial_mod.f90 +++ b/base/modules/psb_serial_mod.f90 @@ -44,6 +44,10 @@ module psb_serial_mod module procedure psb_snrm1, psb_dnrm1, psb_cnrm1, psb_znrm1 end interface psb_nrm1 + interface psb_minreal + module procedure psb_sminreal, psb_dminreal, psb_cminreal, psb_zminreal + end interface psb_minreal + interface psb_amax function psb_samax_s(n, x) result(val) import :: psb_ipk_, psb_spk_, psb_dpk_ @@ -561,6 +565,30 @@ contains res = abs( real( x ) ) + abs( aimag( x ) ) end function psb_znrm1 + elemental function psb_sminreal(x) result(res) + real(psb_spk_), intent(in) :: x + real(psb_spk_) :: res + res = ( x ) + end function psb_sminreal + + elemental function psb_dminreal(x) result(res) + real(psb_dpk_), intent(in) :: x + real(psb_dpk_) :: res + res = ( x ) + end function psb_dminreal + + elemental function psb_cminreal(x) result(res) + complex(psb_spk_), intent(in) :: x + real(psb_spk_) :: res + res = min( real( x ) , aimag( x ) ) + end function psb_cminreal + + elemental function psb_zminreal(x) result(res) + complex(psb_dpk_), intent(in) :: x + real(psb_dpk_) :: res + res = min( real( x ) , aimag( x ) ) + end function psb_zminreal + subroutine crot( n, cx, incx, cy, incy, c, s ) !