This only happens when one uses PETSc for linear algebra, which we probably don’t test very well. Can you try whether the following patch works for you:
@bangerth The patch you have provided works. Thank you very much.
However, now I have encountered another problem with building simulator/stokes_matrix_free.cc.o and it has generated 7 error messages with each one along the lines of:
/InstallDirectory/aspect/source/simulator/stokes_matrix_free.cc:1408:5: error: no matching function for call to ‘copy’
internal::ChangeVectorTypes::copy(stokes_rhs_correction,rhs_correction);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/InstallDirectory/aspect/source/simulator/stokes_matrix_free.cc:411:12: note: candidate function not viable: no known conversion from ‘LinearAlgebra::BlockVector’
(aka ‘dealii::PETScWrappers::MPI::BlockVector’) to ‘TrilinosWrappers::MPI::BlockVector &’ for 1st argument
void copy(TrilinosWrappers::MPI::BlockVector &out,
^
/InstallDirectory/aspect/source/simulator/stokes_matrix_free.cc:393:12: note: candidate function not viable: no known conversion from ‘LinearAlgebra::BlockVector’
(aka ‘dealii::PETScWrappers::MPI::BlockVector’) to ‘TrilinosWrappers::MPI::Vector &’ for 1st argument
void copy(TrilinosWrappers::MPI::Vector &out,
^
/InstallDirectory/aspect/source/simulator/stokes_matrix_free.cc:403:12: note: candidate function not viable: no known conversion from ‘LinearAlgebra::BlockVector’
(aka ‘dealii::PETScWrappers::MPI::BlockVector’) to ‘dealii::LinearAlgebra::distributed::Vector &’ for 1st argument
void copy(dealii::LinearAlgebra::distributed::Vector &out,
^
/InstallDirectory/aspect/source/simulator/stokes_matrix_free.cc:419:12: note: candidate function not viable: no known conversion from ‘LinearAlgebra::BlockVector’
(aka ‘dealii::PETScWrappers::MPI::BlockVector’) to ‘dealii::LinearAlgebra::distributed::BlockVector &’ for 1st argument
void copy(dealii::LinearAlgebra::distributed::BlockVector &out,