ThunderEgg  1.0.0
Operator.h
Go to the documentation of this file.
1 /***************************************************************************
2  * ThunderEgg, a library for solvers on adaptively refined block-structured
3  * Cartesian grids.
4  *
5  * Copyright (c) 2018-2021 Scott Aiton
6  * Copyright (c) 2020 Donna Calhoun
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20  ***************************************************************************/
21 
22 #ifndef THUNDEREGG_OPERATOR_H
23 #define THUNDEREGG_OPERATOR_H
24 
30 #include <ThunderEgg/Vector.h>
31 
32 namespace ThunderEgg {
36 template<int D>
37 class Operator
38 {
39 public:
43  virtual ~Operator() {}
44 
50  virtual Operator<D>* clone() const = 0;
51 
58  virtual void apply(const Vector<D>& x, Vector<D>& b) const = 0;
59 };
60 } // namespace ThunderEgg
61 #endif
Vector.h
Vector class.
ThunderEgg::Operator::~Operator
virtual ~Operator()
Destroy the Operator object.
Definition: Operator.h:43
ThunderEgg::Operator::clone
virtual Operator< D > * clone() const =0
Clone this operator.
ThunderEgg
The ThunderEgg namespace.
Definition: BiLinearGhostFiller.h:31
ThunderEgg::Operator::apply
virtual void apply(const Vector< D > &x, Vector< D > &b) const =0
Virtual function that base classes have to implement.
ThunderEgg::Operator
Base class for operators.
Definition: Operator.h:37
ThunderEgg::Vector
Vector class for use in thunderegg.
Definition: Vector.h:42