Fork me on GitHub
 All Classes Files Functions Variables Groups Pages
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 <thrust/execution_policy.h>
26 
27 #include <cstddef>
28 
29 namespace cusp
30 {
31 namespace krylov
32 {
33 
40 /* \cond */
41 template <typename DerivedPolicy,
42  class LinearOperator,
43  class Vector>
44 void gmres(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
45  LinearOperator& A,
46  Vector& x,
47  Vector& b,
48  const size_t restart);
49 
55 template <class LinearOperator, class Vector>
56 void gmres(LinearOperator& A,
57  Vector& x,
58  Vector& b,
59  const size_t restart);
60 
61 template <typename DerivedPolicy,
62  class LinearOperator,
63  class Vector,
64  class Monitor>
65 void gmres(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
66  LinearOperator& A,
67  Vector& x,
68  Vector& b,
69  const size_t restart,
70  Monitor& monitor);
71 
76 template <class LinearOperator,
77  class Vector,
78  class Monitor>
79 void gmres(LinearOperator& A,
80  Vector& x,
81  Vector& b,
82  const size_t restart,
83  Monitor& monitor);
84 
85 template <typename DerivedPolicy,
86  class LinearOperator,
87  class Vector,
88  class Monitor,
89  class Preconditioner>
90 void gmres(const thrust::detail::execution_policy_base<DerivedPolicy> &exec,
91  LinearOperator& A,
92  Vector& x,
93  Vector& b,
94  const size_t restart,
95  Monitor& monitor,
96  Preconditioner& M);
97 /* \endcond */
98 
162 template <class LinearOperator,
163  class Vector,
164  class Monitor,
165  class Preconditioner>
166 void gmres(LinearOperator& A,
167  Vector& x,
168  Vector& b,
169  const size_t restart,
170  Monitor& monitor,
171  Preconditioner& M);
175 } // end namespace krylov
176 } // end namespace cusp
177 
178 #include <cusp/krylov/detail/gmres.inl>
179 
void gmres(LinearOperator &A, Vector &x, Vector &b, const size_t restart, Monitor &monitor, Preconditioner &M)
GMRES method.