CUSP
Loading...
Searching...
No Matches
gmres.h
Go to the documentation of this file.
1/*
2 * Copyright 2011 The Regents of the University of California
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
21#pragma once
22
23#include <cusp/detail/config.h>
24
25#include <cusp/detail/execution_policy.h>
26
27#include <cstddef>
28
29namespace cusp
30{
31namespace krylov
32{
33
40/* \cond */
41
42template <typename DerivedPolicy,
43 typename LinearOperator,
44 typename VectorType1,
45 typename VectorType2,
46 typename Monitor,
47 typename Preconditioner>
48void gmres(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
49 const LinearOperator& A,
50 VectorType1& x,
51 const VectorType2& b,
52 const size_t restart,
53 Monitor& monitor,
54 Preconditioner& M);
55
56template <typename LinearOperator,
57 typename VectorType1,
58 typename VectorType2,
59 typename Monitor>
60void gmres(const LinearOperator& A,
61 VectorType1& x,
62 const VectorType2& b,
63 const size_t restart,
64 Monitor& monitor);
65
66template <typename LinearOperator,
67 typename VectorType1,
68 typename VectorType2>
69void gmres(const LinearOperator& A,
70 VectorType1& x,
71 const VectorType2& b,
72 const size_t restart);
73
74/* \endcond */
75
139template <typename LinearOperator,
140 typename VectorType1,
141 typename VectorType2,
142 typename Monitor,
143 typename Preconditioner>
144void gmres(const LinearOperator& A,
145 VectorType1& x,
146 const VectorType2& b,
147 const size_t restart,
148 Monitor& monitor,
149 Preconditioner& M);
153} // end namespace krylov
154} // end namespace cusp
155
156#include <cusp/krylov/detail/gmres.inl>
157
Implements standard convergence criteria and reporting for iterative solvers.
Definition monitor.h:102
void gmres(const LinearOperator &A, VectorType1 &x, const VectorType2 &b, const size_t restart, Monitor &monitor, Preconditioner &M)
GMRES method.