Test solveLU to verify operation
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
subroutine testLU
!! Test solveLU to verify operation
real(wp),dimension(:,:),allocatable::A
real(wp),dimension(:),allocatable::x,b,bc
integer::N
do N=2,100
if(allocated(A)) deallocate(A)
if(allocated(b)) deallocate(b)
allocate( A(N,N) , b(N) )
call random_number(A)
call random_number(b)
x = solveLU(A,b)
bc = matmul(A,x)
if( norm2(bc-b)>1.0E-10_wp ) stop 'solveLU Failed'
end do
end subroutine testLU