From: dakshinai Date: Fri, 19 Sep 2014 23:40:55 +0000 (-0500) Subject: Test lac/SchurMatrix; Indented X-Git-Tag: v8.2.0-rc1~137^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65f8d68bdec6ef638a13099f50df97e1b41c9283;p=dealii.git Test lac/SchurMatrix; Indented --- diff --git a/tests/lac/schur_matrix_01.cc b/tests/lac/schur_matrix_01.cc index 00dfccd9e6..0652431890 100644 --- a/tests/lac/schur_matrix_01.cc +++ b/tests/lac/schur_matrix_01.cc @@ -26,24 +26,24 @@ #include template - void - checkVmult(BlockVector &dst, const BlockVector &src, - const MA_inverse &Ainv, const MB &B, const MDt &Dt, const MC &C) - { - deallog << "vmult" << std::endl; +void +checkVmult(BlockVector &dst, const BlockVector &src, + const MA_inverse &Ainv, const MB &B, const MDt &Dt, const MC &C) +{ + deallog << "vmult" << std::endl; - GrowingVectorMemory < BlockVector > mem; + GrowingVectorMemory < BlockVector > mem; - SchurMatrix S(Ainv, B, Dt, C, mem); + SchurMatrix S(Ainv, B, Dt, C, mem); - S.debug_level(1); + S.debug_level(1); - S.vmult(dst, src); + S.vmult(dst, src); - for (unsigned int i = 0; i < dst.size(); ++i) - deallog << dst(i) << '\t'; - deallog << std::endl; - } + for (unsigned int i = 0; i < dst.size(); ++i) + deallog << dst(i) << '\t'; + deallog << std::endl; +} int main() @@ -59,38 +59,38 @@ main() ivector[0] = 1; double array[] = - { 2 }; + { 2 }; std::list l(&array[0], &array[1]); BlockVector src(ivector, l.begin(), l.end()); BlockVector dst(ivector); const double Adata1[] = - { 1 }; + { 1 }; const double Adata2[] = - { 2 }; + { 2 }; const double Adata3[] = - { 4 }; + { 4 }; const double Adata4[] = - { 5 }; + { 5 }; const double Ddata1[] = - { 3 }; + { 3 }; const double Ddata2[] = - { 6 }; + { 6 }; const double Bdata1[] = - { 7 }; + { 7 }; const double Bdata2[] = - { 8 }; + { 8 }; const double Cdata[] = - { 9 }; + { 9 }; FullMatrix MA1(1, 1); FullMatrix MA2(1, 1); @@ -128,6 +128,6 @@ main() Dt.enter(MD2, 0, 1); checkVmult, BlockMatrixArray, - BlockMatrixArray, BlockMatrixArray >(dst, src, Ainv, B, - Dt, C); + BlockMatrixArray, BlockMatrixArray >(dst, src, Ainv, B, + Dt, C); } diff --git a/tests/lac/schur_matrix_02.cc b/tests/lac/schur_matrix_02.cc index def0f27152..27cbd71872 100644 --- a/tests/lac/schur_matrix_02.cc +++ b/tests/lac/schur_matrix_02.cc @@ -26,21 +26,21 @@ #include template - void - checkResidual(BlockVector &dst, const BlockVector &src, - const BlockVector &rhs, const MA_inverse &Ainv, const MB &B, - const MDt &Dt, const MC &C) - { - deallog << "residual" << std::endl; +void +checkResidual(BlockVector &dst, const BlockVector &src, + const BlockVector &rhs, const MA_inverse &Ainv, const MB &B, + const MDt &Dt, const MC &C) +{ + deallog << "residual" << std::endl; - GrowingVectorMemory < BlockVector > mem; + GrowingVectorMemory < BlockVector > mem; - SchurMatrix S(Ainv, B, Dt, C, mem); + SchurMatrix S(Ainv, B, Dt, C, mem); - double r = S.residual(dst, src, rhs); + double r = S.residual(dst, src, rhs); - deallog << "Residual:" << r << std::endl; - } + deallog << "Residual:" << r << std::endl; +} int main() @@ -56,43 +56,43 @@ main() ivector[0] = 1; double src_array[] = - { 2 }; + { 2 }; std::list src_l(&src_array[0], &src_array[1]); BlockVector src(ivector, src_l.begin(), src_l.end()); double rhs_array[] = - { 1000 }; + { 1000 }; std::list rhs_l(&rhs_array[0], &rhs_array[1]); BlockVector rhs(ivector, rhs_l.begin(), rhs_l.end()); BlockVector dst(ivector); const double Adata1[] = - { 1 }; + { 1 }; const double Adata2[] = - { 2 }; + { 2 }; const double Adata3[] = - { 4 }; + { 4 }; const double Adata4[] = - { 5 }; + { 5 }; const double Ddata1[] = - { 3 }; + { 3 }; const double Ddata2[] = - { 6 }; + { 6 }; const double Bdata1[] = - { 7 }; + { 7 }; const double Bdata2[] = - { 8 }; + { 8 }; const double Cdata[] = - { 9 }; + { 9 }; FullMatrix MA1(1, 1); FullMatrix MA2(1, 1); @@ -130,7 +130,7 @@ main() Dt.enter(MD2, 0, 1); checkResidual, BlockMatrixArray, - BlockMatrixArray, BlockMatrixArray >(dst, src, rhs, Ainv, - B, Dt, C); + BlockMatrixArray, BlockMatrixArray >(dst, src, rhs, Ainv, + B, Dt, C); } diff --git a/tests/lac/schur_matrix_03.cc b/tests/lac/schur_matrix_03.cc index e245493328..4056b50bee 100644 --- a/tests/lac/schur_matrix_03.cc +++ b/tests/lac/schur_matrix_03.cc @@ -26,21 +26,21 @@ #include template - void - checkPrepare_rhs(BlockVector &dst, const BlockVector &src, - const MA_inverse &Ainv, const MB &B, const MDt &Dt, const MC &C) - { - deallog << "prepare_rhs" << std::endl; +void +checkPrepare_rhs(BlockVector &dst, const BlockVector &src, + const MA_inverse &Ainv, const MB &B, const MDt &Dt, const MC &C) +{ + deallog << "prepare_rhs" << std::endl; - GrowingVectorMemory < BlockVector > mem; + GrowingVectorMemory < BlockVector > mem; - SchurMatrix S(Ainv, B, Dt, C, mem); + SchurMatrix S(Ainv, B, Dt, C, mem); - S.debug_level(1); + S.debug_level(1); - S.prepare_rhs(dst, src); + S.prepare_rhs(dst, src); - } +} int main() @@ -57,7 +57,7 @@ main() ivector[1] = 1; double src_array[] = - { 9, 21 }; + { 9, 21 }; std::list src_l(&src_array[0], &src_array[2]); BlockVector src(ivector, src_l.begin(), src_l.end()); @@ -65,36 +65,36 @@ main() ivector2[0] = 1; double dst_array[] = - { 2 }; + { 2 }; std::list dst_l(&dst_array[0], &dst_array[1]); BlockVector dst(ivector2, dst_l.begin(), dst_l.end()); const double Adata1[] = - { 1 }; + { 1 }; const double Adata2[] = - { 2 }; + { 2 }; const double Adata3[] = - { 4 }; + { 4 }; const double Adata4[] = - { 5 }; + { 5 }; const double Ddata1[] = - { 3 }; + { 3 }; const double Ddata2[] = - { 6 }; + { 6 }; const double Bdata1[] = - { 7 }; + { 7 }; const double Bdata2[] = - { 8 }; + { 8 }; const double Cdata[] = - { 9 }; + { 9 }; FullMatrix MA1(1, 1); FullMatrix MA2(1, 1); @@ -132,7 +132,7 @@ main() Dt.enter(MD2, 0, 1); checkPrepare_rhs, BlockMatrixArray, - BlockMatrixArray, BlockMatrixArray >(dst, src, Ainv, B, - Dt, C); + BlockMatrixArray, BlockMatrixArray >(dst, src, Ainv, B, + Dt, C); } diff --git a/tests/lac/schur_matrix_04.cc b/tests/lac/schur_matrix_04.cc index 0774c31ae2..010e376ede 100644 --- a/tests/lac/schur_matrix_04.cc +++ b/tests/lac/schur_matrix_04.cc @@ -26,21 +26,21 @@ #include template - void - checkPostprocess(BlockVector &dst, const BlockVector &src, - const BlockVector &rhs, const MA_inverse &Ainv, const MB &B, - const MDt &Dt, const MC &C) - { - deallog << "postprocess" << std::endl; +void +checkPostprocess(BlockVector &dst, const BlockVector &src, + const BlockVector &rhs, const MA_inverse &Ainv, const MB &B, + const MDt &Dt, const MC &C) +{ + deallog << "postprocess" << std::endl; - GrowingVectorMemory < BlockVector > mem; + GrowingVectorMemory < BlockVector > mem; - SchurMatrix S(Ainv, B, Dt, C, mem); + SchurMatrix S(Ainv, B, Dt, C, mem); - S.debug_level(1); + S.debug_level(1); - S.postprocess(dst, src, rhs); - } + S.postprocess(dst, src, rhs); +} int main() @@ -57,7 +57,7 @@ main() ivector[1] = 1; double rhs_array[] = - { 9, 21 }; + { 9, 21 }; std::list rhs_l(&rhs_array[0], &rhs_array[2]); BlockVector rhs(ivector, rhs_l.begin(), rhs_l.end()); @@ -65,38 +65,38 @@ main() ivector2[0] = 1; double src_array[] = - { 2 }; + { 2 }; std::list src_l(&src_array[0], &src_array[1]); BlockVector src(ivector2, src_l.begin(), src_l.end()); BlockVector dst(ivector); const double Adata1[] = - { 1 }; + { 1 }; const double Adata2[] = - { 2 }; + { 2 }; const double Adata3[] = - { 4 }; + { 4 }; const double Adata4[] = - { 5 }; + { 5 }; const double Ddata1[] = - { 3 }; + { 3 }; const double Ddata2[] = - { 6 }; + { 6 }; const double Bdata1[] = - { 7 }; + { 7 }; const double Bdata2[] = - { 8 }; + { 8 }; const double Cdata[] = - { 9 }; + { 9 }; FullMatrix MA1(1, 1); FullMatrix MA2(1, 1); @@ -134,7 +134,7 @@ main() Dt.enter(MD2, 0, 1); checkPostprocess, BlockMatrixArray, - BlockMatrixArray, BlockMatrixArray >(dst, src, rhs, Ainv, - B, Dt, C); + BlockMatrixArray, BlockMatrixArray >(dst, src, rhs, Ainv, + B, Dt, C); }