CUSP
Loading...
Searching...
No Matches
ainv.h
Go to the documentation of this file.
1/*
2 * Copyright 2008-2010 NVIDIA Corporation
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
26#include <cusp/hyb_matrix.h>
27
28namespace cusp
29{
30namespace precond
31{
32
33
51template <typename ValueType, typename MemorySpace>
52class scaled_bridson_ainv : public linear_operator<ValueType, MemorySpace>
53{
54private:
56
57public:
62
72 template<typename MatrixTypeA>
73 scaled_bridson_ainv(const MatrixTypeA & A, ValueType drop_tolerance=0.1, int nonzero_per_row=-1, bool lin_dropping=false, int lin_param=1);
74
82 template <typename VectorType1, typename VectorType2>
83 void operator()(const VectorType1& x, VectorType2& y);
84
85protected:
86
90};
91
102template <typename ValueType, typename MemorySpace>
103class bridson_ainv : public linear_operator<ValueType, MemorySpace>
104{
105private:
107
108public:
115
125 template<typename MatrixTypeA>
126 bridson_ainv(const MatrixTypeA & A, ValueType drop_tolerance=0.1, int nonzero_per_row =-1, bool lin_dropping=false, int lin_param=1);
127
135 template <typename VectorType1, typename VectorType2>
136 void operator()(const VectorType1& x, VectorType2& y);
137
138protected:
143};
144
151template <typename ValueType, typename MemorySpace>
152class nonsym_bridson_ainv : public linear_operator<ValueType, MemorySpace>
153{
154private:
156
157public:
164
174 template<typename MatrixTypeA>
175 nonsym_bridson_ainv(const MatrixTypeA & A, ValueType drop_tolerance=0.1, int nonzero_per_row=-1, bool lin_dropping=false, int lin_param=1);
176
184 template <typename VectorType1, typename VectorType2>
185 void operator()(const VectorType1& x, VectorType2& y);
186
187protected:
192};
196} // end namespace precond
197} // end namespace cusp
198
199#include <cusp/precond/detail/ainv.inl>
200
201
The array1d class is a 1D vector container that may contain elements stored in "host" or "device" mem...
Definition array1d.h:99
Hybrid (HYB) representation a sparse matrix.
Definition hyb_matrix.h:143
Abstract representation of a linear operator.
cusp::hyb_matrix< int, ValueType, MemorySpace > w
The approximate inverse factor W.
Definition ainv.h:110
bridson_ainv(const MatrixTypeA &A, ValueType drop_tolerance=0.1, int nonzero_per_row=-1, bool lin_dropping=false, int lin_param=1)
cusp::hyb_matrix< int, ValueType, MemorySpace > w_t
The transpose of the approximate inverse factor W.
Definition ainv.h:112
void operator()(const VectorType1 &x, VectorType2 &y)
cusp::array1d< ValueType, MemorySpace > diagonals
The diagonal entries of the factorization.
Definition ainv.h:114
cusp::array1d< ValueType, MemorySpace > diagonals
The diagonal entries of the factorization.
Definition ainv.h:163
cusp::hyb_matrix< int, ValueType, MemorySpace > w_t
The transpose of the approximate inverse factor W.
Definition ainv.h:159
nonsym_bridson_ainv(const MatrixTypeA &A, ValueType drop_tolerance=0.1, int nonzero_per_row=-1, bool lin_dropping=false, int lin_param=1)
void operator()(const VectorType1 &x, VectorType2 &y)
cusp::hyb_matrix< int, ValueType, MemorySpace > z
The approximate inverse factor Z.
Definition ainv.h:161
scaled_bridson_ainv(const MatrixTypeA &A, ValueType drop_tolerance=0.1, int nonzero_per_row=-1, bool lin_dropping=false, int lin_param=1)
void operator()(const VectorType1 &x, VectorType2 &y)
cusp::hyb_matrix< int, ValueType, MemorySpace > w_t
The transpose of the approximate inverse factor W.
Definition ainv.h:61
cusp::hyb_matrix< int, ValueType, MemorySpace > w
The approximate inverse factor W.
Definition ainv.h:59
Hybrid ELL/COO matrix format.
Abstract interface for iterative solvers.