KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
displacement_residual_contact_criteria.h
Go to the documentation of this file.
1 // KRATOS ______ __ __ _____ __ __ __
2 // / ____/___ ____ / /_____ ______/ /_/ ___// /________ _______/ /___ ___________ _/ /
3 // / / / __ \/ __ \/ __/ __ `/ ___/ __/\__ \/ __/ ___/ / / / ___/ __/ / / / ___/ __ `/ /
4 // / /___/ /_/ / / / / /_/ /_/ / /__/ /_ ___/ / /_/ / / /_/ / /__/ /_/ /_/ / / / /_/ / /
5 // \____/\____/_/ /_/\__/\__,_/\___/\__//____/\__/_/ \__,_/\___/\__/\__,_/_/ \__,_/_/ MECHANICS
6 //
7 // License: BSD License
8 // license: ContactStructuralMechanicsApplication/license.txt
9 //
10 // Main authors: Vicente Mataix Ferrandiz
11 //
12 
13 #pragma once
14 
15 // System includes
16 
17 // External includes
18 
19 // Project includes
23 
24 namespace Kratos
25 {
28 
31 
35 
39 
43 
46 
54 template< class TSparseSpace,
55  class TDenseSpace >
57  : public ConvergenceCriteria< TSparseSpace, TDenseSpace >
58 {
59 public:
60 
63 
66 
68  KRATOS_DEFINE_LOCAL_FLAG( PRINTING_OUTPUT );
69  KRATOS_DEFINE_LOCAL_FLAG( TABLE_IS_INITIALIZED );
70  KRATOS_DEFINE_LOCAL_FLAG( ROTATION_DOF_IS_CONSIDERED );
71  KRATOS_DEFINE_LOCAL_FLAG( INITIAL_RESIDUAL_IS_SET );
72 
75 
78 
81 
84 
87 
89  using SparseSpaceType = TSparseSpace;
90 
92  using TablePrinterPointerType = TableStreamUtility::Pointer;
93 
95  using IndexType = std::size_t;
96 
100 
105  : BaseType()
106  {
107  }
108 
114  : BaseType()
115  {
116  // Validate and assign defaults
117  ThisParameters = this->ValidateAndAssignParameters(ThisParameters, this->GetDefaultParameters());
118  this->AssignSettings(ThisParameters);
119  }
120 
131  const double DispRatioTolerance,
132  const double DispAbsTolerance,
133  const double RotRatioTolerance,
134  const double RotAbsTolerance,
135  const bool PrintingOutput = false
136  )
137  : BaseType()
138  {
139  // Set local flags
140  mOptions.Set(DisplacementResidualContactCriteria::PRINTING_OUTPUT, PrintingOutput);
141  mOptions.Set(DisplacementResidualContactCriteria::TABLE_IS_INITIALIZED, false);
142  mOptions.Set(DisplacementResidualContactCriteria::ROTATION_DOF_IS_CONSIDERED, false);
143  mOptions.Set(DisplacementResidualContactCriteria::INITIAL_RESIDUAL_IS_SET, false);
144 
145  // The displacement residual
146  mDispRatioTolerance = DispRatioTolerance;
147  mDispAbsTolerance = DispAbsTolerance;
148 
149  // The rotation residual
150  mRotRatioTolerance = RotRatioTolerance;
151  mRotAbsTolerance = RotAbsTolerance;
152  }
153 
154  //* Copy constructor.
156  :BaseType(rOther)
157  ,mOptions(rOther.mOptions)
158  ,mDispRatioTolerance(rOther.mDispRatioTolerance)
159  ,mDispAbsTolerance(rOther.mDispAbsTolerance)
160  ,mDispInitialResidualNorm(rOther.mDispInitialResidualNorm)
161  ,mDispCurrentResidualNorm(rOther.mDispCurrentResidualNorm)
162  ,mRotRatioTolerance(rOther.mRotRatioTolerance)
163  ,mRotAbsTolerance(rOther.mRotAbsTolerance)
164  ,mRotInitialResidualNorm(rOther.mRotInitialResidualNorm)
165  ,mRotCurrentResidualNorm(rOther.mRotCurrentResidualNorm)
166  {
167  }
168 
171 
175 
179 
184  typename BaseType::Pointer Create(Parameters ThisParameters) const override
185  {
186  return Kratos::make_shared<ClassType>(ThisParameters);
187  }
188 
199  ModelPart& rModelPart,
200  DofsArrayType& rDofSet,
201  const TSystemMatrixType& rA,
202  const TSystemVectorType& rDx,
203  const TSystemVectorType& rb
204  ) override
205  {
206  if (SparseSpaceType::Size(rb) != 0) { //if we are solving for something
207  // Initialize
208  double disp_residual_solution_norm = 0.0;
209  IndexType disp_dof_num(0);
210  double rot_residual_solution_norm = 0.0;
211  IndexType rot_dof_num(0);
212 
213  // Auxiliary values
214  struct AuxValues {
215  std::size_t dof_id = 0;
216  double residual_dof_value = 0.0;
217  };
218 
219  // Auxiliary displacement DoF check
220  const std::function<bool(const VariableData&)> check_without_rot =
221  [](const VariableData& rCurrVar) -> bool {return true;};
222  const std::function<bool(const VariableData&)> check_with_rot =
223  [](const VariableData& rCurrVar) -> bool {return ((rCurrVar == DISPLACEMENT_X) || (rCurrVar == DISPLACEMENT_Y) || (rCurrVar == DISPLACEMENT_Z));};
224  const auto* p_check_disp = (mOptions.Is(DisplacementResidualContactCriteria::ROTATION_DOF_IS_CONSIDERED)) ? &check_with_rot : &check_without_rot;
225 
226  // Loop over Dofs
228  std::tie(disp_residual_solution_norm,disp_dof_num,rot_residual_solution_norm,rot_dof_num) = block_for_each<FourReduction>(rDofSet, AuxValues(), [&](Dof<double>& rDof, AuxValues& aux_values) {
229  if (rDof.IsFree()) {
230  aux_values.dof_id = rDof.EquationId();
231  aux_values.residual_dof_value = rb[aux_values.dof_id];
232 
233  const auto& r_curr_var = rDof.GetVariable();
234  if ((*p_check_disp)(r_curr_var)) {
235  return std::make_tuple(std::pow(aux_values.residual_dof_value, 2),1,0.0,0);
236  } else { // We will assume is rotation dof
237  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;
238  return std::make_tuple(0.0,0,std::pow(aux_values.residual_dof_value, 2),1);
239  }
240  }
241  return std::make_tuple(0.0,0,0.0,0);
242  });
243 
244  mDispCurrentResidualNorm = disp_residual_solution_norm;
245  mRotCurrentResidualNorm = rot_residual_solution_norm;
246 
247  double residual_disp_ratio = 1.0;
248  double residual_rot_ratio = 1.0;
249 
250  // We initialize the solution
251  if (mOptions.IsNot(DisplacementResidualContactCriteria::INITIAL_RESIDUAL_IS_SET)) {
252  mDispInitialResidualNorm = (disp_residual_solution_norm == 0.0) ? 1.0 : disp_residual_solution_norm;
253  residual_disp_ratio = 1.0;
254  if (mOptions.Is(DisplacementResidualContactCriteria::ROTATION_DOF_IS_CONSIDERED)) {
255  mRotInitialResidualNorm = (rot_residual_solution_norm == 0.0) ? 1.0 : rot_residual_solution_norm;
256  residual_rot_ratio = 1.0;
257  }
258  mOptions.Set(DisplacementResidualContactCriteria::INITIAL_RESIDUAL_IS_SET, true);
259  }
260 
261  // We calculate the ratio of the displacements
262  residual_disp_ratio = mDispCurrentResidualNorm/mDispInitialResidualNorm;
263  residual_rot_ratio = mRotCurrentResidualNorm/mRotInitialResidualNorm;
264 
265  // We calculate the absolute norms
266  const double residual_disp_abs = mDispCurrentResidualNorm/disp_dof_num;
267  const double residual_rot_abs = mRotCurrentResidualNorm/rot_dof_num;
268 
269  // The process info of the model part
270  ProcessInfo& r_process_info = rModelPart.GetProcessInfo();
271 
272  // We print the results // TODO: Replace for the new log
273  if (rModelPart.GetCommunicator().MyPID() == 0 && this->GetEchoLevel() > 0) {
274  if (r_process_info.Has(TABLE_UTILITY)) {
275  std::cout.precision(4);
276  TablePrinterPointerType p_table = r_process_info[TABLE_UTILITY];
277  auto& r_table = p_table->GetTable();
278  if (mOptions.Is(DisplacementResidualContactCriteria::ROTATION_DOF_IS_CONSIDERED)) {
279  r_table << residual_disp_ratio << mDispRatioTolerance << residual_disp_abs << mDispAbsTolerance << residual_rot_ratio << mRotRatioTolerance << residual_rot_abs << mRotAbsTolerance;
280  } else {
281  r_table << residual_disp_ratio << mDispRatioTolerance << residual_disp_abs << mDispAbsTolerance;
282  }
283  } else {
284  std::cout.precision(4);
285  if (mOptions.IsNot(DisplacementResidualContactCriteria::PRINTING_OUTPUT)) {
286  KRATOS_INFO("DisplacementResidualContactCriteria") << BOLDFONT("RESIDUAL CONVERGENCE CHECK") << "\tSTEP: " << r_process_info[STEP] << "\tNL ITERATION: " << r_process_info[NL_ITERATION_NUMBER] << std::endl << std::scientific;
287  KRATOS_INFO("DisplacementResidualContactCriteria") << BOLDFONT("\tDISPLACEMENT: RATIO = ") << residual_disp_ratio << BOLDFONT(" EXP.RATIO = ") << mDispRatioTolerance << BOLDFONT(" ABS = ") << residual_disp_abs << BOLDFONT(" EXP.ABS = ") << mDispAbsTolerance << std::endl;
288  if (mOptions.Is(DisplacementResidualContactCriteria::ROTATION_DOF_IS_CONSIDERED)) {
289  KRATOS_INFO("DisplacementResidualContactCriteria") << BOLDFONT("\tDISPLACEMENT: RATIO = ") << residual_rot_ratio << BOLDFONT(" EXP.RATIO = ") << mRotRatioTolerance << BOLDFONT(" ABS = ") << residual_rot_abs << BOLDFONT(" EXP.ABS = ") << mRotAbsTolerance << std::endl;
290  }
291  } else {
292  KRATOS_INFO("DisplacementResidualContactCriteria") << "RESIDUAL CONVERGENCE CHECK" << "\tSTEP: " << r_process_info[STEP] << "\tNL ITERATION: " << r_process_info[NL_ITERATION_NUMBER] << std::endl << std::scientific;
293  KRATOS_INFO("DisplacementResidualContactCriteria") << "\tDISPLACEMENT: RATIO = " << residual_disp_ratio << " EXP.RATIO = " << mDispRatioTolerance << " ABS = " << residual_disp_abs << " EXP.ABS = " << mDispAbsTolerance << std::endl;
294  if (mOptions.Is(DisplacementResidualContactCriteria::ROTATION_DOF_IS_CONSIDERED)) {
295  KRATOS_INFO("DisplacementResidualContactCriteria") << "\tDISPLACEMENT: RATIO = " << residual_rot_ratio << " EXP.RATIO = " << mRotRatioTolerance << " ABS = " << residual_rot_abs << " EXP.ABS = " << mRotAbsTolerance << std::endl;
296  }
297  }
298  }
299  }
300 
301  r_process_info[CONVERGENCE_RATIO] = residual_disp_ratio;
302  r_process_info[RESIDUAL_NORM] = residual_disp_abs;
303 
304  // We check if converged
305  const bool disp_converged = (residual_disp_ratio <= mDispRatioTolerance || residual_disp_abs <= mDispAbsTolerance);
306  const bool rot_converged = (mOptions.Is(DisplacementResidualContactCriteria::ROTATION_DOF_IS_CONSIDERED)) ? (residual_rot_ratio <= mRotRatioTolerance || residual_rot_abs <= mRotAbsTolerance) : true;
307 
308  if (disp_converged && rot_converged) {
309  if (rModelPart.GetCommunicator().MyPID() == 0 && this->GetEchoLevel() > 0) {
310  if (r_process_info.Has(TABLE_UTILITY)) {
311  TablePrinterPointerType p_table = r_process_info[TABLE_UTILITY];
312  auto& r_table = p_table->GetTable();
313  if (mOptions.IsNot(DisplacementResidualContactCriteria::PRINTING_OUTPUT))
314  r_table << BOLDFONT(FGRN(" Achieved"));
315  else
316  r_table << "Achieved";
317  } else {
318  if (mOptions.IsNot(DisplacementResidualContactCriteria::PRINTING_OUTPUT))
319  KRATOS_INFO("DisplacementResidualContactCriteria") << BOLDFONT("\tResidual") << " convergence is " << BOLDFONT(FGRN("achieved")) << std::endl;
320  else
321  KRATOS_INFO("DisplacementResidualContactCriteria") << "\tResidual convergence is achieved" << std::endl;
322  }
323  }
324  return true;
325  } else {
326  if (rModelPart.GetCommunicator().MyPID() == 0 && this->GetEchoLevel() > 0) {
327  if (r_process_info.Has(TABLE_UTILITY)) {
328  TablePrinterPointerType p_table = r_process_info[TABLE_UTILITY];
329  auto& r_table = p_table->GetTable();
330  if (mOptions.IsNot(DisplacementResidualContactCriteria::PRINTING_OUTPUT))
331  r_table << BOLDFONT(FRED(" Not achieved"));
332  else
333  r_table << "Not achieved";
334  } else {
335  if (mOptions.IsNot(DisplacementResidualContactCriteria::PRINTING_OUTPUT))
336  KRATOS_INFO("DisplacementResidualContactCriteria") << BOLDFONT("\tResidual") << " convergence is " << BOLDFONT(FRED(" not achieved")) << std::endl;
337  else
338  KRATOS_INFO("DisplacementResidualContactCriteria") << "\tResidual convergence is not achieved" << std::endl;
339  }
340  }
341  return false;
342  }
343  } else // In this case all the displacements are imposed!
344  return true;
345  }
346 
351  void Initialize( ModelPart& rModelPart) override
352  {
353  // Initialize
354  BaseType::mConvergenceCriteriaIsInitialized = true;
355 
356  // Check rotation dof
357  mOptions.Set(DisplacementResidualContactCriteria::ROTATION_DOF_IS_CONSIDERED, ContactUtilities::CheckModelPartHasRotationDoF(rModelPart));
358 
359  // Initialize header
360  ProcessInfo& r_process_info = rModelPart.GetProcessInfo();
361  if (r_process_info.Has(TABLE_UTILITY) && mOptions.IsNot(DisplacementResidualContactCriteria::TABLE_IS_INITIALIZED)) {
362  TablePrinterPointerType p_table = r_process_info[TABLE_UTILITY];
363  auto& r_table = p_table->GetTable();
364  r_table.AddColumn("DP RATIO", 10);
365  r_table.AddColumn("EXP. RAT", 10);
366  r_table.AddColumn("ABS", 10);
367  r_table.AddColumn("EXP. ABS", 10);
368  if (mOptions.Is(DisplacementResidualContactCriteria::ROTATION_DOF_IS_CONSIDERED)) {
369  r_table.AddColumn("RT RATIO", 10);
370  r_table.AddColumn("EXP. RAT", 10);
371  r_table.AddColumn("ABS", 10);
372  r_table.AddColumn("EXP. ABS", 10);
373  }
374  r_table.AddColumn("CONVERGENCE", 15);
375  mOptions.Set(DisplacementResidualContactCriteria::TABLE_IS_INITIALIZED, true);
376  }
377  }
378 
388  ModelPart& rModelPart,
389  DofsArrayType& rDofSet,
390  const TSystemMatrixType& rA,
391  const TSystemVectorType& rDx,
392  const TSystemVectorType& rb
393  ) override
394  {
395  mOptions.Set(DisplacementResidualContactCriteria::INITIAL_RESIDUAL_IS_SET, false);
396  }
397 
403  {
404  Parameters default_parameters = Parameters(R"(
405  {
406  "name" : "displacement_residual_contact_criteria",
407  "ensure_contact" : false,
408  "print_convergence_criterion" : false,
409  "residual_relative_tolerance" : 1.0e-4,
410  "residual_absolute_tolerance" : 1.0e-9,
411  "rotation_residual_relative_tolerance" : 1.0e-4,
412  "rotation_residual_absolute_tolerance" : 1.0e-9
413  })");
414 
415  // Getting base class default parameters
416  const Parameters base_default_parameters = BaseType::GetDefaultParameters();
417  default_parameters.RecursivelyAddMissingParameters(base_default_parameters);
418  return default_parameters;
419  }
420 
425  static std::string Name()
426  {
427  return "displacement_residual_contact_criteria";
428  }
429 
433 
437 
441 
443  std::string Info() const override
444  {
445  return "DisplacementResidualContactCriteria";
446  }
447 
449  void PrintInfo(std::ostream& rOStream) const override
450  {
451  rOStream << Info();
452  }
453 
455  void PrintData(std::ostream& rOStream) const override
456  {
457  rOStream << Info();
458  }
459 
461 protected:
464 
468 
472 
476 
481  void AssignSettings(const Parameters ThisParameters) override
482  {
483  BaseType::AssignSettings(ThisParameters);
484 
485  // The displacement residual
486  mDispRatioTolerance = ThisParameters["residual_relative_tolerance"].GetDouble();
487  mDispAbsTolerance = ThisParameters["residual_absolute_tolerance"].GetDouble();
488 
489  // The rotation residual
490  mRotRatioTolerance = ThisParameters["rotation_residual_relative_tolerance"].GetDouble();
491  mRotAbsTolerance = ThisParameters["rotation_residual_absolute_tolerance"].GetDouble();
492 
493  // Set local flags
494  mOptions.Set(DisplacementResidualContactCriteria::PRINTING_OUTPUT, ThisParameters["print_convergence_criterion"].GetBool());
495  mOptions.Set(DisplacementResidualContactCriteria::TABLE_IS_INITIALIZED, false);
496  mOptions.Set(DisplacementResidualContactCriteria::ROTATION_DOF_IS_CONSIDERED, false);
497  mOptions.Set(DisplacementResidualContactCriteria::INITIAL_RESIDUAL_IS_SET, false);
498  }
499 
501 private:
504 
508 
509  Flags mOptions;
510 
511  double mDispRatioTolerance;
512  double mDispAbsTolerance;
513  double mDispInitialResidualNorm;
514  double mDispCurrentResidualNorm;
515 
516  double mRotRatioTolerance;
517  double mRotAbsTolerance;
518  double mRotInitialResidualNorm;
519  double mRotCurrentResidualNorm;
520 
522 }; // Kratos DisplacementResidualContactCriteria
523 
526 
528 template<class TSparseSpace, class TDenseSpace>
529 const Kratos::Flags DisplacementResidualContactCriteria<TSparseSpace, TDenseSpace>::PRINTING_OUTPUT(Kratos::Flags::Create(1));
530 template<class TSparseSpace, class TDenseSpace>
531 const Kratos::Flags DisplacementResidualContactCriteria<TSparseSpace, TDenseSpace>::TABLE_IS_INITIALIZED(Kratos::Flags::Create(2));
532 template<class TSparseSpace, class TDenseSpace>
533 const Kratos::Flags DisplacementResidualContactCriteria<TSparseSpace, TDenseSpace>::ROTATION_DOF_IS_CONSIDERED(Kratos::Flags::Create(3));
534 template<class TSparseSpace, class TDenseSpace>
535 const Kratos::Flags DisplacementResidualContactCriteria<TSparseSpace, TDenseSpace>::INITIAL_RESIDUAL_IS_SET(Kratos::Flags::Create(4));
536 }
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
static bool CheckModelPartHasRotationDoF(ModelPart &rModelPart)
This method checks that the modelpart has a rotation DoF.
Definition: contact_utilities.cpp:147
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
Convergence criteria for contact problems This class implements a convergence control based on nodal ...
Definition: displacement_residual_contact_criteria.h:58
Dof represents a degree of freedom (DoF).
Definition: dof.h:86
bool IsFree() const
Definition: dof.h:382
Definition: flags.h:58
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
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
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
bool PostCriteria(ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &rA, const TSystemVectorType &rDx, const TSystemVectorType &rb) override
Compute relative and absolute error.
Definition: displacement_residual_contact_criteria.h:198
DisplacementResidualContactCriteria(Kratos::Parameters ThisParameters)
Default constructor. (with parameters)
Definition: displacement_residual_contact_criteria.h:113
static std::string Name()
Returns the name of the class as used in the settings (snake_case format)
Definition: displacement_residual_contact_criteria.h:425
TSparseSpace SparseSpaceType
The sparse space used.
Definition: displacement_residual_contact_criteria.h:89
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: displacement_residual_contact_criteria.h:449
KRATOS_DEFINE_LOCAL_FLAG(INITIAL_RESIDUAL_IS_SET)
std::string Info() const override
Turn back information as a string.
Definition: displacement_residual_contact_criteria.h:443
KRATOS_DEFINE_LOCAL_FLAG(PRINTING_OUTPUT)
Local Flags.
KRATOS_DEFINE_LOCAL_FLAG(TABLE_IS_INITIALIZED)
typename BaseType::TSystemVectorType TSystemVectorType
The dense vector type.
Definition: displacement_residual_contact_criteria.h:86
typename BaseType::DofsArrayType DofsArrayType
The dofs array type.
Definition: displacement_residual_contact_criteria.h:80
KRATOS_DEFINE_LOCAL_FLAG(ROTATION_DOF_IS_CONSIDERED)
BaseType::Pointer Create(Parameters ThisParameters) const override
Create method.
Definition: displacement_residual_contact_criteria.h:184
TableStreamUtility::Pointer TablePrinterPointerType
The table stream definition TODO: Replace by logger.
Definition: displacement_residual_contact_criteria.h:92
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: displacement_residual_contact_criteria.h:455
Parameters GetDefaultParameters() const override
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: displacement_residual_contact_criteria.h:402
std::size_t IndexType
The index type definition.
Definition: displacement_residual_contact_criteria.h:95
DisplacementResidualContactCriteria(DisplacementResidualContactCriteria const &rOther)
Definition: displacement_residual_contact_criteria.h:155
void AssignSettings(const Parameters ThisParameters) override
This method assigns settings to member variables.
Definition: displacement_residual_contact_criteria.h:481
void Initialize(ModelPart &rModelPart) override
This function initialize the convergence criteria.
Definition: displacement_residual_contact_criteria.h:351
~DisplacementResidualContactCriteria() override=default
Destructor.
void InitializeSolutionStep(ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &rA, const TSystemVectorType &rDx, const TSystemVectorType &rb) override
This function initializes the solution step.
Definition: displacement_residual_contact_criteria.h:387
typename BaseType::TSystemMatrixType TSystemMatrixType
The sparse matrix type.
Definition: displacement_residual_contact_criteria.h:83
DisplacementResidualContactCriteria(const double DispRatioTolerance, const double DispAbsTolerance, const double RotRatioTolerance, const double RotAbsTolerance, const bool PrintingOutput=false)
Default constructor.
Definition: displacement_residual_contact_criteria.h:130
DisplacementResidualContactCriteria()
Default constructor.
Definition: displacement_residual_contact_criteria.h:104
KRATOS_CLASS_POINTER_DEFINITION(DisplacementResidualContactCriteria)
Pointer definition of DisplacementResidualContactCriteria.
#define KRATOS_INFO(label)
Definition: logger.h:250
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