old_temperature_solution = temperature_solution;
if (old_time_step > 0)
{
- stokes_solution.sadd (1.+time_step/old_time_step, -time_step/old_time_step,
- old_old_stokes_solution);
- temperature_solution.sadd (1.+time_step/old_time_step,
- -time_step/old_time_step,
- old_old_temperature_solution);
+ //Trilinos sadd does not like ghost vectors even as input. Copy into distributed vectors for now:
+ {
+ TrilinosWrappers::MPI::BlockVector distr_solution (stokes_rhs);
+ distr_solution = stokes_solution;
+ TrilinosWrappers::MPI::BlockVector distr_old_solution (stokes_rhs);
+ distr_old_solution = old_old_stokes_solution;
+ distr_solution .sadd (1.+time_step/old_time_step, -time_step/old_time_step,
+ distr_old_solution);
+ stokes_solution = distr_solution;
+ }
+ {
+ TrilinosWrappers::MPI::Vector distr_solution (temperature_rhs);
+ distr_solution = temperature_solution;
+ TrilinosWrappers::MPI::Vector distr_old_solution (temperature_rhs);
+ distr_old_solution = old_old_temperature_solution;
+ distr_solution .sadd (1.+time_step/old_time_step, -time_step/old_time_step,
+ distr_old_solution);
+ temperature_solution = distr_solution;
+ }
}
if ((timestep_number > 0) && (timestep_number % 100 == 0))