Skip to content

Commit

Permalink
Fix in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
gassmoeller committed Nov 7, 2024
1 parent 3e383b9 commit e1ed43c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source/simulator/solver_schemes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,11 @@ namespace aspect
current_linearization_point.block(velocity_block_index) = backup_linearization_point.block(velocity_block_index);
}

current_linearization_point.block(pressure_block_index).add(step_length_factor, search_direction.block(pressure_block_index));
current_linearization_point.block(velocity_block_index).add(step_length_factor, search_direction.block(velocity_block_index));
search_direction.block(pressure_block_index) *= step_length_factor;
search_direction.block(velocity_block_index) *= step_length_factor;

current_linearization_point.block(pressure_block_index) += search_direction.block(pressure_block_index);
current_linearization_point.block(velocity_block_index) += search_direction.block(velocity_block_index);

// Rebuild the rhs to determine the new residual.
assemble_newton_stokes_matrix = rebuild_stokes_preconditioner = false;
Expand Down Expand Up @@ -692,7 +695,7 @@ namespace aspect
* The line search step was not sufficient to decrease the residual
* enough, so we take a smaller step to see if it improves the residual.
*/
step_length_factor *= (2.0/3.0);// TODO: make a parameter out of this.
step_length_factor = 2.0/3.0;// TODO: make a parameter out of this.
}

++line_search_iteration;
Expand Down

0 comments on commit e1ed43c

Please sign in to comment.