Mariia
> Anyway, I rewrote several script parts to get rid of block matrices and
> vectors. The compiler does not complain anymore, while building CXX object,
> but it returns an error while linking CXX executable. It concerns the
> affine_constraints (as provided below). I wonder, whether there is a problem
> for using complex type constraints in terms of parallel computing? Could you
> please assist in understanding the issue?
>
> Thank you a lot!
>
> Kind regards,
> Mariia Bronzova
>
> /home/masianichik/dealii/include/deal.II/lac/affine_constraints.h:2475: error:
> undefined reference to 'void dealii::AffineConstraints<std::complex<double>
> >::distribute_local_to_global<dealii::PETScWrappers::MPI::SparseMatrix,
> dealii::PETScWrappers::MPI::Vector>(dealii::FullMatrix<std::complex<double> >
> const&, dealii::Vector<std::complex<double> > const&, std::vector<unsigned
> int, std::allocator<unsigned int> > const&,
> dealii::PETScWrappers::MPI::SparseMatrix&,
> dealii::PETScWrappers::MPI::Vector&, bool, std::integral_constant<bool,
> false>) const'
I have to admit that I don't understand the problem -- but I also don't have
an installation that uses complex PETSc types. If you look at the bottom of
source/lac/affine_constraints.cc in the deal.II installation that you
compiled, you will find these lines:
#define INSTANTIATE_DLTG_VECTORMATRIX(MatrixType, VectorType) \
template void AffineConstraints<MatrixType::value_type>:: \
distribute_local_to_global<MatrixType, VectorType>( \
const FullMatrix<MatrixType::value_type> &, \
const Vector<VectorType::value_type> &, \
const std::vector<AffineConstraints::size_type> &, \
MatrixType &, \
VectorType &, \
bool, \
std::integral_constant<bool, false>) const
...
INSTANTIATE_DLTG_VECTORMATRIX(PETScWrappers::SparseMatrix, Vector<PetscScalar>);
INSTANTIATE_DLTG_VECTORMATRIX(PETScWrappers::SparseMatrix,
PETScWrappers::MPI::Vector);
INSTANTIATE_DLTG_VECTORMATRIX(PETScWrappers::MPI::SparseMatrix,
Vector<PetscScalar>);
INSTANTIATE_DLTG_VECTORMATRIX(PETScWrappers::MPI::SparseMatrix,
PETScWrappers::MPI::Vector);
This should tell the compiler to compile the (first) function you are missing
above. In particular, the last two lines should do this. I don't have an idea
why that isn't working. You might have to dig around a bit to see why it is
not instantiating the function you want.