This class implements a custom line search for use with mechanical contact. More...
#include <ContactLineSearchBase.h>
Public Member Functions | |
ContactLineSearchBase (const InputParameters ¶meters) | |
void | printContactInfo (const std::set< dof_id_type > &contact_set) |
Method for printing the contact information. More... | |
void | insertSet (const std::set< dof_id_type > &mech_set) |
Unionize sets from different constraints. More... | |
virtual void | reset () |
Reset the line search data. More... | |
Protected Attributes | |
std::set< dof_id_type > | _current_contact_state |
The current contact set. More... | |
std::set< dof_id_type > | _old_contact_state |
The old contact set. More... | |
Real | _user_ksp_rtol |
the linear tolerance set by the user in the input file More... | |
bool | _user_ksp_rtol_set |
Whether the user linear tolerance has been set yet in this object. More... | |
Real | _contact_lambda |
The multiplier of the newton step. More... | |
unsigned | _allowed_lambda_cuts |
How many times the linsearch is allowed to cut lambda. More... | |
Real | _contact_ltol |
What the linear tolerance should be while the contact state is changing. More... | |
bool | _affect_ltol |
Whether to modify the linear tolerance. More... | |
This class implements a custom line search for use with mechanical contact.
The line search is not fancy. It takes two parameters, set in the MOOSE Executioner block: contact_line_search_ltol
and contact_line_search_allowed_lambda_cuts
. The allowed_lambda_cuts parameter specifies the number of times the line search is allowed to cut lambda. If allowed to be cut, lambda will be reduced by half, and a new residual will be evaluated. If the residual is smaller with a smaller lambda, then cuts will continue until reaching allowed_lambda_cuts. If the residual is larger with a smaller lambda, then the line search is curtailed and the smaller residual is used. It's recommended that allowed_lambda_cuts be <= 3, with smaller values being used for smaller contact problems. This is to allow necessary residual increases when the transient problem requires significant changes in the contact state.
When the contact set is changing, the user may optionally use a looser linear tolerance set by the contact_line_search_ltol
parameter. Then when the contact set is changing during the beginning of the Newton solve, unnecessary computational expense is avoided. Then when the contact set is resolved late in the Newton solve, the linear tolerance will return to the finer tolerance set through the traditional l_tol
parameter.
Definition at line 38 of file ContactLineSearchBase.h.
ContactLineSearchBase::ContactLineSearchBase | ( | const InputParameters & | parameters | ) |
Definition at line 35 of file ContactLineSearchBase.C.
void ContactLineSearchBase::insertSet | ( | const std::set< dof_id_type > & | mech_set | ) |
Unionize sets from different constraints.
Definition at line 54 of file ContactLineSearchBase.C.
Referenced by MechanicalContactConstraint::residualEnd().
void ContactLineSearchBase::printContactInfo | ( | const std::set< dof_id_type > & | contact_set | ) |
Method for printing the contact information.
Definition at line 45 of file ContactLineSearchBase.C.
Referenced by PetscContactLineSearch::lineSearch().
|
virtual |
Reset the line search data.
Definition at line 64 of file ContactLineSearchBase.C.
Referenced by MechanicalContactConstraint::timestepSetup().
|
protected |
Whether to modify the linear tolerance.
Definition at line 79 of file ContactLineSearchBase.h.
Referenced by PetscContactLineSearch::lineSearch().
|
protected |
How many times the linsearch is allowed to cut lambda.
Definition at line 73 of file ContactLineSearchBase.h.
Referenced by PetscContactLineSearch::lineSearch().
|
protected |
The multiplier of the newton step.
Definition at line 70 of file ContactLineSearchBase.h.
Referenced by PetscContactLineSearch::lineSearch().
|
protected |
What the linear tolerance should be while the contact state is changing.
Definition at line 76 of file ContactLineSearchBase.h.
Referenced by PetscContactLineSearch::lineSearch().
|
protected |
The current contact set.
Definition at line 60 of file ContactLineSearchBase.h.
Referenced by insertSet(), PetscContactLineSearch::lineSearch(), and reset().
|
protected |
The old contact set.
Definition at line 62 of file ContactLineSearchBase.h.
Referenced by PetscContactLineSearch::lineSearch().
|
protected |
the linear tolerance set by the user in the input file
Definition at line 65 of file ContactLineSearchBase.h.
Referenced by PetscContactLineSearch::lineSearch().
|
protected |
Whether the user linear tolerance has been set yet in this object.
Definition at line 67 of file ContactLineSearchBase.h.
Referenced by PetscContactLineSearch::lineSearch().