]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add debugging function
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 26 Jun 2014 19:30:08 +0000 (19:30 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 26 Jun 2014 19:30:08 +0000 (19:30 +0000)
git-svn-id: https://svn.dealii.org/trunk@33089 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/algorithms/any_data.h

index 9d67972c95e904e2bb3de876ae2923748de4ffd1..9ad228e2d1842b09b0877b82af1039ea8e276416 100644 (file)
@@ -174,6 +174,10 @@ public:
   template <typename type>
   bool is_type(const unsigned int i) const;
 
+  /// List the contents to a stream
+  template <class STREAM>
+  void list (STREAM& os) const;
+    
   /// Conversion from old NamedData
   template <typename type>
   AnyData(const NamedData<type> &);
@@ -466,6 +470,20 @@ AnyData::merge(const AnyData &other)
 }
 
 
+template <class STREAM>
+inline
+void AnyData::list(STREAM& os) const
+{
+  for (unsigned int i=0;i<names.size();++i)
+    {
+      os << i
+        << '\t' << names[i]
+        << '\t' << data[i].type().name()
+        << std::endl;
+    }
+}
+
+
 //----------------------------------------------------------------------//
 
 
@@ -473,3 +491,13 @@ AnyData::merge(const AnyData &other)
 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.