From: bangerth Date: Sun, 18 Nov 2007 21:45:01 +0000 (+0000) Subject: Complete writing comprehensive tests for FullMatrix X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04db422a27499f075d49138aa02010fe447a7e13;p=dealii-svn.git Complete writing comprehensive tests for FullMatrix git-svn-id: https://svn.dealii.org/trunk@15516 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/full_matrix_43.cc b/tests/bits/full_matrix_43.cc new file mode 100644 index 0000000000..29f3359a62 --- /dev/null +++ b/tests/bits/full_matrix_43.cc @@ -0,0 +1,44 @@ +//---------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2007 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + + +// check FullMatrix::mmult + + +#include "../tests.h" +#include "full_matrix_common.h" + + +std::string output_file_name = "full_matrix_43/output"; + + +template +void +check () +{ + FullMatrix m, n, o; + make_matrix (m); + make_matrix (n); + make_matrix (o); + + m.mmult (n, o, true); + print_matrix (m); + print_matrix (n); + print_matrix (o); + + m.mmult (n, o, false); + print_matrix (m); + print_matrix (n); + print_matrix (o); +} + diff --git a/tests/bits/full_matrix_43/cmp/generic b/tests/bits/full_matrix_43/cmp/generic new file mode 100644 index 0000000000..bcb54c3407 --- /dev/null +++ b/tests/bits/full_matrix_43/cmp/generic @@ -0,0 +1,301 @@ + +DEAL::0 0 2.0 +DEAL::0 1 3.0 +DEAL::0 2 4.0 +DEAL::0 3 5.0 +DEAL::0 4 6.0 +DEAL::1 0 4.0 +DEAL::1 1 6.0 +DEAL::1 2 8.0 +DEAL::1 3 10. +DEAL::1 4 12. +DEAL::2 0 6.0 +DEAL::2 1 9.0 +DEAL::2 2 12. +DEAL::2 3 15. +DEAL::2 4 18. +DEAL::3 0 8.0 +DEAL::3 1 12. +DEAL::3 2 16. +DEAL::3 3 20. +DEAL::3 4 24. +DEAL::4 0 10. +DEAL::4 1 15. +DEAL::4 2 20. +DEAL::4 3 25. +DEAL::4 4 30. +DEAL::0 0 1.4e+02 +DEAL::0 1 2.1e+02 +DEAL::0 2 2.8e+02 +DEAL::0 3 3.6e+02 +DEAL::0 4 4.3e+02 +DEAL::1 0 2.8e+02 +DEAL::1 1 4.3e+02 +DEAL::1 2 5.7e+02 +DEAL::1 3 7.1e+02 +DEAL::1 4 8.5e+02 +DEAL::2 0 4.3e+02 +DEAL::2 1 6.4e+02 +DEAL::2 2 8.5e+02 +DEAL::2 3 1.1e+03 +DEAL::2 4 1.3e+03 +DEAL::3 0 5.7e+02 +DEAL::3 1 8.5e+02 +DEAL::3 2 1.1e+03 +DEAL::3 3 1.4e+03 +DEAL::3 4 1.7e+03 +DEAL::4 0 7.1e+02 +DEAL::4 1 1.1e+03 +DEAL::4 2 1.4e+03 +DEAL::4 3 1.8e+03 +DEAL::4 4 2.1e+03 +DEAL::0 0 2.0 +DEAL::0 1 3.0 +DEAL::0 2 4.0 +DEAL::0 3 5.0 +DEAL::0 4 6.0 +DEAL::1 0 4.0 +DEAL::1 1 6.0 +DEAL::1 2 8.0 +DEAL::1 3 10. +DEAL::1 4 12. +DEAL::2 0 6.0 +DEAL::2 1 9.0 +DEAL::2 2 12. +DEAL::2 3 15. +DEAL::2 4 18. +DEAL::3 0 8.0 +DEAL::3 1 12. +DEAL::3 2 16. +DEAL::3 3 20. +DEAL::3 4 24. +DEAL::4 0 10. +DEAL::4 1 15. +DEAL::4 2 20. +DEAL::4 3 25. +DEAL::4 4 30. +DEAL::0 0 2.0 +DEAL::0 1 3.0 +DEAL::0 2 4.0 +DEAL::0 3 5.0 +DEAL::0 4 6.0 +DEAL::1 0 4.0 +DEAL::1 1 6.0 +DEAL::1 2 8.0 +DEAL::1 3 10. +DEAL::1 4 12. +DEAL::2 0 6.0 +DEAL::2 1 9.0 +DEAL::2 2 12. +DEAL::2 3 15. +DEAL::2 4 18. +DEAL::3 0 8.0 +DEAL::3 1 12. +DEAL::3 2 16. +DEAL::3 3 20. +DEAL::3 4 24. +DEAL::4 0 10. +DEAL::4 1 15. +DEAL::4 2 20. +DEAL::4 3 25. +DEAL::4 4 30. +DEAL::0 0 1.4e+02 +DEAL::0 1 2.1e+02 +DEAL::0 2 2.8e+02 +DEAL::0 3 3.5e+02 +DEAL::0 4 4.2e+02 +DEAL::1 0 2.8e+02 +DEAL::1 1 4.2e+02 +DEAL::1 2 5.6e+02 +DEAL::1 3 7.0e+02 +DEAL::1 4 8.4e+02 +DEAL::2 0 4.2e+02 +DEAL::2 1 6.3e+02 +DEAL::2 2 8.4e+02 +DEAL::2 3 1.0e+03 +DEAL::2 4 1.3e+03 +DEAL::3 0 5.6e+02 +DEAL::3 1 8.4e+02 +DEAL::3 2 1.1e+03 +DEAL::3 3 1.4e+03 +DEAL::3 4 1.7e+03 +DEAL::4 0 7.0e+02 +DEAL::4 1 1.0e+03 +DEAL::4 2 1.4e+03 +DEAL::4 3 1.8e+03 +DEAL::4 4 2.1e+03 +DEAL::0 0 2.0 +DEAL::0 1 3.0 +DEAL::0 2 4.0 +DEAL::0 3 5.0 +DEAL::0 4 6.0 +DEAL::1 0 4.0 +DEAL::1 1 6.0 +DEAL::1 2 8.0 +DEAL::1 3 10. +DEAL::1 4 12. +DEAL::2 0 6.0 +DEAL::2 1 9.0 +DEAL::2 2 12. +DEAL::2 3 15. +DEAL::2 4 18. +DEAL::3 0 8.0 +DEAL::3 1 12. +DEAL::3 2 16. +DEAL::3 3 20. +DEAL::3 4 24. +DEAL::4 0 10. +DEAL::4 1 15. +DEAL::4 2 20. +DEAL::4 3 25. +DEAL::4 4 30. +DEAL::0 0 2.0 +DEAL::0 1 3.0 +DEAL::0 2 4.0 +DEAL::0 3 5.0 +DEAL::0 4 6.0 +DEAL::1 0 4.0 +DEAL::1 1 6.0 +DEAL::1 2 8.0 +DEAL::1 3 10. +DEAL::1 4 12. +DEAL::2 0 6.0 +DEAL::2 1 9.0 +DEAL::2 2 12. +DEAL::2 3 15. +DEAL::2 4 18. +DEAL::3 0 8.0 +DEAL::3 1 12. +DEAL::3 2 16. +DEAL::3 3 20. +DEAL::3 4 24. +DEAL::4 0 10. +DEAL::4 1 15. +DEAL::4 2 20. +DEAL::4 3 25. +DEAL::4 4 30. +DEAL::0 0 1.4e+02 +DEAL::0 1 2.1e+02 +DEAL::0 2 2.8e+02 +DEAL::0 3 3.6e+02 +DEAL::0 4 4.3e+02 +DEAL::1 0 2.8e+02 +DEAL::1 1 4.3e+02 +DEAL::1 2 5.7e+02 +DEAL::1 3 7.1e+02 +DEAL::1 4 8.5e+02 +DEAL::2 0 4.3e+02 +DEAL::2 1 6.4e+02 +DEAL::2 2 8.5e+02 +DEAL::2 3 1.1e+03 +DEAL::2 4 1.3e+03 +DEAL::3 0 5.7e+02 +DEAL::3 1 8.5e+02 +DEAL::3 2 1.1e+03 +DEAL::3 3 1.4e+03 +DEAL::3 4 1.7e+03 +DEAL::4 0 7.1e+02 +DEAL::4 1 1.1e+03 +DEAL::4 2 1.4e+03 +DEAL::4 3 1.8e+03 +DEAL::4 4 2.1e+03 +DEAL::0 0 2.0 +DEAL::0 1 3.0 +DEAL::0 2 4.0 +DEAL::0 3 5.0 +DEAL::0 4 6.0 +DEAL::1 0 4.0 +DEAL::1 1 6.0 +DEAL::1 2 8.0 +DEAL::1 3 10. +DEAL::1 4 12. +DEAL::2 0 6.0 +DEAL::2 1 9.0 +DEAL::2 2 12. +DEAL::2 3 15. +DEAL::2 4 18. +DEAL::3 0 8.0 +DEAL::3 1 12. +DEAL::3 2 16. +DEAL::3 3 20. +DEAL::3 4 24. +DEAL::4 0 10. +DEAL::4 1 15. +DEAL::4 2 20. +DEAL::4 3 25. +DEAL::4 4 30. +DEAL::0 0 2.0 +DEAL::0 1 3.0 +DEAL::0 2 4.0 +DEAL::0 3 5.0 +DEAL::0 4 6.0 +DEAL::1 0 4.0 +DEAL::1 1 6.0 +DEAL::1 2 8.0 +DEAL::1 3 10. +DEAL::1 4 12. +DEAL::2 0 6.0 +DEAL::2 1 9.0 +DEAL::2 2 12. +DEAL::2 3 15. +DEAL::2 4 18. +DEAL::3 0 8.0 +DEAL::3 1 12. +DEAL::3 2 16. +DEAL::3 3 20. +DEAL::3 4 24. +DEAL::4 0 10. +DEAL::4 1 15. +DEAL::4 2 20. +DEAL::4 3 25. +DEAL::4 4 30. +DEAL::0 0 1.4e+02 +DEAL::0 1 2.1e+02 +DEAL::0 2 2.8e+02 +DEAL::0 3 3.5e+02 +DEAL::0 4 4.2e+02 +DEAL::1 0 2.8e+02 +DEAL::1 1 4.2e+02 +DEAL::1 2 5.6e+02 +DEAL::1 3 7.0e+02 +DEAL::1 4 8.4e+02 +DEAL::2 0 4.2e+02 +DEAL::2 1 6.3e+02 +DEAL::2 2 8.4e+02 +DEAL::2 3 1.0e+03 +DEAL::2 4 1.3e+03 +DEAL::3 0 5.6e+02 +DEAL::3 1 8.4e+02 +DEAL::3 2 1.1e+03 +DEAL::3 3 1.4e+03 +DEAL::3 4 1.7e+03 +DEAL::4 0 7.0e+02 +DEAL::4 1 1.0e+03 +DEAL::4 2 1.4e+03 +DEAL::4 3 1.8e+03 +DEAL::4 4 2.1e+03 +DEAL::0 0 2.0 +DEAL::0 1 3.0 +DEAL::0 2 4.0 +DEAL::0 3 5.0 +DEAL::0 4 6.0 +DEAL::1 0 4.0 +DEAL::1 1 6.0 +DEAL::1 2 8.0 +DEAL::1 3 10. +DEAL::1 4 12. +DEAL::2 0 6.0 +DEAL::2 1 9.0 +DEAL::2 2 12. +DEAL::2 3 15. +DEAL::2 4 18. +DEAL::3 0 8.0 +DEAL::3 1 12. +DEAL::3 2 16. +DEAL::3 3 20. +DEAL::3 4 24. +DEAL::4 0 10. +DEAL::4 1 15. +DEAL::4 2 20. +DEAL::4 3 25. +DEAL::4 4 30. diff --git a/tests/bits/full_matrix_44.cc b/tests/bits/full_matrix_44.cc new file mode 100644 index 0000000000..04697d9ab2 --- /dev/null +++ b/tests/bits/full_matrix_44.cc @@ -0,0 +1,44 @@ +//---------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2007 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + + +// check FullMatrix::Tmmult + + +#include "../tests.h" +#include "full_matrix_common.h" + + +std::string output_file_name = "full_matrix_44/output"; + + +template +void +check () +{ + FullMatrix m, n, o; + make_matrix (m); + make_matrix (n); + make_matrix (o); + + m.Tmmult (n, o, true); + print_matrix (m); + print_matrix (n); + print_matrix (o); + + m.Tmmult (n, o, false); + print_matrix (m); + print_matrix (n); + print_matrix (o); +} + diff --git a/tests/bits/full_matrix_44/cmp/generic b/tests/bits/full_matrix_44/cmp/generic new file mode 100644 index 0000000000..a5849f4489 --- /dev/null +++ b/tests/bits/full_matrix_44/cmp/generic @@ -0,0 +1,301 @@ + +DEAL::0 0 2.0 +DEAL::0 1 3.0 +DEAL::0 2 4.0 +DEAL::0 3 5.0 +DEAL::0 4 6.0 +DEAL::1 0 4.0 +DEAL::1 1 6.0 +DEAL::1 2 8.0 +DEAL::1 3 10. +DEAL::1 4 12. +DEAL::2 0 6.0 +DEAL::2 1 9.0 +DEAL::2 2 12. +DEAL::2 3 15. +DEAL::2 4 18. +DEAL::3 0 8.0 +DEAL::3 1 12. +DEAL::3 2 16. +DEAL::3 3 20. +DEAL::3 4 24. +DEAL::4 0 10. +DEAL::4 1 15. +DEAL::4 2 20. +DEAL::4 3 25. +DEAL::4 4 30. +DEAL::0 0 2.2e+02 +DEAL::0 1 3.3e+02 +DEAL::0 2 4.4e+02 +DEAL::0 3 5.6e+02 +DEAL::0 4 6.7e+02 +DEAL::1 0 3.3e+02 +DEAL::1 1 5.0e+02 +DEAL::1 2 6.7e+02 +DEAL::1 3 8.4e+02 +DEAL::1 4 1.0e+03 +DEAL::2 0 4.5e+02 +DEAL::2 1 6.7e+02 +DEAL::2 2 8.9e+02 +DEAL::2 3 1.1e+03 +DEAL::2 4 1.3e+03 +DEAL::3 0 5.6e+02 +DEAL::3 1 8.4e+02 +DEAL::3 2 1.1e+03 +DEAL::3 3 1.4e+03 +DEAL::3 4 1.7e+03 +DEAL::4 0 6.7e+02 +DEAL::4 1 1.0e+03 +DEAL::4 2 1.3e+03 +DEAL::4 3 1.7e+03 +DEAL::4 4 2.0e+03 +DEAL::0 0 2.0 +DEAL::0 1 3.0 +DEAL::0 2 4.0 +DEAL::0 3 5.0 +DEAL::0 4 6.0 +DEAL::1 0 4.0 +DEAL::1 1 6.0 +DEAL::1 2 8.0 +DEAL::1 3 10. +DEAL::1 4 12. +DEAL::2 0 6.0 +DEAL::2 1 9.0 +DEAL::2 2 12. +DEAL::2 3 15. +DEAL::2 4 18. +DEAL::3 0 8.0 +DEAL::3 1 12. +DEAL::3 2 16. +DEAL::3 3 20. +DEAL::3 4 24. +DEAL::4 0 10. +DEAL::4 1 15. +DEAL::4 2 20. +DEAL::4 3 25. +DEAL::4 4 30. +DEAL::0 0 2.0 +DEAL::0 1 3.0 +DEAL::0 2 4.0 +DEAL::0 3 5.0 +DEAL::0 4 6.0 +DEAL::1 0 4.0 +DEAL::1 1 6.0 +DEAL::1 2 8.0 +DEAL::1 3 10. +DEAL::1 4 12. +DEAL::2 0 6.0 +DEAL::2 1 9.0 +DEAL::2 2 12. +DEAL::2 3 15. +DEAL::2 4 18. +DEAL::3 0 8.0 +DEAL::3 1 12. +DEAL::3 2 16. +DEAL::3 3 20. +DEAL::3 4 24. +DEAL::4 0 10. +DEAL::4 1 15. +DEAL::4 2 20. +DEAL::4 3 25. +DEAL::4 4 30. +DEAL::0 0 2.2e+02 +DEAL::0 1 3.3e+02 +DEAL::0 2 4.4e+02 +DEAL::0 3 5.5e+02 +DEAL::0 4 6.6e+02 +DEAL::1 0 3.3e+02 +DEAL::1 1 5.0e+02 +DEAL::1 2 6.6e+02 +DEAL::1 3 8.2e+02 +DEAL::1 4 9.9e+02 +DEAL::2 0 4.4e+02 +DEAL::2 1 6.6e+02 +DEAL::2 2 8.8e+02 +DEAL::2 3 1.1e+03 +DEAL::2 4 1.3e+03 +DEAL::3 0 5.5e+02 +DEAL::3 1 8.2e+02 +DEAL::3 2 1.1e+03 +DEAL::3 3 1.4e+03 +DEAL::3 4 1.6e+03 +DEAL::4 0 6.6e+02 +DEAL::4 1 9.9e+02 +DEAL::4 2 1.3e+03 +DEAL::4 3 1.6e+03 +DEAL::4 4 2.0e+03 +DEAL::0 0 2.0 +DEAL::0 1 3.0 +DEAL::0 2 4.0 +DEAL::0 3 5.0 +DEAL::0 4 6.0 +DEAL::1 0 4.0 +DEAL::1 1 6.0 +DEAL::1 2 8.0 +DEAL::1 3 10. +DEAL::1 4 12. +DEAL::2 0 6.0 +DEAL::2 1 9.0 +DEAL::2 2 12. +DEAL::2 3 15. +DEAL::2 4 18. +DEAL::3 0 8.0 +DEAL::3 1 12. +DEAL::3 2 16. +DEAL::3 3 20. +DEAL::3 4 24. +DEAL::4 0 10. +DEAL::4 1 15. +DEAL::4 2 20. +DEAL::4 3 25. +DEAL::4 4 30. +DEAL::0 0 2.0 +DEAL::0 1 3.0 +DEAL::0 2 4.0 +DEAL::0 3 5.0 +DEAL::0 4 6.0 +DEAL::1 0 4.0 +DEAL::1 1 6.0 +DEAL::1 2 8.0 +DEAL::1 3 10. +DEAL::1 4 12. +DEAL::2 0 6.0 +DEAL::2 1 9.0 +DEAL::2 2 12. +DEAL::2 3 15. +DEAL::2 4 18. +DEAL::3 0 8.0 +DEAL::3 1 12. +DEAL::3 2 16. +DEAL::3 3 20. +DEAL::3 4 24. +DEAL::4 0 10. +DEAL::4 1 15. +DEAL::4 2 20. +DEAL::4 3 25. +DEAL::4 4 30. +DEAL::0 0 2.2e+02 +DEAL::0 1 3.3e+02 +DEAL::0 2 4.4e+02 +DEAL::0 3 5.6e+02 +DEAL::0 4 6.7e+02 +DEAL::1 0 3.3e+02 +DEAL::1 1 5.0e+02 +DEAL::1 2 6.7e+02 +DEAL::1 3 8.4e+02 +DEAL::1 4 1.0e+03 +DEAL::2 0 4.5e+02 +DEAL::2 1 6.7e+02 +DEAL::2 2 8.9e+02 +DEAL::2 3 1.1e+03 +DEAL::2 4 1.3e+03 +DEAL::3 0 5.6e+02 +DEAL::3 1 8.4e+02 +DEAL::3 2 1.1e+03 +DEAL::3 3 1.4e+03 +DEAL::3 4 1.7e+03 +DEAL::4 0 6.7e+02 +DEAL::4 1 1.0e+03 +DEAL::4 2 1.3e+03 +DEAL::4 3 1.7e+03 +DEAL::4 4 2.0e+03 +DEAL::0 0 2.0 +DEAL::0 1 3.0 +DEAL::0 2 4.0 +DEAL::0 3 5.0 +DEAL::0 4 6.0 +DEAL::1 0 4.0 +DEAL::1 1 6.0 +DEAL::1 2 8.0 +DEAL::1 3 10. +DEAL::1 4 12. +DEAL::2 0 6.0 +DEAL::2 1 9.0 +DEAL::2 2 12. +DEAL::2 3 15. +DEAL::2 4 18. +DEAL::3 0 8.0 +DEAL::3 1 12. +DEAL::3 2 16. +DEAL::3 3 20. +DEAL::3 4 24. +DEAL::4 0 10. +DEAL::4 1 15. +DEAL::4 2 20. +DEAL::4 3 25. +DEAL::4 4 30. +DEAL::0 0 2.0 +DEAL::0 1 3.0 +DEAL::0 2 4.0 +DEAL::0 3 5.0 +DEAL::0 4 6.0 +DEAL::1 0 4.0 +DEAL::1 1 6.0 +DEAL::1 2 8.0 +DEAL::1 3 10. +DEAL::1 4 12. +DEAL::2 0 6.0 +DEAL::2 1 9.0 +DEAL::2 2 12. +DEAL::2 3 15. +DEAL::2 4 18. +DEAL::3 0 8.0 +DEAL::3 1 12. +DEAL::3 2 16. +DEAL::3 3 20. +DEAL::3 4 24. +DEAL::4 0 10. +DEAL::4 1 15. +DEAL::4 2 20. +DEAL::4 3 25. +DEAL::4 4 30. +DEAL::0 0 2.2e+02 +DEAL::0 1 3.3e+02 +DEAL::0 2 4.4e+02 +DEAL::0 3 5.5e+02 +DEAL::0 4 6.6e+02 +DEAL::1 0 3.3e+02 +DEAL::1 1 5.0e+02 +DEAL::1 2 6.6e+02 +DEAL::1 3 8.2e+02 +DEAL::1 4 9.9e+02 +DEAL::2 0 4.4e+02 +DEAL::2 1 6.6e+02 +DEAL::2 2 8.8e+02 +DEAL::2 3 1.1e+03 +DEAL::2 4 1.3e+03 +DEAL::3 0 5.5e+02 +DEAL::3 1 8.2e+02 +DEAL::3 2 1.1e+03 +DEAL::3 3 1.4e+03 +DEAL::3 4 1.6e+03 +DEAL::4 0 6.6e+02 +DEAL::4 1 9.9e+02 +DEAL::4 2 1.3e+03 +DEAL::4 3 1.6e+03 +DEAL::4 4 2.0e+03 +DEAL::0 0 2.0 +DEAL::0 1 3.0 +DEAL::0 2 4.0 +DEAL::0 3 5.0 +DEAL::0 4 6.0 +DEAL::1 0 4.0 +DEAL::1 1 6.0 +DEAL::1 2 8.0 +DEAL::1 3 10. +DEAL::1 4 12. +DEAL::2 0 6.0 +DEAL::2 1 9.0 +DEAL::2 2 12. +DEAL::2 3 15. +DEAL::2 4 18. +DEAL::3 0 8.0 +DEAL::3 1 12. +DEAL::3 2 16. +DEAL::3 3 20. +DEAL::3 4 24. +DEAL::4 0 10. +DEAL::4 1 15. +DEAL::4 2 20. +DEAL::4 3 25. +DEAL::4 4 30. diff --git a/tests/bits/full_matrix_45.cc b/tests/bits/full_matrix_45.cc new file mode 100644 index 0000000000..899cf00219 --- /dev/null +++ b/tests/bits/full_matrix_45.cc @@ -0,0 +1,43 @@ +//---------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2007 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + + +// check FullMatrix::vmult + + +#include "../tests.h" +#include "full_matrix_common.h" + + +std::string output_file_name = "full_matrix_45/output"; + + +template +void +check () +{ + FullMatrix m; + make_matrix (m); + Vector v, w; + make_vector (v); + make_vector (w); + + m.vmult (v, w, true); + print_vector (v); + print_vector (w); + + m.vmult (v, w, false); + print_vector (v); + print_vector (w); +} + diff --git a/tests/bits/full_matrix_45/cmp/generic b/tests/bits/full_matrix_45/cmp/generic new file mode 100644 index 0000000000..56a587a10c --- /dev/null +++ b/tests/bits/full_matrix_45/cmp/generic @@ -0,0 +1,41 @@ + +DEAL::0 71. +DEAL::1 1.4e+02 +DEAL::2 2.1e+02 +DEAL::3 2.8e+02 +DEAL::4 3.6e+02 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 +DEAL::0 70. +DEAL::1 1.4e+02 +DEAL::2 2.1e+02 +DEAL::3 2.8e+02 +DEAL::4 3.5e+02 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 +DEAL::0 71. +DEAL::1 1.4e+02 +DEAL::2 2.1e+02 +DEAL::3 2.8e+02 +DEAL::4 3.6e+02 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 +DEAL::0 70. +DEAL::1 1.4e+02 +DEAL::2 2.1e+02 +DEAL::3 2.8e+02 +DEAL::4 3.5e+02 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 diff --git a/tests/bits/full_matrix_46.cc b/tests/bits/full_matrix_46.cc new file mode 100644 index 0000000000..b943470ad0 --- /dev/null +++ b/tests/bits/full_matrix_46.cc @@ -0,0 +1,39 @@ +//---------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2007 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + + +// check FullMatrix::vmult_add + + +#include "../tests.h" +#include "full_matrix_common.h" + + +std::string output_file_name = "full_matrix_46/output"; + + +template +void +check () +{ + FullMatrix m; + make_matrix (m); + Vector v, w; + make_vector (v); + make_vector (w); + + m.vmult_add (v, w); + print_vector (v); + print_vector (w); +} + diff --git a/tests/bits/full_matrix_46/cmp/generic b/tests/bits/full_matrix_46/cmp/generic new file mode 100644 index 0000000000..c2e6529d2d --- /dev/null +++ b/tests/bits/full_matrix_46/cmp/generic @@ -0,0 +1,21 @@ + +DEAL::0 71. +DEAL::1 1.4e+02 +DEAL::2 2.1e+02 +DEAL::3 2.8e+02 +DEAL::4 3.6e+02 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 +DEAL::0 71. +DEAL::1 1.4e+02 +DEAL::2 2.1e+02 +DEAL::3 2.8e+02 +DEAL::4 3.6e+02 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 diff --git a/tests/bits/full_matrix_47.cc b/tests/bits/full_matrix_47.cc new file mode 100644 index 0000000000..2add1958e4 --- /dev/null +++ b/tests/bits/full_matrix_47.cc @@ -0,0 +1,43 @@ +//---------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2007 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + + +// check FullMatrix::Tvmult + + +#include "../tests.h" +#include "full_matrix_common.h" + + +std::string output_file_name = "full_matrix_47/output"; + + +template +void +check () +{ + FullMatrix m; + make_matrix (m); + Vector v, w; + make_vector (v); + make_vector (w); + + m.Tvmult (v, w, true); + print_vector (v); + print_vector (w); + + m.Tvmult (v, w, false); + print_vector (v); + print_vector (w); +} + diff --git a/tests/bits/full_matrix_47/cmp/generic b/tests/bits/full_matrix_47/cmp/generic new file mode 100644 index 0000000000..4f2dea4deb --- /dev/null +++ b/tests/bits/full_matrix_47/cmp/generic @@ -0,0 +1,41 @@ + +DEAL::0 1.1e+02 +DEAL::1 1.7e+02 +DEAL::2 2.2e+02 +DEAL::3 2.8e+02 +DEAL::4 3.4e+02 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 +DEAL::0 1.1e+02 +DEAL::1 1.6e+02 +DEAL::2 2.2e+02 +DEAL::3 2.8e+02 +DEAL::4 3.3e+02 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 +DEAL::0 1.1e+02 +DEAL::1 1.7e+02 +DEAL::2 2.2e+02 +DEAL::3 2.8e+02 +DEAL::4 3.4e+02 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 +DEAL::0 1.1e+02 +DEAL::1 1.6e+02 +DEAL::2 2.2e+02 +DEAL::3 2.8e+02 +DEAL::4 3.3e+02 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 diff --git a/tests/bits/full_matrix_48.cc b/tests/bits/full_matrix_48.cc new file mode 100644 index 0000000000..1f9bed89ab --- /dev/null +++ b/tests/bits/full_matrix_48.cc @@ -0,0 +1,39 @@ +//---------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2007 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + + +// check FullMatrix::Tvmult_add + + +#include "../tests.h" +#include "full_matrix_common.h" + + +std::string output_file_name = "full_matrix_48/output"; + + +template +void +check () +{ + FullMatrix m; + make_matrix (m); + Vector v, w; + make_vector (v); + make_vector (w); + + m.Tvmult_add (v, w); + print_vector (v); + print_vector (w); +} + diff --git a/tests/bits/full_matrix_48/cmp/generic b/tests/bits/full_matrix_48/cmp/generic new file mode 100644 index 0000000000..f4bbbc656c --- /dev/null +++ b/tests/bits/full_matrix_48/cmp/generic @@ -0,0 +1,21 @@ + +DEAL::0 1.1e+02 +DEAL::1 1.7e+02 +DEAL::2 2.2e+02 +DEAL::3 2.8e+02 +DEAL::4 3.4e+02 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 +DEAL::0 1.1e+02 +DEAL::1 1.7e+02 +DEAL::2 2.2e+02 +DEAL::3 2.8e+02 +DEAL::4 3.4e+02 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 diff --git a/tests/bits/full_matrix_49.cc b/tests/bits/full_matrix_49.cc new file mode 100644 index 0000000000..73020ba723 --- /dev/null +++ b/tests/bits/full_matrix_49.cc @@ -0,0 +1,39 @@ +//---------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2007 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + + +// check FullMatrix::precondition_Jacobi + + +#include "../tests.h" +#include "full_matrix_common.h" + + +std::string output_file_name = "full_matrix_49/output"; + + +template +void +check () +{ + FullMatrix m; + make_matrix (m); + Vector v, w; + make_vector (v); + make_vector (w); + + m.precondition_Jacobi (v, w, 3.141); + print_vector (v); + print_vector (w); +} + diff --git a/tests/bits/full_matrix_49/cmp/generic b/tests/bits/full_matrix_49/cmp/generic new file mode 100644 index 0000000000..d5cc206445 --- /dev/null +++ b/tests/bits/full_matrix_49/cmp/generic @@ -0,0 +1,21 @@ + +DEAL::0 1.6 +DEAL::1 1.0 +DEAL::2 0.79 +DEAL::3 0.63 +DEAL::4 0.52 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 +DEAL::0 1.6 +DEAL::1 1.0 +DEAL::2 0.79 +DEAL::3 0.63 +DEAL::4 0.52 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 diff --git a/tests/bits/full_matrix_50.cc b/tests/bits/full_matrix_50.cc new file mode 100644 index 0000000000..f44a4a8375 --- /dev/null +++ b/tests/bits/full_matrix_50.cc @@ -0,0 +1,41 @@ +//---------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2007 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + + +// check FullMatrix::residual + + +#include "../tests.h" +#include "full_matrix_common.h" + + +std::string output_file_name = "full_matrix_50/output"; + + +template +void +check () +{ + FullMatrix m; + make_matrix (m); + Vector v, w, x; + make_vector (v); + make_vector (w); + make_vector (x); + + m.residual (v, w, x); + print_vector (v); + print_vector (w); + print_vector (x); +} + diff --git a/tests/bits/full_matrix_50/cmp/generic b/tests/bits/full_matrix_50/cmp/generic new file mode 100644 index 0000000000..648d9f4139 --- /dev/null +++ b/tests/bits/full_matrix_50/cmp/generic @@ -0,0 +1,31 @@ + +DEAL::0 -69. +DEAL::1 -1.4e+02 +DEAL::2 -2.1e+02 +DEAL::3 -2.8e+02 +DEAL::4 -3.4e+02 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 +DEAL::0 -69. +DEAL::1 -1.4e+02 +DEAL::2 -2.1e+02 +DEAL::3 -2.8e+02 +DEAL::4 -3.4e+02 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 diff --git a/tests/bits/full_matrix_51.cc b/tests/bits/full_matrix_51.cc new file mode 100644 index 0000000000..39121d657a --- /dev/null +++ b/tests/bits/full_matrix_51.cc @@ -0,0 +1,39 @@ +//---------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2007 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + + +// check FullMatrix::forward + + +#include "../tests.h" +#include "full_matrix_common.h" + + +std::string output_file_name = "full_matrix_51/output"; + + +template +void +check () +{ + FullMatrix m; + make_matrix (m); + Vector x, y; + make_vector (x); + make_vector (y); + + m.forward (x, y); + print_vector (x); + print_vector (y); +} + diff --git a/tests/bits/full_matrix_51/cmp/generic b/tests/bits/full_matrix_51/cmp/generic new file mode 100644 index 0000000000..52c0cd66b0 --- /dev/null +++ b/tests/bits/full_matrix_51/cmp/generic @@ -0,0 +1,21 @@ + +DEAL::0 0.50 +DEAL::1 0 +DEAL::2 0 +DEAL::3 0 +DEAL::4 0 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 +DEAL::0 0.50 +DEAL::1 0 +DEAL::2 0 +DEAL::3 0 +DEAL::4 0 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 diff --git a/tests/bits/full_matrix_52.cc b/tests/bits/full_matrix_52.cc new file mode 100644 index 0000000000..230ba3fa22 --- /dev/null +++ b/tests/bits/full_matrix_52.cc @@ -0,0 +1,39 @@ +//---------------------------------------------------------------------- +// $Id$ +// Version: $Name$ +// +// Copyright (C) 2007 by the deal.II authors +// +// This file is subject to QPL and may not be distributed +// without copyright and license information. Please refer +// to the file deal.II/doc/license.html for the text and +// further information on this license. +// +//---------------------------------------------------------------------- + + +// check FullMatrix::backward + + +#include "../tests.h" +#include "full_matrix_common.h" + + +std::string output_file_name = "full_matrix_52/output"; + + +template +void +check () +{ + FullMatrix m; + make_matrix (m); + Vector x, y; + make_vector (x); + make_vector (y); + + m.backward (x, y); + print_vector (x); + print_vector (y); +} + diff --git a/tests/bits/full_matrix_52/cmp/generic b/tests/bits/full_matrix_52/cmp/generic new file mode 100644 index 0000000000..682ba7f665 --- /dev/null +++ b/tests/bits/full_matrix_52/cmp/generic @@ -0,0 +1,21 @@ + +DEAL::0 0 +DEAL::1 0 +DEAL::2 0 +DEAL::3 0 +DEAL::4 0.17 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 +DEAL::0 0 +DEAL::1 0 +DEAL::2 0 +DEAL::3 0 +DEAL::4 0.17 +DEAL::0 1.0 +DEAL::1 2.0 +DEAL::2 3.0 +DEAL::3 4.0 +DEAL::4 5.0 diff --git a/tests/bits/full_matrix_common.h b/tests/bits/full_matrix_common.h index a6c3e82e3d..fbb66fe34d 100644 --- a/tests/bits/full_matrix_common.h +++ b/tests/bits/full_matrix_common.h @@ -89,6 +89,17 @@ print_matrix (const FullMatrix &m) +template +void +print_vector (const Vector &v) +{ + for (unsigned int i=0; i