]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
add function to output debugging information
authorkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 12 Mar 2012 22:55:40 +0000 (22:55 +0000)
committerkanschat <kanschat@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 12 Mar 2012 22:55:40 +0000 (22:55 +0000)
git-svn-id: https://svn.dealii.org/trunk@25264 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/meshworker/local_results.h

index 60831927f4759e4c7d6bf352aa8a63d51bba80c3..08eefc2678238eba39961847a44807ea74870cf5 100644 (file)
@@ -1,7 +1,7 @@
 //---------------------------------------------------------------------------
 //    $Id$
 //
-//    Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 by the deal.II authors
+//    Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -340,12 +340,6 @@ namespace MeshWorker
                                        * themselves are resized by
                                        * reinit().
                                        *
-                                       * The template parameter @p
-                                       * MatrixPtr should point to
-                                       * a MatrixBlock
-                                       * instantiation in order to
-                                       * provide row and column info.
-                                       *
                                        * @note This function is
                                        * usually only called by the
                                        * assembler.
@@ -407,6 +401,9 @@ namespace MeshWorker
                                        */
       void reinit(const BlockIndices& local_sizes);
 
+      template <class STREAM>
+      void print_debug(STREAM& os) const;
+      
                                       /**
                                        * The memory used by this object.
                                        */
@@ -707,8 +704,37 @@ namespace MeshWorker
   {
     return quadrature_data(k,i);
   }
+
+
+  template <typename number>
+  template <class STREAM>
+  void
+  LocalResults<number>::print_debug(STREAM& os) const
+  {
+    os << "J: " << J.size() << std::endl;
+    os << "R: " << R.size() << std::endl;
+    for (unsigned int i=0;i<R.size();++i)
+      {
+       os << "  " << R[i].n_blocks() << " -";
+       for (unsigned int j=0;j<R[i].n_blocks();++j)
+         os << ' ' << R[i].block(j).size();
+       os << std::endl;
+      }
+    os << "M: " << M1.size() << " face " << M2.size() << std::endl;
+    for (unsigned int i=0;i<M1.size();++i)
+      {
+       os << "  " << M1[i].row << "," << M1[i].column
+          << " " << M1[i].matrix.m() << 'x' << M1[i].matrix.n();
+       if (i < M2.size())
+         os << " face " << M2[i].row << "," << M2[i].column
+            << " " << M2[i].matrix.m() << 'x' << M2[i].matrix.n();
+       os << std::endl;
+      }
+  }
+  
 }
 
+
 DEAL_II_NAMESPACE_CLOSE
 
 #endif

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.