From: Yimin Jin Date: Sat, 20 Jan 2024 09:16:08 +0000 (+0800) Subject: change the test output X-Git-Tag: relicensing~126^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16489%2Fhead;p=dealii.git change the test output --- diff --git a/tests/dofs/dof_accessor_04.cc b/tests/dofs/dof_accessor_04.cc index f4b205aa0e..69b1075e29 100644 --- a/tests/dofs/dof_accessor_04.cc +++ b/tests/dofs/dof_accessor_04.cc @@ -13,8 +13,11 @@ // // --------------------------------------------------------------------- -// Test DoFCellAccessor::distribute_local_to_global( -// local_matrix, local_vector, global_matrix, global_vector) + +// Test DoFCellAccessor::distribute_local_to_global(local_matrix, +// local_vector, +// global_matrix, +// global_vector) #include #include @@ -73,29 +76,18 @@ main() global_matrix, global_vector); - // check if each entry of the local matrix/vector has - // found its position in the global matrix/vector - bool passed = true; - for (unsigned int i = 0; i < fe.dofs_per_cell; ++i) - { - if (global_vector(i) != local_vector(i)) - passed = false; - - for (unsigned int j = 0; j < fe.dofs_per_cell; ++j) - if (global_matrix(i, j) != local_matrix(i, j)) - { - passed = false; - break; - } - - if (passed == false) - break; - } - - if (passed) - deallog << "PASSED" << std::endl; - else - deallog << "NOT PASSED" << std::endl; + // output the local matrix and the local vector + deallog << "local matrix:" << std::endl; + local_matrix.print_formatted(deallog.get_file_stream(), 0, false, 3); + deallog << "local vector:" << std::endl; + local_vector.print(deallog.get_file_stream(), 0, false, 3); + deallog << std::endl; + + // output the global matrix and the global vector + deallog << "global matrix:" << std::endl; + global_matrix.print_formatted(deallog.get_file_stream(), 0, false, 3); + deallog << "global vector:" << std::endl; + global_vector.print(deallog.get_file_stream(), 0, false, 3); return 0; } diff --git a/tests/dofs/dof_accessor_04.output b/tests/dofs/dof_accessor_04.output index 126825131c..b5f6883cf9 100644 --- a/tests/dofs/dof_accessor_04.output +++ b/tests/dofs/dof_accessor_04.output @@ -1,2 +1,21 @@ -DEAL::PASSED +DEAL::local matrix: +1. 2. 3. 4. +5. 6. 7. 8. +9. 10. 11. 12. +13. 14. 15. 16. +DEAL::local vector: +1. 2. 3. 4. +DEAL:: +DEAL::global matrix: +1. 2. 3. 4. +5. 6. 7. 8. 0. 0. +9. 10. 11. 12. 0. 0. +13. 14. 15. 16. 0. 0. 0. 0. 0. + 0. 0. 0. 0. + 0. 0. 0. 0. 0. 0. + 0. 0. 0. 0. + 0. 0. 0. 0. 0. 0. + 0. 0. 0. 0. +DEAL::global vector: +1. 2. 3. 4. 0. 0. 0. 0. 0.