Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
operator.h
1 // ---------------------------------------------------------------------
2 // @f$Id: operator.h 30057 2013-07-19 15:26:27Z kanschat @f$
3 //
4 // Copyright (C) 2010 - 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 #ifndef __deal2__operator_h
19 #define __deal2__operator_h
20 
21 #include <deal.II/base/config.h>
22 #include <deal.II/base/named_data.h>
23 #include <deal.II/base/event.h>
24 
25 #include <fstream>
26 
27 DEAL_II_NAMESPACE_OPEN
28 
40 namespace Algorithms
41 {
70  template <class VECTOR>
71  class Operator : public Subscriptor
72  {
73  public:
77  ~Operator();
78 
83  virtual void operator() (NamedData<VECTOR *> &out, const NamedData<VECTOR *> &in) = 0;
84 
89  virtual void notify(const Event &);
93  void clear_events();
94  protected:
104  };
105 
112  template <class VECTOR>
114  {
116  public:
117  OutputOperator ();
121  virtual ~OutputOperator();
122 
130  void initialize_stream(std::ostream &stream);
134  OutputOperator<VECTOR> &operator<< (unsigned int step);
135 
139  virtual OutputOperator<VECTOR> &operator<< (const NamedData<VECTOR *> &vectors);
140  protected:
141  unsigned int step;
142  private:
143  std::ostream *os;
144  };
145 
146  template <class VECTOR>
149  {
150  step = s;
151  return *this;
152  }
153 }
154 
155 
156 DEAL_II_NAMESPACE_CLOSE
157 
158 #endif
OutputOperator< VECTOR > & operator<<(unsigned int step)
Definition: operator.h:148
virtual void operator()(NamedData< VECTOR * > &out, const NamedData< VECTOR * > &in)=0
virtual void notify(const Event &)
void initialize_stream(std::ostream &stream)