59 template<
class TSparseSpace,
104 static constexpr
double Tolerance = std::numeric_limits<double>::epsilon();
144 const double DispRatioTolerance,
145 const double DispAbsTolerance,
146 const double RotRatioTolerance,
147 const double RotAbsTolerance,
148 const double LMNormalRatioTolerance,
149 const double LMNormalAbsTolerance,
150 const double LMTangentStickRatioTolerance,
151 const double LMTangentStickAbsTolerance,
152 const double LMTangentSlipRatioTolerance,
153 const double LMTangentSlipAbsTolerance,
154 const double NormalTangentRatio,
155 const bool EnsureContact =
false,
156 const bool PureSlip =
false,
157 const bool PrintingOutput =
false
162 mOptions.
Set(DisplacementLagrangeMultiplierFrictionalContactCriteria::ENSURE_CONTACT, EnsureContact);
163 mOptions.
Set(DisplacementLagrangeMultiplierFrictionalContactCriteria::PRINTING_OUTPUT, PrintingOutput);
164 mOptions.
Set(DisplacementLagrangeMultiplierFrictionalContactCriteria::PURE_SLIP, PureSlip);
165 mOptions.
Set(DisplacementLagrangeMultiplierFrictionalContactCriteria::TABLE_IS_INITIALIZED,
false);
166 mOptions.
Set(DisplacementLagrangeMultiplierFrictionalContactCriteria::ROTATION_DOF_IS_CONSIDERED,
false);
169 mDispRatioTolerance = DispRatioTolerance;
170 mDispAbsTolerance = DispAbsTolerance;
173 mRotRatioTolerance = RotRatioTolerance;
174 mRotAbsTolerance = RotAbsTolerance;
177 mLMNormalRatioTolerance = LMNormalRatioTolerance;
178 mLMNormalAbsTolerance = LMNormalAbsTolerance;
181 mLMTangentStickRatioTolerance = LMTangentStickRatioTolerance;
182 mLMTangentStickAbsTolerance = LMTangentStickAbsTolerance;
183 mLMTangentStickRatioTolerance = LMTangentSlipRatioTolerance;
184 mLMTangentStickAbsTolerance = LMTangentSlipAbsTolerance;
187 mNormalTangentRatio = NormalTangentRatio;
193 ,mOptions(rOther.mOptions)
194 ,mDispRatioTolerance(rOther.mDispRatioTolerance)
195 ,mDispAbsTolerance(rOther.mDispAbsTolerance)
196 ,mRotRatioTolerance(rOther.mDispRatioTolerance)
197 ,mRotAbsTolerance(rOther.mDispAbsTolerance)
198 ,mLMNormalRatioTolerance(rOther.mLMNormalRatioTolerance)
199 ,mLMNormalAbsTolerance(rOther.mLMNormalAbsTolerance)
200 ,mLMTangentStickRatioTolerance(rOther.mLMTangentStickRatioTolerance)
201 ,mLMTangentStickAbsTolerance(rOther.mLMTangentStickAbsTolerance)
202 ,mLMTangentSlipRatioTolerance(rOther.mLMTangentSlipRatioTolerance)
203 ,mLMTangentSlipAbsTolerance(rOther.mLMTangentSlipAbsTolerance)
204 ,mNormalTangentRatio(rOther.mNormalTangentRatio)
225 return Kratos::make_shared<ClassType>(ThisParameters);
251 double disp_solution_norm = 0.0, rot_solution_norm = 0.0, normal_lm_solution_norm = 0.0, tangent_lm_stick_solution_norm = 0.0, tangent_lm_slip_solution_norm = 0.0, disp_increase_norm = 0.0, rot_increase_norm = 0.0, normal_lm_increase_norm = 0.0, tangent_lm_stick_increase_norm = 0.0, tangent_lm_slip_increase_norm = 0.0;
252 IndexType disp_dof_num(0), rot_dof_num(0), lm_dof_num(0), lm_stick_dof_num(0), lm_slip_dof_num(0);
255 auto& r_nodes_array = rModelPart.
Nodes();
259 std::size_t dof_id = 0;
260 double dof_value = 0.0, dof_incr = 0.0;
262 const bool pure_slip = mOptions.
Is(DisplacementLagrangeMultiplierFrictionalContactCriteria::PURE_SLIP);
265 const std::size_t number_active_dofs = rb.size();
269 [](
const VariableData& rCurrVar) ->
bool {
return true;};
271 [](
const VariableData& rCurrVar) ->
bool {
return ((rCurrVar == DISPLACEMENT_X) || (rCurrVar == DISPLACEMENT_Y) || (rCurrVar == DISPLACEMENT_Z));};
272 const auto* p_check_disp = (mOptions.
Is(DisplacementLagrangeMultiplierFrictionalContactCriteria::ROTATION_DOF_IS_CONSIDERED)) ? &check_with_rot : &check_without_rot;
275 using FifteenReduction =
CombinedReduction<SumReduction<double>,
SumReduction<double>,
SumReduction<double>,
SumReduction<double>,
SumReduction<double>,
SumReduction<double>,
SumReduction<double>,
SumReduction<double>,
SumReduction<double>,
SumReduction<double>,
SumReduction<IndexType>,
SumReduction<IndexType>,
SumReduction<IndexType>,
SumReduction<IndexType>,
SumReduction<IndexType>>;
276 std::tie(disp_solution_norm, rot_solution_norm, normal_lm_solution_norm, tangent_lm_slip_solution_norm, tangent_lm_stick_solution_norm, disp_increase_norm, rot_increase_norm, normal_lm_increase_norm, tangent_lm_slip_increase_norm, tangent_lm_stick_increase_norm, disp_dof_num, rot_dof_num, lm_dof_num, lm_slip_dof_num, lm_stick_dof_num) = block_for_each<FifteenReduction>(rDofSet, AuxValues(), [
this,p_check_disp,&number_active_dofs,&pure_slip, &r_nodes_array,&rDx](
Dof<double>& rDof, AuxValues& aux_values) {
280 if (aux_values.dof_id < number_active_dofs) {
281 if (mActiveDofs[aux_values.dof_id] == 1) {
282 aux_values.dof_value = rDof.GetSolutionStepValue(0);
283 aux_values.dof_incr = rDx[aux_values.dof_id];
285 const auto& r_curr_var = rDof.GetVariable();
286 if (r_curr_var == VECTOR_LAGRANGE_MULTIPLIER_X || r_curr_var == VECTOR_LAGRANGE_MULTIPLIER_Y || r_curr_var == VECTOR_LAGRANGE_MULTIPLIER_Z) {
288 const auto it_node = r_nodes_array.find(rDof.Id());
290 const double mu = it_node->GetValue(FRICTION_COEFFICIENT);
291 if (mu < std::numeric_limits<double>::epsilon()) {
292 return std::make_tuple(0.0,0.0,std::pow(aux_values.dof_value, 2),0.0,0.0,0.0,0.0,std::pow(aux_values.dof_incr, 2),0.0,0.0,0,0,1,0,0);
294 const double normal = it_node->FastGetSolutionStepValue(NORMAL)[r_curr_var.GetComponentIndex()];
295 const double normal_dof_value = aux_values.dof_value * normal;
296 const double normal_dof_incr = aux_values.dof_incr * normal;
298 if (it_node->Is(SLIP) || pure_slip) {
299 return std::make_tuple(0.0,0.0,std::pow(normal_dof_value, 2),std::pow(aux_values.dof_value - normal_dof_value, 2),0.0,0.0,0.0,std::pow(normal_dof_incr, 2),std::pow(aux_values.dof_incr - normal_dof_incr, 2),0.0,0,0,1,1,0);
301 return std::make_tuple(0.0,0.0,std::pow(normal_dof_value, 2),0.0,std::pow(aux_values.dof_value - normal_dof_value, 2),0.0,0.0,std::pow(normal_dof_incr, 2),0.0,std::pow(aux_values.dof_incr - normal_dof_incr, 2),0,0,1,0,1);
304 } else if ((*p_check_disp)(r_curr_var)) {
305 return std::make_tuple(std::pow(aux_values.dof_value, 2),0.0,0.0,0.0,0.0,std::pow(aux_values.dof_incr, 2),0.0,0.0,0.0,0.0,1,0,0,0,0);
307 KRATOS_DEBUG_ERROR_IF_NOT((r_curr_var == ROTATION_X) || (r_curr_var == ROTATION_Y) || (r_curr_var == ROTATION_Z)) <<
"Variable must be a ROTATION and it is: " << r_curr_var.Name() << std::endl;
308 return std::make_tuple(0.0,std::pow(aux_values.dof_value, 2),0.0,0.0,0.0,0.0,std::pow(aux_values.dof_incr, 2),0.0,0.0,0.0,0,1,0,0,0);
312 return std::make_tuple(0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0,0,0,0,0);
315 if(disp_increase_norm <
Tolerance) disp_increase_norm = 1.0;
316 if(rot_increase_norm <
Tolerance) rot_increase_norm = 1.0;
317 if(normal_lm_increase_norm <
Tolerance) normal_lm_increase_norm = 1.0;
318 if(tangent_lm_stick_increase_norm <
Tolerance) tangent_lm_stick_increase_norm = 1.0;
319 if(tangent_lm_slip_increase_norm <
Tolerance) tangent_lm_slip_increase_norm = 1.0;
320 if(disp_solution_norm <
Tolerance) disp_solution_norm = 1.0;
322 KRATOS_ERROR_IF(mOptions.
Is(DisplacementLagrangeMultiplierFrictionalContactCriteria::ENSURE_CONTACT) && normal_lm_solution_norm <
Tolerance) <<
"WARNING::CONTACT LOST::ARE YOU SURE YOU ARE SUPPOSED TO HAVE CONTACT?" << std::endl;
324 const double disp_ratio = std::sqrt(disp_increase_norm/disp_solution_norm);
325 const double rot_ratio = std::sqrt(rot_increase_norm/rot_solution_norm);
326 const double normal_lm_ratio = normal_lm_solution_norm >
Tolerance ? std::sqrt(normal_lm_increase_norm/normal_lm_solution_norm) : 0.0;
327 const double tangent_lm_stick_ratio = tangent_lm_stick_solution_norm >
Tolerance ? std::sqrt(tangent_lm_stick_increase_norm/tangent_lm_stick_solution_norm) : 0.0;
328 const double tangent_lm_slip_ratio = tangent_lm_slip_solution_norm >
Tolerance ? std::sqrt(tangent_lm_slip_increase_norm/tangent_lm_slip_solution_norm) : 0.0;
330 const double disp_abs = std::sqrt(disp_increase_norm)/
static_cast<double>(disp_dof_num);
331 const double rot_abs = std::sqrt(rot_increase_norm)/
static_cast<double>(rot_dof_num);
332 const double normal_lm_abs = std::sqrt(normal_lm_increase_norm)/
static_cast<double>(lm_dof_num);
333 const double tangent_lm_stick_abs = lm_stick_dof_num > 0 ? std::sqrt(tangent_lm_stick_increase_norm)/
static_cast<double>(lm_stick_dof_num) : 0.0;
334 const double tangent_lm_slip_abs = lm_slip_dof_num > 0 ? std::sqrt(tangent_lm_slip_increase_norm)/
static_cast<double>(lm_slip_dof_num) : 0.0;
336 const double normal_tangent_stick_ratio = tangent_lm_stick_abs/normal_lm_abs;
337 const double normal_tangent_slip_ratio = tangent_lm_slip_abs/normal_lm_abs;
341 if (r_process_info.Has(TABLE_UTILITY)) {
342 std::cout.precision(4);
344 auto&
Table = p_table->GetTable();
345 if (mOptions.
Is(DisplacementLagrangeMultiplierFrictionalContactCriteria::ROTATION_DOF_IS_CONSIDERED)) {
346 Table << disp_ratio << mDispRatioTolerance << disp_abs << mDispAbsTolerance << rot_ratio << mRotRatioTolerance << rot_abs << mRotAbsTolerance << normal_lm_ratio << mLMNormalRatioTolerance << normal_lm_abs << mLMNormalAbsTolerance << tangent_lm_stick_ratio << mLMTangentStickRatioTolerance << tangent_lm_stick_abs << mLMTangentStickAbsTolerance << tangent_lm_slip_ratio << mLMTangentSlipRatioTolerance << tangent_lm_slip_abs << mLMTangentSlipAbsTolerance;
348 Table << disp_ratio << mDispRatioTolerance << disp_abs << mDispAbsTolerance << normal_lm_ratio << mLMNormalRatioTolerance << normal_lm_abs << mLMNormalAbsTolerance << tangent_lm_stick_ratio << mLMTangentStickRatioTolerance << tangent_lm_stick_abs << mLMTangentStickAbsTolerance << tangent_lm_slip_ratio << mLMTangentSlipRatioTolerance << tangent_lm_slip_abs << mLMTangentSlipAbsTolerance;
351 std::cout.precision(4);
352 if (mOptions.
IsNot(DisplacementLagrangeMultiplierFrictionalContactCriteria::PRINTING_OUTPUT)) {
353 KRATOS_INFO(
"DisplacementLagrangeMultiplierFrictionalContactCriteria") <<
BOLDFONT(
"DoF ONVERGENCE CHECK") <<
"\tSTEP: " << r_process_info[STEP] <<
"\tNL ITERATION: " << r_process_info[NL_ITERATION_NUMBER] << std::endl;
354 KRATOS_INFO(
"DisplacementLagrangeMultiplierFrictionalContactCriteria") <<
BOLDFONT(
"\tDISPLACEMENT: RATIO = ") << disp_ratio <<
BOLDFONT(
" EXP.RATIO = ") << mDispRatioTolerance <<
BOLDFONT(
" ABS = ") << disp_abs <<
BOLDFONT(
" EXP.ABS = ") << mDispAbsTolerance << std::endl;
355 if (mOptions.
Is(DisplacementLagrangeMultiplierFrictionalContactCriteria::ROTATION_DOF_IS_CONSIDERED)) {
356 KRATOS_INFO(
"DisplacementLagrangeMultiplierFrictionalContactCriteria") <<
BOLDFONT(
"\tROTATION: RATIO = ") << rot_ratio <<
BOLDFONT(
" EXP.RATIO = ") << mRotRatioTolerance <<
BOLDFONT(
" ABS = ") << rot_abs <<
BOLDFONT(
" EXP.ABS = ") << mRotAbsTolerance << std::endl;
358 KRATOS_INFO(
"DisplacementLagrangeMultiplierFrictionalContactCriteria") <<
BOLDFONT(
" NORMAL LAGRANGE MUL:\tRATIO = ") << normal_lm_ratio <<
BOLDFONT(
" EXP.RATIO = ") << mLMNormalRatioTolerance <<
BOLDFONT(
" ABS = ") << normal_lm_abs <<
BOLDFONT(
" EXP.ABS = ") << mLMNormalAbsTolerance << std::endl;
359 KRATOS_INFO(
"DisplacementLagrangeMultiplierFrictionalContactCriteria") <<
BOLDFONT(
" STICK LAGRANGE MUL:\tRATIO = ") << tangent_lm_stick_ratio <<
BOLDFONT(
" EXP.RATIO = ") << mLMTangentStickRatioTolerance <<
BOLDFONT(
" ABS = ") << tangent_lm_stick_abs <<
BOLDFONT(
" EXP.ABS = ") << mLMTangentStickAbsTolerance << std::endl;
360 KRATOS_INFO(
"DisplacementLagrangeMultiplierFrictionalContactCriteria") <<
BOLDFONT(
" SLIP LAGRANGE MUL:\tRATIO = ") << tangent_lm_slip_ratio <<
BOLDFONT(
" EXP.RATIO = ") << mLMTangentSlipRatioTolerance <<
BOLDFONT(
" ABS = ") << tangent_lm_slip_abs <<
BOLDFONT(
" EXP.ABS = ") << mLMTangentSlipAbsTolerance << std::endl;
362 KRATOS_INFO(
"DisplacementLagrangeMultiplierFrictionalContactCriteria") <<
"DoF ONVERGENCE CHECK" <<
"\tSTEP: " << r_process_info[STEP] <<
"\tNL ITERATION: " << r_process_info[NL_ITERATION_NUMBER] << std::endl;
363 KRATOS_INFO(
"DisplacementLagrangeMultiplierFrictionalContactCriteria") <<
"\tDISPLACEMENT: RATIO = " << disp_ratio <<
" EXP.RATIO = " << mDispRatioTolerance <<
" ABS = " << disp_abs <<
" EXP.ABS = " << mDispAbsTolerance << std::endl;
364 if (mOptions.
Is(DisplacementLagrangeMultiplierFrictionalContactCriteria::ROTATION_DOF_IS_CONSIDERED)) {
365 KRATOS_INFO(
"DisplacementLagrangeMultiplierFrictionalContactCriteria") <<
"\tROTATION: RATIO = " << rot_ratio <<
" EXP.RATIO = " << mRotRatioTolerance <<
" ABS = " << rot_abs <<
" EXP.ABS = " << mRotAbsTolerance << std::endl;
367 KRATOS_INFO(
"DisplacementLagrangeMultiplierFrictionalContactCriteria") <<
" NORMAL LAGRANGE MUL:\tRATIO = " << normal_lm_ratio <<
" EXP.RATIO = " << mLMNormalRatioTolerance <<
" ABS = " << normal_lm_abs <<
" EXP.ABS = " << mLMNormalAbsTolerance << std::endl;
368 KRATOS_INFO(
"DisplacementLagrangeMultiplierFrictionalContactCriteria") <<
" STICK LAGRANGE MUL:\tRATIO = " << tangent_lm_stick_ratio <<
" EXP.RATIO = " << mLMTangentStickRatioTolerance <<
" ABS = " << tangent_lm_stick_abs <<
" EXP.ABS = " << mLMTangentStickAbsTolerance << std::endl;
369 KRATOS_INFO(
"DisplacementLagrangeMultiplierFrictionalContactCriteria") <<
" SLIP LAGRANGE MUL:\tRATIO = " << tangent_lm_slip_ratio <<
" EXP.RATIO = " << mLMTangentSlipRatioTolerance <<
" ABS = " << tangent_lm_slip_abs <<
" EXP.ABS = " << mLMTangentSlipAbsTolerance << std::endl;
375 const bool disp_converged = (disp_ratio <= mDispRatioTolerance || disp_abs <= mDispAbsTolerance);
376 const bool rot_converged = (mOptions.
Is(DisplacementLagrangeMultiplierFrictionalContactCriteria::ROTATION_DOF_IS_CONSIDERED)) ? (rot_ratio <= mRotRatioTolerance || rot_abs <= mRotAbsTolerance) :
true;
377 const bool lm_converged = (mOptions.
IsNot(DisplacementLagrangeMultiplierFrictionalContactCriteria::ENSURE_CONTACT) && normal_lm_solution_norm <
Tolerance) ?
true : (normal_lm_ratio <= mLMNormalRatioTolerance || normal_lm_abs <= mLMNormalAbsTolerance) && (tangent_lm_stick_ratio <= mLMTangentStickRatioTolerance || tangent_lm_stick_abs <= mLMTangentStickAbsTolerance || normal_tangent_stick_ratio <= mNormalTangentRatio) && (tangent_lm_slip_ratio <= mLMTangentSlipRatioTolerance || tangent_lm_slip_abs <= mLMTangentSlipAbsTolerance || normal_tangent_slip_ratio <= mNormalTangentRatio);
379 if (disp_converged && rot_converged && lm_converged) {
381 if (r_process_info.Has(TABLE_UTILITY)) {
383 auto& r_table = p_table->GetTable();
384 if (mOptions.
IsNot(DisplacementLagrangeMultiplierFrictionalContactCriteria::PRINTING_OUTPUT))
387 r_table <<
"Achieved";
389 if (mOptions.
IsNot(DisplacementLagrangeMultiplierFrictionalContactCriteria::PRINTING_OUTPUT))
390 KRATOS_INFO(
"DisplacementLagrangeMultiplierFrictionalContactCriteria") <<
BOLDFONT(
"\tDoF") <<
" convergence is " <<
BOLDFONT(
FGRN(
"achieved")) << std::endl;
392 KRATOS_INFO(
"DisplacementLagrangeMultiplierFrictionalContactCriteria") <<
"\tDoF convergence is achieved" << std::endl;
398 if (r_process_info.Has(TABLE_UTILITY)) {
400 auto& r_table = p_table->GetTable();
401 if (mOptions.
IsNot(DisplacementLagrangeMultiplierFrictionalContactCriteria::PRINTING_OUTPUT))
404 r_table <<
"Not achieved";
406 if (mOptions.
IsNot(DisplacementLagrangeMultiplierFrictionalContactCriteria::PRINTING_OUTPUT))
407 KRATOS_INFO(
"DisplacementLagrangeMultiplierFrictionalContactCriteria") <<
BOLDFONT(
"\tDoF") <<
" convergence is " <<
BOLDFONT(
FRED(
" not achieved")) << std::endl;
409 KRATOS_INFO(
"DisplacementLagrangeMultiplierFrictionalContactCriteria") <<
"\tDoF convergence is not achieved" << std::endl;
426 BaseType::mConvergenceCriteriaIsInitialized =
true;
433 if (r_process_info.
Has(TABLE_UTILITY) && mOptions.IsNot(DisplacementLagrangeMultiplierFrictionalContactCriteria::TABLE_IS_INITIALIZED)) {
435 auto& r_table = p_table->GetTable();
436 r_table.AddColumn(
"DP RATIO", 10);
437 r_table.AddColumn(
"EXP. RAT", 10);
438 r_table.AddColumn(
"ABS", 10);
439 r_table.AddColumn(
"EXP. ABS", 10);
440 if (mOptions.Is(DisplacementLagrangeMultiplierFrictionalContactCriteria::ROTATION_DOF_IS_CONSIDERED)) {
441 r_table.AddColumn(
"RT RATIO", 10);
442 r_table.AddColumn(
"EXP. RAT", 10);
443 r_table.AddColumn(
"ABS", 10);
444 r_table.AddColumn(
"EXP. ABS", 10);
446 r_table.AddColumn(
"N.LM RATIO", 10);
447 r_table.AddColumn(
"EXP. RAT", 10);
448 r_table.AddColumn(
"ABS", 10);
449 r_table.AddColumn(
"EXP. ABS", 10);
450 if (mOptions.IsNot(DisplacementLagrangeMultiplierFrictionalContactCriteria::PURE_SLIP)) {
451 r_table.AddColumn(
"STI. RATIO", 10);
452 r_table.AddColumn(
"EXP. RAT", 10);
453 r_table.AddColumn(
"ABS", 10);
454 r_table.AddColumn(
"EXP. ABS", 10);
456 r_table.AddColumn(
"SLIP RATIO", 10);
457 r_table.AddColumn(
"EXP. RAT", 10);
458 r_table.AddColumn(
"ABS", 10);
459 r_table.AddColumn(
"EXP. ABS", 10);
460 r_table.AddColumn(
"CONVERGENCE", 15);
461 mOptions.
Set(DisplacementLagrangeMultiplierFrictionalContactCriteria::TABLE_IS_INITIALIZED,
true);
502 BaseType::FinalizeNonLinearIteration(rModelPart, rDofSet, rA, rDx, rb);
506 r_process_info.
SetValue(ACTIVE_SET_COMPUTED,
false);
517 "name" : "displacement_lagrangemultiplier_frictional_contact_criteria",
518 "ensure_contact" : false,
520 "print_convergence_criterion" : false,
521 "displacement_relative_tolerance" : 1.0e-4,
522 "displacement_absolute_tolerance" : 1.0e-9,
523 "rotation_relative_tolerance" : 1.0e-4,
524 "rotation_absolute_tolerance" : 1.0e-9,
525 "contact_displacement_relative_tolerance" : 1.0e-4,
526 "contact_displacement_absolute_tolerance" : 1.0e-9,
527 "frictional_stick_contact_displacement_relative_tolerance" : 1.0e-4,
528 "frictional_stick_contact_displacement_absolute_tolerance" : 1.0e-9,
529 "frictional_slip_contact_displacement_relative_tolerance" : 1.0e-4,
530 "frictional_slip_contact_displacement_absolute_tolerance" : 1.0e-9,
531 "ratio_normal_tangent_threshold" : 1.0e-4
535 const Parameters base_default_parameters = BaseType::GetDefaultParameters();
537 return default_parameters;
546 return "displacement_lagrangemultiplier_frictional_contact_criteria";
562 std::string
Info()
const override
564 return "DisplacementLagrangeMultiplierFrictionalContactCriteria";
606 BaseType::AssignSettings(ThisParameters);
609 mDispRatioTolerance = ThisParameters[
"displacement_relative_tolerance"].
GetDouble();
610 mDispAbsTolerance = ThisParameters[
"displacement_absolute_tolerance"].
GetDouble();
613 mRotRatioTolerance = ThisParameters[
"rotation_relative_tolerance"].
GetDouble();
614 mRotAbsTolerance = ThisParameters[
"rotation_absolute_tolerance"].
GetDouble();
617 mLMNormalRatioTolerance = ThisParameters[
"contact_displacement_relative_tolerance"].
GetDouble();
618 mLMNormalAbsTolerance = ThisParameters[
"contact_displacement_absolute_tolerance"].
GetDouble();
621 mLMTangentStickRatioTolerance = ThisParameters[
"frictional_stick_contact_displacement_relative_tolerance"].
GetDouble();
622 mLMTangentStickAbsTolerance = ThisParameters[
"frictional_stick_contact_displacement_absolute_tolerance"].
GetDouble();
623 mLMTangentSlipRatioTolerance = ThisParameters[
"frictional_slip_contact_displacement_relative_tolerance"].
GetDouble();
624 mLMTangentSlipAbsTolerance = ThisParameters[
"frictional_slip_contact_displacement_absolute_tolerance"].
GetDouble();
627 mNormalTangentRatio = ThisParameters[
"ratio_normal_tangent_threshold"].
GetDouble();
630 mOptions.Set(DisplacementLagrangeMultiplierFrictionalContactCriteria::ENSURE_CONTACT, ThisParameters[
"ensure_contact"].GetBool());
631 mOptions.Set(DisplacementLagrangeMultiplierFrictionalContactCriteria::PRINTING_OUTPUT, ThisParameters[
"print_convergence_criterion"].GetBool());
632 mOptions.Set(DisplacementLagrangeMultiplierFrictionalContactCriteria::TABLE_IS_INITIALIZED,
false);
633 mOptions.Set(DisplacementLagrangeMultiplierFrictionalContactCriteria::ROTATION_DOF_IS_CONSIDERED,
false);
634 mOptions.Set(DisplacementLagrangeMultiplierFrictionalContactCriteria::PURE_SLIP, ThisParameters[
"pure_slip"].GetBool());
648 double mDispRatioTolerance;
649 double mDispAbsTolerance;
651 double mRotRatioTolerance;
652 double mRotAbsTolerance;
654 double mLMNormalRatioTolerance;
655 double mLMNormalAbsTolerance;
657 double mLMTangentStickRatioTolerance;
658 double mLMTangentStickAbsTolerance;
659 double mLMTangentSlipRatioTolerance;
660 double mLMTangentSlipAbsTolerance;
662 double mNormalTangentRatio;
664 std::vector<int> mActiveDofs;
673 template<
class TSparseSpace,
class TDenseSpace>
675 template<
class TSparseSpace,
class TDenseSpace>
677 template<
class TSparseSpace,
class TDenseSpace>
679 template<
class TSparseSpace,
class TDenseSpace>
681 template<
class TSparseSpace,
class TDenseSpace>
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
virtual int MyPID() const
Definition: communicator.cpp:91
This is the base class to define the different convergence criterion considered.
Definition: convergence_criteria.h:58
int GetEchoLevel()
This returns the level of echo for the solving strategy.
Definition: convergence_criteria.h:209
virtual Parameters ValidateAndAssignParameters(Parameters ThisParameters, const Parameters DefaultParameters) const
This method validate and assign default parameters.
Definition: convergence_criteria.h:466
TSparseSpace::MatrixType TSystemMatrixType
Matrix type definition.
Definition: convergence_criteria.h:72
ModelPart::DofsArrayType DofsArrayType
DoF array type definition.
Definition: convergence_criteria.h:81
TSparseSpace::VectorType TSystemVectorType
Vector type definition.
Definition: convergence_criteria.h:74
bool Has(const Variable< TDataType > &rThisVariable) const
Checks if the data container has a value associated with a given variable.
Definition: data_value_container.h:382
void SetValue(const Variable< TDataType > &rThisVariable, TDataType const &rValue)
Sets the value for a given variable.
Definition: data_value_container.h:320
Dof represents a degree of freedom (DoF).
Definition: dof.h:86
EquationIdType EquationId() const
Definition: dof.h:324
void Set(const Flags ThisFlag)
Definition: flags.cpp:33
bool Is(Flags const &rOther) const
Definition: flags.h:274
static Flags Create(IndexType ThisPosition, bool Value=true)
Definition: flags.h:138
bool IsNot(Flags const &rOther) const
Definition: flags.h:291
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
Communicator & GetCommunicator()
Definition: model_part.h:1821
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
double GetDouble() const
This method returns the double contained in the current Parameter.
Definition: kratos_parameters.cpp:657
void RecursivelyAddMissingParameters(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing contain at least all parameters...
Definition: kratos_parameters.cpp:1457
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
utility function to do a sum reduction
Definition: reduction_utilities.h:68
This class represents the value of its variable depending to other variable.
Definition: piecewize_linear_table.h:63
static IndexType Size(VectorType const &rV)
return size of vector rV
Definition: ublas_space.h:190
This class is the base of variables and variable's components which contains their common data.
Definition: variable_data.h:49
#define FGRN(x)
Definition: color_utilities.h:27
#define FRED(x)
Definition: color_utilities.h:26
#define BOLDFONT(x)
Definition: color_utilities.h:34
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
#define KRATOS_INFO(label)
Definition: logger.h:250
void ComputeActiveDofs(ModelPart &rModelPart, std::vector< int > &rActiveDofs, const ModelPart::DofsArrayType &rDofSet)
This method computes the active dofs.
Definition: constraint_utilities.cpp:26
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
REACTION_CHECK_STIFFNESS_FACTOR INNER_LOOP_ITERATION DISTANCE_THRESHOLD ACTIVE_CHECK_FACTOR AUXILIAR_COORDINATES NORMAL_GAP WEIGHTED_GAP WEIGHTED_SCALAR_RESIDUAL bool
Definition: contact_structural_mechanics_application_variables.h:93
Definition: reduction_utilities.h:310