]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add some stuff from the branch.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 5 Dec 2008 23:11:49 +0000 (23:11 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 5 Dec 2008 23:11:49 +0000 (23:11 +0000)
git-svn-id: https://svn.dealii.org/trunk@17871 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/full_matrix_common.h

index 74fa13d5aeb896451465ff0ec03703b639a74ae1..cf3f4563352aa3e173b16e0bca5581d101bc9f97 100644 (file)
@@ -1,5 +1,5 @@
 //----------------------------  full_matrix_common.h  ---------------------------
-//    $Id$
+//    $Id:$
 //    Version: $Name$ 
 //
 //    Copyright (C) 2007, 2008 by the deal.II authors
@@ -98,8 +98,29 @@ print_vector (const Vector<number> &v)
            << std::endl;
 }
 
+template <typename number>
+void 
+display_matrix(FullMatrix<number> M)
+{
+  deallog<<M.m()<<"x"<<M.n()<<" matrix"<<std::endl;
+  for (unsigned int i=0;i<M.m();i++)
+    {
+      for (unsigned int j=0;j<M.n();j++)
+       deallog<<M(i,j)<<" ";
+      deallog<<std::endl;
+    }
+}
 
 
+template <typename number>
+void 
+fill_matrix(FullMatrix<number> &A)
+{
+  for (unsigned int i=0; i<A.m();i++)
+    for (unsigned int j=0; j<A.n();j++)
+      A(i,j)=number(i*A.n() + j+1);
+}
+
 int
 main()
 {

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.