From b85c14fafedae382b10029d1d26cd444eaeb56e8 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Mon, 14 May 2018 15:09:01 +0100 Subject: [PATCH] Merge fixes to test programs. --- test/pargen/psb_d_pde2d.f90 | 16 +++++++++++++--- test/pargen/psb_d_pde3d.f90 | 16 +++++++++++++--- test/pargen/psb_s_pde2d.f90 | 16 +++++++++++++--- test/pargen/psb_s_pde3d.f90 | 16 +++++++++++++--- 4 files changed, 52 insertions(+), 12 deletions(-) diff --git a/test/pargen/psb_d_pde2d.f90 b/test/pargen/psb_d_pde2d.f90 index 00fd7061..693cd3d5 100644 --- a/test/pargen/psb_d_pde2d.f90 +++ b/test/pargen/psb_d_pde2d.f90 @@ -88,20 +88,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/test/pargen/psb_d_pde3d.f90 b/test/pargen/psb_d_pde3d.f90 index a6fbad78..eea7fa2b 100644 --- a/test/pargen/psb_d_pde3d.f90 +++ b/test/pargen/psb_d_pde3d.f90 @@ -91,26 +91,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/test/pargen/psb_s_pde2d.f90 b/test/pargen/psb_s_pde2d.f90 index be487e17..3a7d4877 100644 --- a/test/pargen/psb_s_pde2d.f90 +++ b/test/pargen/psb_s_pde2d.f90 @@ -88,20 +88,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/test/pargen/psb_s_pde3d.f90 b/test/pargen/psb_s_pde3d.f90 index 19d880ba..0c01402a 100644 --- a/test/pargen/psb_s_pde3d.f90 +++ b/test/pargen/psb_s_pde3d.f90 @@ -91,26 +91,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