Skip to content

Commit

Permalink
GMG: fix order of RHS correction
Browse files Browse the repository at this point in the history
Fix the order of GMG correct_stokes_rhs() and
make_pressure_rhs_compatible().
  • Loading branch information
tjhei committed May 17, 2022
1 parent bef7da1 commit d88e235
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/simulator/assembly.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
Expand Down

0 comments on commit d88e235

Please sign in to comment.