BlockVectorBase<VectorType>::mean_value () const
{
value_type sum = 0.;
+ // need to do static_cast as otherwise it won't work with value_type=complex<T>
for (size_type i=0; i<n_blocks(); ++i)
- sum += components[i].mean_value() * components[i].size();
+ sum += components[i].mean_value() * static_cast<double>(components[i].size());
- return sum/size();
+ return sum/static_cast<double>(size());
}
m->matrix->Tvmult(aux, dst.block(j));
else
m->matrix->vmult(aux, dst.block(j));
- dst.block(i).add (-1 * m->prefix, aux);
+ dst.block(i).add (-1.0 * m->prefix, aux);
}
}
Assert (diagonals.size() != 0, ExcNoDiagonal(row_num));
#endif
#ifdef DEAL_II_WITH_PETSC
+#ifdef PETSC_USE_COMPLEX
+template class BlockMatrixArray<std::complex<float>, PETScWrappers::MPI::BlockVector>;
+template class BlockMatrixArray<std::complex<double>, PETScWrappers::MPI::BlockVector>;
+template class BlockTrianglePrecondition<std::complex<float>, PETScWrappers::MPI::BlockVector>;
+template class BlockTrianglePrecondition<std::complex<double>, PETScWrappers::MPI::BlockVector>;
+#else
template class BlockMatrixArray<float, PETScWrappers::MPI::BlockVector>;
template class BlockMatrixArray<double, PETScWrappers::MPI::BlockVector>;
template class BlockTrianglePrecondition<float, PETScWrappers::MPI::BlockVector>;
template class BlockTrianglePrecondition<double, PETScWrappers::MPI::BlockVector>;
#endif
+#endif
DEAL_II_NAMESPACE_CLOSE