OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
src
src
Solvers
AMR_MG
BottomSolver.h
Go to the documentation of this file.
1
//
2
// Class BottomSolver
3
// Abstract base class for all base level solvers.
4
//
5
// Copyright (c) 2017 - 2020, Matthias Frey, Paul Scherrer Institut, Villigen PSI, Switzerland
6
// All rights reserved
7
//
8
// Implemented as part of the PhD thesis
9
// "Precise Simulations of Multibunches in High Intensity Cyclotrons"
10
//
11
// This file is part of OPAL.
12
//
13
// OPAL is free software: you can redistribute it and/or modify
14
// it under the terms of the GNU General Public License as published by
15
// the Free Software Foundation, either version 3 of the License, or
16
// (at your option) any later version.
17
//
18
// You should have received a copy of the GNU General Public License
19
// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
20
//
21
#ifndef BOTTOM_SOLVER_H
22
#define BOTTOM_SOLVER_H
23
24
#include "
AmrMultiGridDefs.h
"
25
26
template
<
class
Matrix,
class
Vector,
class
Level>
27
class
BottomSolver
{
28
29
public
:
30
31
BottomSolver
() :
isInitialized_m
(false) { };
32
33
virtual
~BottomSolver
() { };
34
43
virtual
void
solve
(
const
Vector
& x,
44
const
Vector
& b) = 0;
45
50
virtual
void
setOperator
(
const
Matrix
& A,
51
Level* level_p =
nullptr
) = 0;
52
53
57
virtual
std::size_t
getNumIters
() = 0;
58
59
bool
hasOperator
()
const
;
60
61
62
protected
:
63
bool
isInitialized_m
;
64
};
65
66
67
template
<
class
Matrix,
class
Vector,
class
Level>
68
bool
BottomSolver<Matrix, Vector, Level>::hasOperator
()
const
{
69
return
isInitialized_m;
70
}
71
72
#endif
AmrMultiGridDefs.h
Matrix
Matrix.
Definition:
Matrix.h:39
Vector
Vector.
Definition:
Vector.h:37
BottomSolver
Definition:
BottomSolver.h:27
BottomSolver::~BottomSolver
virtual ~BottomSolver()
Definition:
BottomSolver.h:33
BottomSolver::setOperator
virtual void setOperator(const Matrix &A, Level *level_p=nullptr)=0
BottomSolver::isInitialized_m
bool isInitialized_m
Definition:
BottomSolver.h:63
BottomSolver::BottomSolver
BottomSolver()
Definition:
BottomSolver.h:31
BottomSolver::solve
virtual void solve(const Vector &x, const Vector &b)=0
BottomSolver::hasOperator
bool hasOperator() const
Definition:
BottomSolver.h:68
BottomSolver::getNumIters
virtual std::size_t getNumIters()=0
Generated on Wed Aug 25 2021 16:41:04 for OPAL (Object Oriented Parallel Accelerator Library) by
1.9.1