Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
operator.templates.h
1 // ---------------------------------------------------------------------
2 // @f$Id: operator.templates.h 30036 2013-07-18 16:55:32Z maier @f$
3 //
4 // Copyright (C) 2006 - 2013 by the deal.II authors
5 //
6 // This file is part of the deal.II library.
7 //
8 // The deal.II library is free software; you can use it, redistribute
9 // it, and/or modify it under the terms of the GNU Lesser General
10 // Public License as published by the Free Software Foundation; either
11 // version 2.1 of the License, or (at your option) any later version.
12 // The full text of the license can be found in the file LICENSE at
13 // the top level of the deal.II distribution.
14 //
15 // ---------------------------------------------------------------------
16 
17 
18 #include <deal.II/algorithms/operator.h>
19 
20 DEAL_II_NAMESPACE_OPEN
21 
22 namespace Algorithms
23 {
24  template <class VECTOR>
26  {}
27 
28 
29 
30  template <class VECTOR>
32  {
33  notifications += e;
34  }
35 
36 
37  template <class VECTOR>
38  void
40  {
41  notifications.clear();
42  }
43 
44 
45  template <class VECTOR>
47  {}
48 
49  template <class VECTOR>
51  :
52  os(0)
53  {}
54 
55  template <class VECTOR>
56  void OutputOperator<VECTOR>::initialize_stream(std::ostream &stream)
57  {
58  os =&stream;
59  }
60 
61  template <class VECTOR>
64  {
65  if (os == 0)
66  {
67  //TODO: make this possible
68  //deallog << ' ' << step;
69  //for (unsigned int i=0;i<vectors.size();++i)
70  // vectors(i)->print(deallog);
71  //deallog << std::endl;
72  }
73  else
74  {
75  (*os) << ' ' << step;
76  for (unsigned int i=0; i<vectors.size(); ++i)
77  for (unsigned int j=0; j<vectors(i)->size(); ++j)
78  (*os) << ' ' << (*vectors(i))(j);
79  (*os) << std::endl;
80  }
81  return *this;
82  }
83 }
84 
85 DEAL_II_NAMESPACE_CLOSE
OutputOperator< VECTOR > & operator<<(unsigned int step)
Definition: operator.h:148
unsigned int size() const
Number of stored data objects.
Definition: named_data.h:325
virtual void notify(const Event &)
void initialize_stream(std::ostream &stream)