diff --git a/tests/pdegen/mld_d_pde2d.f90 b/tests/pdegen/mld_d_pde2d.f90 index 1c35cb52..e1b1bde9 100644 --- a/tests/pdegen/mld_d_pde2d.f90 +++ b/tests/pdegen/mld_d_pde2d.f90 @@ -92,20 +92,30 @@ contains ! ! functions parametrizing the differential equation - ! + ! + + ! + ! Note: b1 and b2 are the coefficients of the first + ! derivative of the unknown function. The default + ! we apply here is to have them zero, so that the resulting + ! matrix is symmetric/hermitian and suitable for + ! testing with CG and FCG. + ! When testing methods for non-hermitian matrices you can + ! change the B1/B2 functions to e.g. done/sqrt((2*done)) + ! function b1(x,y) use psb_base_mod, only : psb_dpk_, done, dzero implicit none real(psb_dpk_) :: b1 real(psb_dpk_), intent(in) :: x,y - b1=done/sqrt((2*done)) + b1=dzero end function b1 function b2(x,y) use psb_base_mod, only : psb_dpk_, done, dzero implicit none real(psb_dpk_) :: b2 real(psb_dpk_), intent(in) :: x,y - b2=done/sqrt((2*done)) + b2=dzero end function b2 function c(x,y) use psb_base_mod, only : psb_dpk_, done, dzero diff --git a/tests/pdegen/mld_d_pde3d.f90 b/tests/pdegen/mld_d_pde3d.f90 index 50c77756..e8a85631 100644 --- a/tests/pdegen/mld_d_pde3d.f90 +++ b/tests/pdegen/mld_d_pde3d.f90 @@ -95,26 +95,36 @@ contains ! ! functions parametrizing the differential equation ! + + ! + ! Note: b1, b2 and b3 are the coefficients of the first + ! derivative of the unknown function. The default + ! we apply here is to have them zero, so that the resulting + ! matrix is symmetric/hermitian and suitable for + ! testing with CG and FCG. + ! When testing methods for non-hermitian matrices you can + ! change the B1/B2/B3 functions to e.g. done/sqrt((3*done)) + ! function b1(x,y,z) use psb_base_mod, only : psb_dpk_, done, dzero implicit none real(psb_dpk_) :: b1 real(psb_dpk_), intent(in) :: x,y,z - b1=done/sqrt((3*done)) + b1=dzero end function b1 function b2(x,y,z) use psb_base_mod, only : psb_dpk_, done, dzero implicit none real(psb_dpk_) :: b2 real(psb_dpk_), intent(in) :: x,y,z - b2=done/sqrt((3*done)) + b2=dzero end function b2 function b3(x,y,z) use psb_base_mod, only : psb_dpk_, done, dzero implicit none real(psb_dpk_) :: b3 real(psb_dpk_), intent(in) :: x,y,z - b3=done/sqrt((3*done)) + b3=dzero end function b3 function c(x,y,z) use psb_base_mod, only : psb_dpk_, done, dzero diff --git a/tests/pdegen/mld_s_pde2d.f90 b/tests/pdegen/mld_s_pde2d.f90 index cf30ffdb..6d8abb14 100644 --- a/tests/pdegen/mld_s_pde2d.f90 +++ b/tests/pdegen/mld_s_pde2d.f90 @@ -92,20 +92,30 @@ contains ! ! functions parametrizing the differential equation - ! + ! + + ! + ! Note: b1 and b2 are the coefficients of the first + ! derivative of the unknown function. The default + ! we apply here is to have them zero, so that the resulting + ! matrix is symmetric/hermitian and suitable for + ! testing with CG and FCG. + ! When testing methods for non-hermitian matrices you can + ! change the B1/B2 functions to e.g. sone/sqrt((2*sone)) + ! function b1(x,y) use psb_base_mod, only : psb_spk_, sone, szero implicit none real(psb_spk_) :: b1 real(psb_spk_), intent(in) :: x,y - b1=sone/sqrt((2*sone)) + b1=szero end function b1 function b2(x,y) use psb_base_mod, only : psb_spk_, sone, szero implicit none real(psb_spk_) :: b2 real(psb_spk_), intent(in) :: x,y - b2=sone/sqrt((2*sone)) + b2=szero end function b2 function c(x,y) use psb_base_mod, only : psb_spk_, sone, szero diff --git a/tests/pdegen/mld_s_pde3d.f90 b/tests/pdegen/mld_s_pde3d.f90 index 540ea723..26d318a7 100644 --- a/tests/pdegen/mld_s_pde3d.f90 +++ b/tests/pdegen/mld_s_pde3d.f90 @@ -95,26 +95,36 @@ contains ! ! functions parametrizing the differential equation ! + + ! + ! Note: b1, b2 and b3 are the coefficients of the first + ! derivative of the unknown function. The default + ! we apply here is to have them zero, so that the resulting + ! matrix is symmetric/hermitian and suitable for + ! testing with CG and FCG. + ! When testing methods for non-hermitian matrices you can + ! change the B1/B2/B3 functions to e.g. sone/sqrt((3*sone)) + ! function b1(x,y,z) use psb_base_mod, only : psb_spk_, sone, szero implicit none real(psb_spk_) :: b1 real(psb_spk_), intent(in) :: x,y,z - b1=sone/sqrt((3*sone)) + b1=szero end function b1 function b2(x,y,z) use psb_base_mod, only : psb_spk_, sone, szero implicit none real(psb_spk_) :: b2 real(psb_spk_), intent(in) :: x,y,z - b2=sone/sqrt((3*sone)) + b2=szero end function b2 function b3(x,y,z) use psb_base_mod, only : psb_spk_, sone, szero implicit none real(psb_spk_) :: b3 real(psb_spk_), intent(in) :: x,y,z - b3=sone/sqrt((3*sone)) + b3=szero end function b3 function c(x,y,z) use psb_base_mod, only : psb_spk_, sone, szero