From e7522ef81194fe2335a3b285aba414e3dcd377ed Mon Sep 17 00:00:00 2001 From: Dakshina Ilangovan Date: Wed, 18 Feb 2015 20:57:26 -0600 Subject: [PATCH] modified filtered_matrix tests to work with square matrices only modified filtered_matrix tests to work with square matrices only --- tests/lac/filtered_matrix_01.cc | 18 ++++++++++-------- tests/lac/filtered_matrix_01.output | 4 ++-- tests/lac/filtered_matrix_02.cc | 17 ++++++++++------- tests/lac/filtered_matrix_02.output | 4 ++-- tests/lac/filtered_matrix_03.cc | 18 ++++++++++-------- tests/lac/filtered_matrix_03.output | 4 ++-- tests/lac/filtered_matrix_04.cc | 17 ++++++++++------- tests/lac/filtered_matrix_04.output | 4 ++-- 8 files changed, 48 insertions(+), 38 deletions(-) diff --git a/tests/lac/filtered_matrix_01.cc b/tests/lac/filtered_matrix_01.cc index 014215fc70..ea46757e2f 100644 --- a/tests/lac/filtered_matrix_01.cc +++ b/tests/lac/filtered_matrix_01.cc @@ -51,17 +51,19 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 1, 2, 3, 4, 5, 6 }; + { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; - FullMatrix A(2, 3); + FullMatrix A(3, 3); A.fill(Adata); - Vector V(3); - V(0) = 1; - V(1) = 2; - V(2) = 3; + Vector V1(3); + Vector V2(3); - checkVmult(A, V, false); - checkVmult(A, V, true); + V1(0) = V2(0) = 1; + V1(1) = V2(1) = 2; + V1(2) = V2(2) = 3; + + checkVmult(A, V1, false); + checkVmult(A, V2, true); } diff --git a/tests/lac/filtered_matrix_01.output b/tests/lac/filtered_matrix_01.output index 4f082a076e..e893ffef71 100644 --- a/tests/lac/filtered_matrix_01.output +++ b/tests/lac/filtered_matrix_01.output @@ -1,5 +1,5 @@ DEAL::vmult -DEAL::1.0000 28.0000 +DEAL::1.0000 28.0000 43.0000 DEAL::vmult -DEAL::1.0000 32.0000 +DEAL::1.0000 32.0000 50.0000 diff --git a/tests/lac/filtered_matrix_02.cc b/tests/lac/filtered_matrix_02.cc index ac432c2712..3c526af9f6 100644 --- a/tests/lac/filtered_matrix_02.cc +++ b/tests/lac/filtered_matrix_02.cc @@ -51,16 +51,19 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 1, 2, 3, 4, 5, 6 }; + { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; - FullMatrix A(2, 3); + FullMatrix A(3, 3); A.fill(Adata); - Vector V(2); - V(0) = 1; - V(1) = 2; + Vector V1(3); + Vector V2(3); - checkTvmult(A, V, false); - checkTvmult(A, V, true); + V1(0) = V2(0) = 1; + V1(1) = V2(1) = 2; + V1(2) = V2(2) = 3; + + checkTvmult(A, V1, false); + checkTvmult(A, V2, true); } diff --git a/tests/lac/filtered_matrix_02.output b/tests/lac/filtered_matrix_02.output index 27e7f6bec6..5c3f2bee78 100644 --- a/tests/lac/filtered_matrix_02.output +++ b/tests/lac/filtered_matrix_02.output @@ -1,5 +1,5 @@ DEAL::Tvmult -DEAL::1.0000 10.0000 12.0000 +DEAL::1.0000 34.0000 39.0000 DEAL::Tvmult -DEAL::1.0000 12.0000 15.0000 +DEAL::1.0000 36.0000 42.0000 diff --git a/tests/lac/filtered_matrix_03.cc b/tests/lac/filtered_matrix_03.cc index e42ab6bc22..7152945928 100644 --- a/tests/lac/filtered_matrix_03.cc +++ b/tests/lac/filtered_matrix_03.cc @@ -55,17 +55,19 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 1, 2, 3, 4, 5, 6 }; + { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; - FullMatrix A(2, 3); + FullMatrix A(3, 3); A.fill(Adata); - Vector V(3); - V(0) = 1; - V(1) = 2; - V(2) = 3; + Vector V1(3); + Vector V2(3); - checkVmult_Add(A, V, false); - checkVmult_Add(A, V, true); + V1(0) = V2(0) = 1; + V1(1) = V2(1) = 2; + V1(2) = V2(2) = 3; + + checkVmult_Add(A, V1, false); + checkVmult_Add(A, V2, true); } diff --git a/tests/lac/filtered_matrix_03.output b/tests/lac/filtered_matrix_03.output index 1bbc0b2bd0..9ea8103a31 100644 --- a/tests/lac/filtered_matrix_03.output +++ b/tests/lac/filtered_matrix_03.output @@ -1,5 +1,5 @@ DEAL::vmult_add -DEAL::1.0000 29.0000 +DEAL::1.0000 29.0000 44.0000 DEAL::vmult_add -DEAL::1.0000 33.0000 +DEAL::1.0000 33.0000 51.0000 diff --git a/tests/lac/filtered_matrix_04.cc b/tests/lac/filtered_matrix_04.cc index 1f74844e39..648793a947 100644 --- a/tests/lac/filtered_matrix_04.cc +++ b/tests/lac/filtered_matrix_04.cc @@ -55,16 +55,19 @@ main() deallog.threshold_double(1.e-10); const double Adata[] = - { 1, 2, 3, 4, 5, 6 }; + { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; - FullMatrix A(2, 3); + FullMatrix A(3, 3); A.fill(Adata); - Vector V(2); - V(0) = 1; - V(1) = 2; + Vector V1(3); + Vector V2(3); - checkTvmult_Add(A, V, false); - checkTvmult_Add(A, V, true); + V1(0) = V2(0) = 1; + V1(1) = V2(1) = 2; + V1(2) = V2(2) = 3; + + checkTvmult_Add(A, V1, false); + checkTvmult_Add(A, V2, true); } diff --git a/tests/lac/filtered_matrix_04.output b/tests/lac/filtered_matrix_04.output index 8683f40500..b455ab3529 100644 --- a/tests/lac/filtered_matrix_04.output +++ b/tests/lac/filtered_matrix_04.output @@ -1,5 +1,5 @@ DEAL::Tvmult_add -DEAL::1.0000 11.0000 13.0000 +DEAL::1.0000 35.0000 40.0000 DEAL::Tvmult_add -DEAL::1.0000 13.0000 16.0000 +DEAL::1.0000 37.0000 43.0000 -- 2.39.5