Skip to content

Conversation

@arnoldkk13
Copy link

Pull Request Checklist. Please read and check each box with an X. Delete any part not applicable. Ask on the forum if you need help with any step.

Refactored the Newton line search functionality in do_one_defect_correction_Stokes_step into a new function in helper_functions.cc.

Before your first pull request:

For all pull requests:

For new features/models or changes of existing features:

  • [X ] I have tested my new feature locally to ensure it is correct.

* Performs a Newton line search for the do_one_defect_correction_Stokes_step function
*/
template <int dim>
void Simulator<dim>::perform_line_search(const DefectCorrectionResiduals &dcr, const bool use_picard, LinearAlgebra::BlockVector &search_direction)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here:

  • return step length
  • one argument per line


/**
* Perform a newton line search to determine the optimal step length
* along the search direction.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also say that the result of the function is that current_linearization_point is set to the old current_linearization_point plus a suitable update in direction of search_direction.

@arnoldkk13 arnoldkk13 force-pushed the defect_correction_stokes_refactor branch from 8a53156 to 90b1500 Compare November 14, 2025 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants