Reference documentation for deal.II version 9.5.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
operator.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2010 - 2020 by the deal.II authors
4//
5// This file is part of the deal.II library.
6//
7// The deal.II library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 2.1 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE.md at
12// the top level directory of deal.II.
13//
14// ---------------------------------------------------------------------
15
16
17#ifndef dealii_operator_h
18#define dealii_operator_h
19
20#include <deal.II/base/config.h>
21
23
24#include <deal.II/base/event.h>
25
26#include <fstream>
27
29
38namespace Algorithms
39{
67 {
68 public:
72 virtual ~OperatorBase() override = default;
73
77 virtual void
78 operator()(AnyData &out, const AnyData &in) = 0;
79
83 virtual void
84 notify(const Event &);
85
89 void
91
92 protected:
98 };
99
104 template <typename VectorType>
106 {
107 public:
112
118
122 virtual ~OutputOperator() override = default;
123
128 void
129 initialize_stream(std::ostream &stream);
130
134 void
135 set_step(const unsigned int step);
136
141 operator<<(const AnyData &vectors);
142
143 protected:
144 unsigned int step;
145
146 private:
147 std::ostream *os;
148 };
149
150 template <typename VectorType>
151 inline void
153 {
154 step = s;
155 }
156
157
163 template <typename VectorType>
165 operator<<(OutputOperator<VectorType> &out, unsigned int step)
166 {
167 out.set_step(step);
168 return out;
169 }
170} // namespace Algorithms
171
173
174#endif
virtual void notify(const Event &)
Definition operator.cc:40
virtual void operator()(AnyData &out, const AnyData &in)=0
virtual ~OperatorBase() override=default
virtual OutputOperator< VectorType > & operator<<(const AnyData &vectors)
void initialize_stream(std::ostream &stream)
void set_step(const unsigned int step)
Definition operator.h:152
virtual ~OutputOperator() override=default
OutputOperator(const OutputOperator< VectorType > &)=delete
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473
OutputOperator< VectorType > & operator<<(OutputOperator< VectorType > &out, unsigned int step)
Definition operator.h:165