From c53b692d0eec120c57ac93d001ec331aaf4eca96 Mon Sep 17 00:00:00 2001 From: Tim Kelley Date: Sun, 19 Nov 2023 13:11:34 -0500 Subject: [PATCH] Test 3 for MPGArray --- src/Factorizations/mpglu!.jl | 18 ------------------ test/DetailsTest/mplu_test.jl | 4 ++-- test/GM-IRTest/hvse.jl | 2 +- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/Factorizations/mpglu!.jl b/src/Factorizations/mpglu!.jl index 60f09271..2f83415f 100644 --- a/src/Factorizations/mpglu!.jl +++ b/src/Factorizations/mpglu!.jl @@ -22,24 +22,6 @@ MPF=MPGEFact(AH, AL, ALF, VStore, KStore, res, true) return MPF end -function mpglu!(MPH::MPArray; basissize=10) -AH = MPH.AH -TD = eltype(AH) -res = MPH.residual -n=length(res) -AL = MPH.AL - TL = eltype(AL) - # - # Factor in low precision - # - (TL == Float16) ? ALF = hlu!(AL) : ALF = lu!(AL) - # -VStore=zeros(TD, n, basissize) -KStore=kstore(n,"gmres") -MPF=MPGEFact(AH, AL, ALF, VStore, KStore, res, true) -return MPF -end - """ mpglu(A::Array{TH,2}; TL=Float32, basissize=10) where TH <: Real diff --git a/test/DetailsTest/mplu_test.jl b/test/DetailsTest/mplu_test.jl index 85b9eeaf..2340aac2 100644 --- a/test/DetailsTest/mplu_test.jl +++ b/test/DetailsTest/mplu_test.jl @@ -26,14 +26,14 @@ mpglu_test() Make sure that mpglu and mpglu! do what they are supposed to do """ function mpglu_test() -AD=rand(10,10); MPD=MPArray(AD); MPF1=mpglu!(MPD); MPF2=mpglu(AD); +AD=rand(10,10); MPD=MPGArray(AD); MPF1=mpglu!(MPD); MPF2=mpglu(AD); eq64=test_eq(MPF1,MPF2) eq64 || println("mpglu t1 fails") ADx=rand(10,10); MPDx=MPGArray(ADx; TL=Float16); MPF1x=mpglu!(MPDx); MPF2x=mpglu(ADx; TL=Float16); eq64x=test_eq(MPF1x,MPF2x) eq64x || println("mpglu t2 fails") -AS=Float32.(AD); MPS=MPArray(AS); MSF1=mpglu!(MPS); MSF2=mpglu(AS) +AS=Float32.(AD); MPS=MPGArray(AS); MSF1=mpglu!(MPS); MSF2=mpglu(AS) eq32=test_eq(MSF1,MSF2) eq32 || println("mpglu t3 fails") mpgluok = (eq64 && eq64x && eq32) diff --git a/test/GM-IRTest/hvse.jl b/test/GM-IRTest/hvse.jl index dc636705..e68c1ee7 100644 --- a/test/GM-IRTest/hvse.jl +++ b/test/GM-IRTest/hvse.jl @@ -13,7 +13,7 @@ end function unitt(N) A64=I - 800.0*Gmat(N) A=Float32.(A64) -MPA=MPArray(A) +MPA=MPGArray(A) MPF=mpglu!(MPA) MPH=MPHArray(A) MPHF=mpglu!(MPH)