// compute the mean of this
// and the transpose value
const number mean_value = (*val_ptr +
- val[(*cols)(*colnum_ptr,row)]) / 2.0;
+ val[(*cols)(*colnum_ptr,row)]) / number(2.0);
// set this value and the
// transpose one to the
// mean
// then copy old matrix
for (size_type row=0; row<matrix.m(); ++row)
for (size_type col=0; col<matrix.n(); ++col)
- if (matrix(row,col) != 0)
- set (row, col, matrix(row,col));
+ if (matrix(row,col) != somenumber())
+ set (row, col, number(matrix(row,col)));
}
const number *const end_ptr = &val[cols->n_nonzero_elements()];
while (val_ptr != end_ptr)
- *val_ptr++ += factor **matrix_ptr++;
+ *val_ptr++ += factor * number(*matrix_ptr++);
}
typename OutVector::value_type s = 0.;
const number *const val_end_of_row = &values[rowstart[row+1]];
while (val_ptr != val_end_of_row)
- s += *val_ptr++ * src(*colnum_ptr++);
+ s += typename OutVector::value_type(*val_ptr++) * typename OutVector::value_type(src(*colnum_ptr++));
*dst_ptr++ = s;
}
else
typename OutVector::value_type s = *dst_ptr;
const number *const val_end_of_row = &values[rowstart[row+1]];
while (val_ptr != val_end_of_row)
- s += *val_ptr++ * src(*colnum_ptr++);
+ s += typename OutVector::value_type(*val_ptr++) * typename OutVector::value_type(src(*colnum_ptr++));
*dst_ptr++ = s;
}
}
while (this_cols[counter]<col_indices[i] && counter<row_length_1)
++counter;
- Assert (this_cols[counter] == col_indices[i] || values[i] == 0,
+ Assert ((this_cols[counter] == col_indices[i])
+ ||
+ (values[i] == number2()),
ExcInvalidIndex(row,col_indices[i]));
val_ptr[counter] += values[i];
while (this_cols[counter]<col_indices[i] && counter<row_length_1)
++counter;
- Assert (this_cols[counter] == col_indices[i] || values[i] == 0,
+ Assert ((this_cols[counter] == col_indices[i])
+ ||
+ (values[i] == number2()),
ExcInvalidIndex(row,col_indices[i]));
val_ptr[counter] += values[i];
while (this_cols[counter]<col_indices[i] && counter<row_length_1)
++counter;
- Assert (this_cols[counter] == col_indices[i] || values[i] == 0,
+ Assert ((this_cols[counter] == col_indices[i])
+ ||
+ (values[i] == number2()),
ExcInvalidIndex(row,col_indices[i]));
val_ptr[counter] += values[i];
for (size_type j=0; j<n_cols; ++j)
{
- const number value = values[j];
+ const number value = number(values[j]);
AssertIsFinite(value);
#ifdef DEBUG
- if (elide_zero_values==true && value == 0)
+ if (elide_zero_values==true && value == number())
continue;
#else
- if (value == 0)
+ if (value == number())
continue;
#endif
// value we add is zero
if (index == SparsityPattern::invalid_entry)
{
- Assert (value == 0., ExcInvalidIndex(row,col_indices[j]));
+ Assert (value == number(), ExcInvalidIndex(row,col_indices[j]));
continue;
}
{
for (size_type j=0; j<n_cols; ++j)
{
- const number value = values[j];
+ const number value = number(values[j]);
AssertIsFinite(value);
- if (value == 0)
+ if (value == number())
continue;
// check whether the next index to set is
// same code as above, but now check for zeros
for (size_type j=0; j<n_cols; ++j)
{
- const number value = values[j];
+ const number value = number(values[j]);
AssertIsFinite(value);
if (index != next_row_index && my_cols[index] == col_indices[j])
if (next_index == SparsityPattern::invalid_entry)
{
- Assert (value == 0., ExcInvalidIndex(row,col_indices[j]));
+ Assert (value == number(), ExcInvalidIndex(row,col_indices[j]));
continue;
}
index = next_index;
for (size_type j=cols->rowstart[i]; j<cols->rowstart[i+1] ; j++)
{
const size_type p = cols->colnums[j];
- dst(p) += val[j] * src(i);
+ dst(p) += typename OutVector::value_type(val[j]) * typename OutVector::value_type(src(i));
}
}
}
for (size_type j=cols->rowstart[i]; j<cols->rowstart[i+1] ; j++)
{
const size_type p = cols->colnums[j];
- dst(p) += val[j] * src(i);
+ dst(p) += typename OutVector::value_type(val[j]) * typename OutVector::value_type(src(i));
}
}
*/
template <typename number,
typename InVector>
- number matrix_norm_sqr_on_subrange (const size_type begin_row,
- const size_type end_row,
- const number *values,
- const std::size_t *rowstart,
- const size_type *colnums,
- const InVector &v)
+ typename InVector::value_type
+ matrix_norm_sqr_on_subrange (const size_type begin_row,
+ const size_type end_row,
+ const number *values,
+ const std::size_t *rowstart,
+ const size_type *colnums,
+ const InVector &v)
{
- number norm_sqr=0.;
+ typename InVector::value_type norm_sqr=0.;
for (size_type i=begin_row; i<end_row; ++i)
{
- number s = 0;
+ typename InVector::value_type s = 0;
for (size_type j=rowstart[i]; j<rowstart[i+1] ; j++)
- s += values[j] * v(colnums[j]);
- norm_sqr += v(i)*numbers::NumberTraits<number>::conjugate(s);
+ s += typename InVector::value_type(values[j]) * v(colnums[j]);
+ norm_sqr += v(i) * numbers::NumberTraits<typename InVector::value_type>::conjugate(s);
}
return norm_sqr;
}
Assert(n() == v.size(), ExcDimensionMismatch(n(),v.size()));
return
- parallel::accumulate_from_subranges<number>
+ parallel::accumulate_from_subranges<somenumber>
(std_cxx11::bind (&internal::SparseMatrix::matrix_norm_sqr_on_subrange
<number,Vector<somenumber> >,
std_cxx11::_1, std_cxx11::_2,
*/
template <typename number,
typename InVector>
- number matrix_scalar_product_on_subrange (const size_type begin_row,
- const size_type end_row,
- const number *values,
- const std::size_t *rowstart,
- const size_type *colnums,
- const InVector &u,
- const InVector &v)
+ typename InVector::value_type
+ matrix_scalar_product_on_subrange (const size_type begin_row,
+ const size_type end_row,
+ const number *values,
+ const std::size_t *rowstart,
+ const size_type *colnums,
+ const InVector &u,
+ const InVector &v)
{
- number norm_sqr=0.;
+ typename InVector::value_type norm_sqr=0.;
for (size_type i=begin_row; i<end_row; ++i)
{
- number s = 0;
+ typename InVector::value_type s = 0;
for (size_type j=rowstart[i]; j<rowstart[i+1] ; j++)
- s += values[j] * v(colnums[j]);
- norm_sqr += u(i)*numbers::NumberTraits<number>::conjugate(s);
+ s += typename InVector::value_type(values[j]) * v(colnums[j]);
+ norm_sqr += u(i) * numbers::NumberTraits<typename InVector::value_type>::conjugate(s);
}
return norm_sqr;
}
Assert(n() == v.size(), ExcDimensionMismatch(n(),v.size()));
return
- parallel::accumulate_from_subranges<number>
+ parallel::accumulate_from_subranges<somenumber>
(std_cxx11::bind (&internal::SparseMatrix::matrix_scalar_product_on_subrange
<number,Vector<somenumber> >,
std_cxx11::_1, std_cxx11::_2,
const size_type *const end_rows = &sp_A.colnums[sp_A.rowstart[i+1]];
for (; rows != end_rows; ++rows)
{
- const double A_val = val[rows-&sp_A.colnums[sp_A.rowstart[0]]];
+ const number A_val = val[rows-&sp_A.colnums[sp_A.rowstart[0]]];
const size_type col = *rows;
const size_type *new_cols =
(&sp_B.colnums[sp_B.rowstart[col]]);
// special treatment for diagonal
if (sp_B.n_rows() == sp_B.n_cols())
{
- C.add (i, *new_cols, A_val *
- B.val[new_cols-&sp_B.colnums[sp_B.rowstart[0]]] *
- (use_vector ? V(col) : 1));
+ C.add (i, *new_cols,
+ numberC(A_val) * numberC(B.val[new_cols-&sp_B.colnums[sp_B.rowstart[0]]]) *
+ numberC(use_vector ? V(col) : 1));
++new_cols;
}
&B.val[new_cols-&sp_B.colnums[sp_B.rowstart[0]]];
const numberB *const end_cols = &B.val[sp_B.rowstart[col+1]];
for (; B_val_ptr != end_cols; ++B_val_ptr)
- *new_ptr++ = A_val **B_val_ptr * (use_vector ? V(col) : 1);
+ *new_ptr++ = numberC(A_val) * numberC(*B_val_ptr) * numberC(use_vector ? V(col) : 1);
C.add (i, new_ptr-&new_entries[0], new_cols, &new_entries[0],
false, true);
for (; rows != end_rows; ++rows)
{
const size_type row = *rows;
- const double A_val = val[rows-&sp_A.colnums[sp_A.rowstart[0]]];
+ const number A_val = val[rows-&sp_A.colnums[sp_A.rowstart[0]]];
// special treatment for diagonal
if (sp_B.n_rows () == sp_B.n_cols())
- C.add (row, i, A_val *
- B.val[new_cols-1-&sp_B.colnums[sp_B.rowstart[0]]] *
- (use_vector ? V(i) : 1));
+ C.add (row, i,
+ numberC(A_val) * numberC(B.val[new_cols-1-&sp_B.colnums[sp_B.rowstart[0]]]) *
+ numberC(use_vector ? V(i) : 1));
// now the innermost loop that goes over all the elements in row
// 'col' of matrix B. Cache the elements, and then write them into C
const numberB *B_val_ptr =
&B.val[new_cols-&sp_B.colnums[sp_B.rowstart[0]]];
for (; B_val_ptr != end_cols; ++B_val_ptr)
- *new_ptr++ = A_val **B_val_ptr * (use_vector ? V(i) : 1);
+ *new_ptr++ = numberC(A_val) * numberC(*B_val_ptr) * numberC(use_vector ? V(i) : 1);
C.add (row, new_ptr-&new_entries[0], new_cols, &new_entries[0],
false, true);
template <typename number,
typename InVector,
typename OutVector>
- number residual_sqr_on_subrange (const size_type begin_row,
- const size_type end_row,
- const number *values,
- const std::size_t *rowstart,
- const size_type *colnums,
- const InVector &u,
- const InVector &b,
- OutVector &dst)
+ typename OutVector::value_type
+ residual_sqr_on_subrange (const size_type begin_row,
+ const size_type end_row,
+ const number *values,
+ const std::size_t *rowstart,
+ const size_type *colnums,
+ const InVector &u,
+ const InVector &b,
+ OutVector &dst)
{
- number norm_sqr=0.;
+ typename OutVector::value_type norm_sqr=0.;
for (size_type i=begin_row; i<end_row; ++i)
{
- number s = b(i);
+ typename OutVector::value_type s = b(i);
for (size_type j=rowstart[i]; j<rowstart[i+1] ; j++)
- s -= values[j] * u(colnums[j]);
+ s -= typename OutVector::value_type(values[j]) * u(colnums[j]);
dst(i) = s;
- norm_sqr += s*numbers::NumberTraits<number>::conjugate(s);
+ norm_sqr += s * numbers::NumberTraits<typename OutVector::value_type>::conjugate(s);
}
return norm_sqr;
}
Assert (&u != &dst, ExcSourceEqualsDestination());
return
- std::sqrt (parallel::accumulate_from_subranges<number>
+ std::sqrt (parallel::accumulate_from_subranges<somenumber>
(std_cxx11::bind (&internal::SparseMatrix::residual_sqr_on_subrange
<number,Vector<somenumber>,Vector<somenumber> >,
std_cxx11::_1, std_cxx11::_2,
{
#ifdef DEBUG
for (typename SparseMatrix<number>::size_type row=0; row<matrix.m(); ++row)
- Assert(matrix.diag_element(row) != 0.,
+ Assert(matrix.diag_element(row) != number(),
ExcMessage("There is a zero on the diagonal of this matrix "
"in row "
+
// in each row, i.e. at index
// rowstart[i]. and we do have a
// square matrix by above assertion
- if (om != 1.)
+ if (om != number(1.))
for (size_type i=0; i<n; ++i, ++dst_ptr, ++src_ptr, ++rowstart_ptr)
- *dst_ptr = om **src_ptr / val[*rowstart_ptr];
+ *dst_ptr = somenumber(om) **src_ptr / somenumber(val[*rowstart_ptr]);
else
for (size_type i=0; i<n; ++i, ++dst_ptr, ++src_ptr, ++rowstart_ptr)
- *dst_ptr = *src_ptr / val[*rowstart_ptr];
+ *dst_ptr = *src_ptr / somenumber(val[*rowstart_ptr]);
}
ExcInternalError());
number s = 0;
for (size_type j=(*rowstart_ptr)+1; j<first_right_of_diagonal_index; ++j)
- s += val[j] * dst(cols->colnums[j]);
+ s += val[j] * number(dst(cols->colnums[j]));
// divide by diagonal element
*dst_ptr -= s * om;
rowstart_ptr = &cols->rowstart[0];
dst_ptr = &dst(0);
for ( ; rowstart_ptr!=&cols->rowstart[n]; ++rowstart_ptr, ++dst_ptr)
- *dst_ptr *= om*(2.-om)*val[*rowstart_ptr];
+ *dst_ptr *= somenumber(om*(number(2.)-om)) * somenumber(val[*rowstart_ptr]);
// backward sweep
rowstart_ptr = &cols->rowstart[n-1];
= pos_right_of_diagonal[row];
number s = 0;
for (size_type j=first_right_of_diagonal_index; j<end_row; ++j)
- s += val[j] * dst(cols->colnums[j]);
+ s += val[j] * number(dst(cols->colnums[j]));
*dst_ptr -= s * om;
*dst_ptr /= val[*rowstart_ptr];
number s = 0;
for (size_type j=(*rowstart_ptr)+1; j<first_right_of_diagonal_index; ++j)
- s += val[j] * dst(cols->colnums[j]);
+ s += val[j] * number(dst(cols->colnums[j]));
// divide by diagonal element
*dst_ptr -= s * om;
- Assert(val[*rowstart_ptr]!= 0., ExcDivideByZero());
+ Assert(val[*rowstart_ptr] != number(), ExcDivideByZero());
*dst_ptr /= val[*rowstart_ptr];
};
rowstart_ptr = &cols->rowstart[0];
dst_ptr = &dst(0);
for (size_type row=0; row<n; ++row, ++rowstart_ptr, ++dst_ptr)
- *dst_ptr *= (2.-om)*val[*rowstart_ptr];
+ *dst_ptr *= somenumber((number(2.)-om)) * somenumber(val[*rowstart_ptr]);
// backward sweep
rowstart_ptr = &cols->rowstart[n-1];
&cols->colnums[0]);
number s = 0;
for (size_type j=first_right_of_diagonal_index; j<end_row; ++j)
- s += val[j] * dst(cols->colnums[j]);
+ s += val[j] * number(dst(cols->colnums[j]));
*dst_ptr -= s * om;
- Assert(val[*rowstart_ptr]!= 0., ExcDivideByZero());
+ Assert(val[*rowstart_ptr] != number(), ExcDivideByZero());
*dst_ptr /= val[*rowstart_ptr];
};
}
{
const size_type col = cols->colnums[j];
if (col < row)
- s -= val[j] * dst(col);
+ s -= somenumber(val[j]) * dst(col);
}
- dst(row) = s * om / val[cols->rowstart[row]];
+ dst(row) = s * somenumber(om) / somenumber(val[cols->rowstart[row]]);
}
}
somenumber s = dst(row);
for (size_type j=cols->rowstart[row]; j<cols->rowstart[row+1]; ++j)
if (cols->colnums[j] > row)
- s -= val[j] * dst(cols->colnums[j]);
+ s -= somenumber(val[j]) * dst(cols->colnums[j]);
- dst(row) = s * om / val[cols->rowstart[row]];
+ dst(row) = s * somenumber(om) / somenumber(val[cols->rowstart[row]]);
if (row == 0)
break;
const size_type col = cols->colnums[j];
if (inverse_permutation[col] < urow)
{
- s -= val[j] * dst(col);
+ s -= somenumber(val[j]) * dst(col);
}
}
- dst(row) = s * om / val[cols->rowstart[row]];
+ dst(row) = s * somenumber(om) / somenumber(val[cols->rowstart[row]]);
}
}
{
const size_type col = cols->colnums[j];
if (inverse_permutation[col] > urow)
- s -= val[j] * dst(col);
+ s -= somenumber(val[j]) * dst(col);
}
- dst(row) = s * om / val[cols->rowstart[row]];
+ dst(row) = s * somenumber(om) / somenumber(val[cols->rowstart[row]]);
}
}
somenumber s = b(row);
for (size_type j=cols->rowstart[row]; j<cols->rowstart[row+1]; ++j)
{
- s -= val[j] * v(cols->colnums[j]);
+ s -= somenumber(val[j]) * v(cols->colnums[j]);
}
- v(row) += s * om / val[cols->rowstart[row]];
+ v(row) += s * somenumber(om) / somenumber(val[cols->rowstart[row]]);
}
}
somenumber s = b(row);
for (size_type j=cols->rowstart[row]; j<cols->rowstart[row+1]; ++j)
{
- s -= val[j] * v(cols->colnums[j]);
+ s -= somenumber(val[j]) * v(cols->colnums[j]);
}
- v(row) += s * om / val[cols->rowstart[row]];
+ v(row) += s * somenumber(om) / somenumber(val[cols->rowstart[row]]);
}
}
const size_type p = cols->colnums[j];
if (p != SparsityPattern::invalid_entry)
{
- if (i>j) s += val[j] * dst(p);
+ if (i>j)
+ s += somenumber(val[j]) * dst(p);
}
}
- dst(i) -= s * om;
- dst(i) /= val[cols->rowstart[i]];
+ dst(i) -= s * somenumber(om);
+ dst(i) /= somenumber(val[cols->rowstart[i]]);
}
for (int i=n-1; i>=0; i--) // this time, i is signed, but always positive!
const size_type p = cols->colnums[j];
if (p != SparsityPattern::invalid_entry)
{
- if (static_cast<size_type>(i)<j) s += val[j] * dst(p);
+ if (static_cast<size_type>(i) < j)
+ s += somenumber(val[j]) * dst(p);
}
}
- dst(i) -= s * om / val[cols->rowstart[i]];
+ dst(i) -= s * somenumber(om) / somenumber(val[cols->rowstart[i]]);
}
}
for (size_type j=0; j<n(); ++j)
if ((*cols)(i,j) != SparsityPattern::invalid_entry)
out << std::setw(width)
- << val[cols->operator()(i,j)] * denominator << ' ';
+ << val[cols->operator()(i,j)] * number(denominator) << ' ';
else
out << std::setw(width) << zero_string << ' ';
out << std::endl;
// ---------------------------------------------------------------------
//
-// Copyright (C) 1998 - 2014 by the deal.II authors
+// Copyright (C) 1998 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
// complex instantiations
-// for (S : COMPLEX_SCALARS)
-// {
-// template class SparseMatrix<S>;
-// }
-
-
-
-// for (S1, S2 : COMPLEX_SCALARS)
-// {
-// template SparseMatrix<S1> &
-// SparseMatrix<S1>::copy_from<S2> (const SparseMatrix<S2> &);
-
-// template
-// void SparseMatrix<S1>::copy_from<S2> (const FullMatrix<S2> &);
-
-// template void SparseMatrix<S1>::add<S2> (const S1,
-// const SparseMatrix<S2> &);
-// }
-
-
-// for (S1, S2 : COMPLEX_SCALARS)
-// {
-// template S2
-// SparseMatrix<S1>::
-// matrix_norm_square<S2> (const Vector<S2> &) const;
-
-// template S2
-// SparseMatrix<S1>::
-// matrix_scalar_product<S2> (const Vector<S2> &,
-// const Vector<S2> &) const;
-
-// template S2 SparseMatrix<S1>::
-// residual<S2> (Vector<S2> &,
-// const Vector<S2> &,
-// const Vector<S2> &) const;
-
-// template void SparseMatrix<S1>::
-// precondition_SSOR<S2> (Vector<S2> &,
-// const Vector<S2> &,
-// const S1) const;
-
-// template void SparseMatrix<S1>::
-// precondition_SOR<S2> (Vector<S2> &,
-// const Vector<S2> &,
-// const S1) const;
-
-// template void SparseMatrix<S1>::
-// precondition_TSOR<S2> (Vector<S2> &,
-// const Vector<S2> &,
-// const S1) const;
-
-// template void SparseMatrix<S1>::
-// precondition_Jacobi<S2> (Vector<S2> &,
-// const Vector<S2> &,
-// const S1) const;
-
-// template void SparseMatrix<S1>::
-// SOR<S2> (Vector<S2> &,
-// const S1) const;
-// template void SparseMatrix<S1>::
-// TSOR<S2> (Vector<S2> &,
-// const S1) const;
-// template void SparseMatrix<S1>::
-// SSOR<S2> (Vector<S2> &,
-// const S1) const;
-// template void SparseMatrix<S1>::
-// PSOR<S2> (Vector<S2> &,
-// const std::vector<size_type>&,
-// const std::vector<size_type>&,
-// const S1) const;
-// template void SparseMatrix<S1>::
-// TPSOR<S2> (Vector<S2> &,
-// const std::vector<size_type>&,
-// const std::vector<size_type>&,
-// const S1) const;
-// template void SparseMatrix<S1>::
-// SOR_step<S2> (Vector<S2> &,
-// const Vector<S2> &,
-// const S1) const;
-// template void SparseMatrix<S1>::
-// TSOR_step<S2> (Vector<S2> &,
-// const Vector<S2> &,
-// const S1) const;
-// template void SparseMatrix<S1>::
-// SSOR_step<S2> (Vector<S2> &,
-// const Vector<S2> &,
-// const S1) const;
-// }
-
-
-// for (S1, S2, S3 : COMPLEX_SCALARS;
-// V1, V2 : DEAL_II_VEC_TEMPLATES)
-// {
-// template void SparseMatrix<S1>::
-// vmult (V1<S2> &, const V2<S3> &) const;
-// template void SparseMatrix<S1>::
-// Tvmult (V1<S2> &, const V2<S3> &) const;
-// template void SparseMatrix<S1>::
-// vmult_add (V1<S2> &, const V2<S3> &) const;
-// template void SparseMatrix<S1>::
-// Tvmult_add (V1<S2> &, const V2<S3> &) const;
-// }
+for (S : COMPLEX_SCALARS)
+ {
+ template class SparseMatrix<S>;
+ }
+
+
+
+for (S1, S2 : COMPLEX_SCALARS)
+ {
+ template SparseMatrix<S1> &
+ SparseMatrix<S1>::copy_from<S2> (const SparseMatrix<S2> &);
+
+ template
+ void SparseMatrix<S1>::copy_from<S2> (const FullMatrix<S2> &);
+
+ template void SparseMatrix<S1>::add<S2> (const S1,
+ const SparseMatrix<S2> &);
+
+ template void SparseMatrix<S1>::add<S2> (const size_type,
+ const size_type,
+ const size_type *,
+ const S2 *,
+ const bool,
+ const bool);
+
+ template void SparseMatrix<S1>::set<S2> (const size_type,
+ const size_type,
+ const size_type *,
+ const S2 *,
+ const bool);
+ }
+
+
+for (S1, S2 : COMPLEX_SCALARS)
+ {
+ template S2
+ SparseMatrix<S1>::
+ matrix_norm_square<S2> (const Vector<S2> &) const;
+
+ template S2
+ SparseMatrix<S1>::
+ matrix_scalar_product<S2> (const Vector<S2> &,
+ const Vector<S2> &) const;
+
+ template S2 SparseMatrix<S1>::
+ residual<S2> (Vector<S2> &,
+ const Vector<S2> &,
+ const Vector<S2> &) const;
+
+ template void SparseMatrix<S1>::
+ precondition_SSOR<S2> (Vector<S2> &,
+ const Vector<S2> &,
+ const S1,
+ const std::vector<std::size_t>&) const;
+
+ template void SparseMatrix<S1>::
+ precondition_SOR<S2> (Vector<S2> &,
+ const Vector<S2> &,
+ const S1) const;
+
+ template void SparseMatrix<S1>::
+ precondition_TSOR<S2> (Vector<S2> &,
+ const Vector<S2> &,
+ const S1) const;
+
+ template void SparseMatrix<S1>::
+ precondition_Jacobi<S2> (Vector<S2> &,
+ const Vector<S2> &,
+ const S1) const;
+
+ template void SparseMatrix<S1>::
+ SOR<S2> (Vector<S2> &,
+ const S1) const;
+ template void SparseMatrix<S1>::
+ TSOR<S2> (Vector<S2> &,
+ const S1) const;
+ template void SparseMatrix<S1>::
+ SSOR<S2> (Vector<S2> &,
+ const S1) const;
+ template void SparseMatrix<S1>::
+ PSOR<S2> (Vector<S2> &,
+ const std::vector<size_type>&,
+ const std::vector<size_type>&,
+ const S1) const;
+ template void SparseMatrix<S1>::
+ TPSOR<S2> (Vector<S2> &,
+ const std::vector<size_type>&,
+ const std::vector<size_type>&,
+ const S1) const;
+ template void SparseMatrix<S1>::
+ Jacobi_step<S2> (Vector<S2> &,
+ const Vector<S2> &,
+ const S1) const;
+ template void SparseMatrix<S1>::
+ SOR_step<S2> (Vector<S2> &,
+ const Vector<S2> &,
+ const S1) const;
+ template void SparseMatrix<S1>::
+ TSOR_step<S2> (Vector<S2> &,
+ const Vector<S2> &,
+ const S1) const;
+ template void SparseMatrix<S1>::
+ SSOR_step<S2> (Vector<S2> &,
+ const Vector<S2> &,
+ const S1) const;
+ }
+
+for (S1, S2, S3 : COMPLEX_SCALARS;
+ V1, V2 : DEAL_II_VEC_TEMPLATES)
+ {
+ template void SparseMatrix<S1>::
+ vmult (V1<S2> &, const V2<S3> &) const;
+ template void SparseMatrix<S1>::
+ Tvmult (V1<S2> &, const V2<S3> &) const;
+ template void SparseMatrix<S1>::
+ vmult_add (V1<S2> &, const V2<S3> &) const;
+ template void SparseMatrix<S1>::
+ Tvmult_add (V1<S2> &, const V2<S3> &) const;
+ }
+
+for (S1, S2, S3: COMPLEX_SCALARS)
+ {
+ template void SparseMatrix<S1>::
+ mmult (SparseMatrix<S2> &, const SparseMatrix<S3> &, const Vector<S1>&,
+ const bool) const;
+ template void SparseMatrix<S1>::
+ Tmmult (SparseMatrix<S2> &, const SparseMatrix<S3> &, const Vector<S1>&,
+ const bool) const;
+ }