From d88e235bfd31577c35f2d9e42a7a11f837a89e2d Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Wed, 25 Aug 2021 12:03:49 -0400 Subject: [PATCH] GMG: fix order of RHS correction Fix the order of GMG correct_stokes_rhs() and make_pressure_rhs_compatible(). --- source/simulator/assembly.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/simulator/assembly.cc b/source/simulator/assembly.cc index a6cc205e389..28792deb442 100644 --- a/source/simulator/assembly.cc +++ b/source/simulator/assembly.cc @@ -813,10 +813,6 @@ namespace aspect system_matrix.compress(VectorOperation::add); system_rhs.compress(VectorOperation::add); - // If we change the system_rhs, matrix-free Stokes must update - if (stokes_matrix_free) - stokes_matrix_free->assemble(); - // if the model is compressible then we need to adjust the right hand // side of the equation to make it compatible with the matrix on the // left @@ -826,6 +822,10 @@ namespace aspect make_pressure_rhs_compatible(system_rhs); } + // If we change the system_rhs, matrix-free Stokes must update + if (stokes_matrix_free) + stokes_matrix_free->assemble(); + // record that we have just rebuilt the matrix rebuild_stokes_matrix = false; }