deal.II version GIT relicensing-6834-g5b78e6bcdf 2026-10-01 11:20:01+00:00
\(\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// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2010 - 2025 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13
14#ifndef dealii_operator_h
15#define dealii_operator_h
16
17#include <deal.II/base/config.h>
18
20
22#include <deal.II/base/event.h>
23
24#include <fstream>
25
27
36namespace Algorithms
37{
65 {
66 public:
70 virtual ~OperatorBase() override = default;
71
75 virtual void
76 operator()(AnyData &out, const AnyData &in) = 0;
77
81 virtual void
82 notify(const Event &);
83
87 void
88 clear_events();
89
90 protected:
96 };
97
102 template <typename VectorType>
104 {
105 public:
110
116
120 virtual ~OutputOperator() override = default;
121
126 void
127 initialize_stream(std::ostream &stream);
128
132 void
133 set_step(const unsigned int step);
134
139 operator<<(const AnyData &vectors);
140
141 protected:
142 unsigned int step;
143
144 private:
145 std::ostream *os;
146 };
147
148 template <typename VectorType>
149 inline void
151 {
152 step = s;
153 }
154
155
161 template <typename VectorType>
163 operator<<(OutputOperator<VectorType> &out, unsigned int step)
164 {
165 out.set_step(step);
166 return out;
167 }
168} // namespace Algorithms
169
171
172#endif
virtual void operator()(AnyData &out, const AnyData &in)=0
virtual ~OperatorBase() override=default
void initialize_stream(std::ostream &stream)
void set_step(const unsigned int step)
Definition operator.h:150
virtual ~OutputOperator() override=default
OutputOperator(const OutputOperator< VectorType > &)=delete
#define DEAL_II_DEPRECATED
Definition config.h:294
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
std::ostream & operator<<(std::ostream &out, const DerivativeForm< order, dim, spacedim, Number > &df)
OutputOperator< VectorType > & operator<<(OutputOperator< VectorType > &out, unsigned int step)
Definition operator.h:163