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.
base_mortar_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
28 
29 // DEBUG
30 #include "includes/gid_io.h"
31 
32 namespace Kratos
33 {
36 
39 
43 
47 
51 
55 
62 template<class TSparseSpace, class TDenseSpace>
64  : public ConvergenceCriteria< TSparseSpace, TDenseSpace >
65 {
66 public:
69 
72 
74  KRATOS_DEFINE_LOCAL_FLAG( COMPUTE_DYNAMIC_FACTOR );
77 
80 
83 
86 
89 
92 
95 
99 
102  const bool ComputeDynamicFactor = false,
103  const bool IODebug = false,
104  const bool PureSlip = false
105  )
106  : BaseType(),
107  mpIO(nullptr)
108  {
109  // Set local flags
110  mOptions.Set(BaseMortarConvergenceCriteria::COMPUTE_DYNAMIC_FACTOR, ComputeDynamicFactor);
111  mOptions.Set(BaseMortarConvergenceCriteria::IO_DEBUG, IODebug);
112  mOptions.Set(BaseMortarConvergenceCriteria::PURE_SLIP, PureSlip);
113 
114  if (mOptions.Is(BaseMortarConvergenceCriteria::IO_DEBUG)) {
115  mpIO = Kratos::make_shared<GidIOBaseType>("POST_LINEAR_ITER", GiD_PostBinary, SingleFile, WriteUndeformed, WriteElementsOnly);
116  }
117  }
118 
124  : BaseType()
125  {
126  // Validate and assign defaults
127  ThisParameters = this->ValidateAndAssignParameters(ThisParameters, this->GetDefaultParameters());
128  this->AssignSettings(ThisParameters);
129  }
130 
133  :BaseType(rOther),
134  mOptions(rOther.mOptions),
135  mpIO(rOther.mpIO)
136  {
137  }
138 
140  ~BaseMortarConvergenceCriteria() override = default;
141 
145 
149 
154  typename BaseType::Pointer Create(Parameters ThisParameters) const override
155  {
156  return Kratos::make_shared<ClassType>(ThisParameters);
157  }
158 
169  ModelPart& rModelPart,
170  DofsArrayType& rDofSet,
171  const TSystemMatrixType& rA,
172  const TSystemVectorType& rDx,
173  const TSystemVectorType& rb
174  ) override
175  {
176  // The current process info
177  ProcessInfo& r_process_info = rModelPart.GetProcessInfo();
178 
179  // The contact model part
180  ModelPart& r_contact_model_part = rModelPart.GetSubModelPart("Contact");
181 
182  // We update the normals if necessary
183  const auto normal_variation = r_process_info.Has(CONSIDER_NORMAL_VARIATION) ? static_cast<NormalDerivativesComputation>(r_process_info.GetValue(CONSIDER_NORMAL_VARIATION)) : NormalDerivativesComputation::NO_DERIVATIVES_COMPUTATION;
185  ComputeNodesMeanNormalModelPartWithPairedNormal(rModelPart); // Update normal of the conditions
186  }
187 
188  // Update tangent (must be updated even for constant normal)
189  const bool frictional_problem = rModelPart.IsDefined(SLIP) ? rModelPart.Is(SLIP) : false;
190  if (frictional_problem) {
191  const bool has_lm = rModelPart.HasNodalSolutionStepVariable(VECTOR_LAGRANGE_MULTIPLIER);
192  if (has_lm && mOptions.IsNot(BaseMortarConvergenceCriteria::PURE_SLIP)) {
193  MortarUtilities::ComputeNodesTangentModelPart(r_contact_model_part);
194  } else {
195  MortarUtilities::ComputeNodesTangentModelPart(r_contact_model_part, &WEIGHTED_SLIP, 1.0, true);
196  }
197  }
198 
199  const bool adapt_penalty = r_process_info.Has(ADAPT_PENALTY) ? r_process_info.GetValue(ADAPT_PENALTY) : false;
200  const bool dynamic_case = rModelPart.HasNodalSolutionStepVariable(VELOCITY);
201 
202  /* Compute weighthed gap */
203  if (adapt_penalty || dynamic_case) {
204  // Set to zero the weighted gap
205  ResetWeightedGap(rModelPart);
206 
207  // Compute the contribution
209  }
210 
211  // In dynamic case
212  if ( dynamic_case && mOptions.Is(BaseMortarConvergenceCriteria::COMPUTE_DYNAMIC_FACTOR)) {
213  ComputeDynamicFactorProcess compute_dynamic_factor_process( r_contact_model_part );
214  compute_dynamic_factor_process.Execute();
215  }
216 
217  // We recalculate the penalty parameter
218  if ( adapt_penalty ) {
219  AALMAdaptPenaltyValueProcess aalm_adaptation_of_penalty( r_contact_model_part );
220  aalm_adaptation_of_penalty.Execute();
221  }
222 
223  return true;
224  }
225 
236  ModelPart& rModelPart,
237  DofsArrayType& rDofSet,
238  const TSystemMatrixType& rA,
239  const TSystemVectorType& rDx,
240  const TSystemVectorType& rb
241  ) override
242  {
243  // We save the current WEIGHTED_GAP in the buffer
244  auto& r_nodes_array = rModelPart.GetSubModelPart("Contact").Nodes();
245  block_for_each(r_nodes_array, [&](Node& rNode) {
246  rNode.FastGetSolutionStepValue(WEIGHTED_GAP, 1) = rNode.FastGetSolutionStepValue(WEIGHTED_GAP);
247  });
248 
249  // Set to zero the weighted gap
250  ResetWeightedGap(rModelPart);
251 
252  // Compute the contribution
254 
255  // GiD IO for debugging
256  if (mOptions.Is(BaseMortarConvergenceCriteria::IO_DEBUG)) {
257  const bool frictional_problem = rModelPart.IsDefined(SLIP) ? rModelPart.Is(SLIP) : false;
258  const int nl_iter = rModelPart.GetProcessInfo()[NL_ITERATION_NUMBER];
259  const double label = static_cast<double>(nl_iter);
260 
261  if (nl_iter == 1) {
262  mpIO->InitializeMesh(label);
263  mpIO->WriteMesh(rModelPart.GetMesh());
264  mpIO->FinalizeMesh();
265  mpIO->InitializeResults(label, rModelPart.GetMesh());
266  }
267 
268  mpIO->WriteNodalFlags(INTERFACE, "INTERFACE", rModelPart.Nodes(), label);
269  mpIO->WriteNodalFlags(ACTIVE, "ACTIVE", rModelPart.Nodes(), label);
270  mpIO->WriteNodalFlags(SLAVE, "SLAVE", rModelPart.Nodes(), label);
271  mpIO->WriteNodalFlags(ISOLATED, "ISOLATED", rModelPart.Nodes(), label);
272  mpIO->WriteNodalResults(NORMAL, rModelPart.Nodes(), label, 0);
273  mpIO->WriteNodalResultsNonHistorical(DYNAMIC_FACTOR, rModelPart.Nodes(), label);
274  mpIO->WriteNodalResultsNonHistorical(AUGMENTED_NORMAL_CONTACT_PRESSURE, rModelPart.Nodes(), label);
275  mpIO->WriteNodalResults(DISPLACEMENT, rModelPart.Nodes(), label, 0);
276  if (rModelPart.Nodes().begin()->SolutionStepsDataHas(VELOCITY_X)) {
277  mpIO->WriteNodalResults(VELOCITY, rModelPart.Nodes(), label, 0);
278  mpIO->WriteNodalResults(ACCELERATION, rModelPart.Nodes(), label, 0);
279  }
280  if (r_nodes_array.begin()->SolutionStepsDataHas(LAGRANGE_MULTIPLIER_CONTACT_PRESSURE))
281  mpIO->WriteNodalResults(LAGRANGE_MULTIPLIER_CONTACT_PRESSURE, rModelPart.Nodes(), label, 0);
282  else if (r_nodes_array.begin()->SolutionStepsDataHas(VECTOR_LAGRANGE_MULTIPLIER_X))
283  mpIO->WriteNodalResults(VECTOR_LAGRANGE_MULTIPLIER, rModelPart.Nodes(), label, 0);
284  mpIO->WriteNodalResults(WEIGHTED_GAP, rModelPart.Nodes(), label, 0);
285  if (frictional_problem) {
286  mpIO->WriteNodalFlags(SLIP, "SLIP", rModelPart.Nodes(), label);
287  mpIO->WriteNodalResults(WEIGHTED_SLIP, rModelPart.Nodes(), label, 0);
288  mpIO->WriteNodalResultsNonHistorical(AUGMENTED_TANGENT_CONTACT_PRESSURE, rModelPart.Nodes(), label);
289  }
290  }
291 
292  return true;
293  }
294 
299  void Initialize(ModelPart& rModelPart) override
300  {
301  // Calling base criteria
302  BaseType::Initialize(rModelPart);
303 
304  // The current process info
305  ProcessInfo& r_process_info = rModelPart.GetProcessInfo();
306  r_process_info.SetValue(ACTIVE_SET_COMPUTED, false);
307  }
308 
318  ModelPart& rModelPart,
319  DofsArrayType& rDofSet,
320  const TSystemMatrixType& rA,
321  const TSystemVectorType& rDx,
322  const TSystemVectorType& rb
323  ) override
324  {
325  // Update normal of the conditions
326  ModelPart& r_contact_model_part = rModelPart.GetSubModelPart("Contact");
327  NormalCalculationUtils().CalculateUnitNormals<ModelPart::ConditionsContainerType>(r_contact_model_part, true);
328  const bool frictional_problem = rModelPart.IsDefined(SLIP) ? rModelPart.Is(SLIP) : false;
329  if (frictional_problem) {
330  const bool has_lm = rModelPart.HasNodalSolutionStepVariable(VECTOR_LAGRANGE_MULTIPLIER);
331  if (has_lm && mOptions.IsNot(BaseMortarConvergenceCriteria::PURE_SLIP)) {
332  MortarUtilities::ComputeNodesTangentModelPart(r_contact_model_part);
333  } else {
334  MortarUtilities::ComputeNodesTangentModelPart(r_contact_model_part, &WEIGHTED_SLIP, 1.0, true);
335  }
336  }
337 
338  // IO for debugging
339  if (mOptions.Is(BaseMortarConvergenceCriteria::IO_DEBUG)) {
340  mpIO->CloseResultFile();
341  std::ostringstream new_name ;
342  new_name << "POST_LINEAR_ITER_STEP=""POST_LINEAR_ITER_STEP=" << rModelPart.GetProcessInfo()[STEP];
343  mpIO->ChangeOutputName(new_name.str());
344  }
345  }
346 
356  ModelPart& rModelPart,
357  DofsArrayType& rDofSet,
358  const TSystemMatrixType& rA,
359  const TSystemVectorType& rDx,
360  const TSystemVectorType& rb
361  ) override
362  {
363  // IO for debugging
364  if (mOptions.Is(BaseMortarConvergenceCriteria::IO_DEBUG)) {
365  mpIO->FinalizeResults();
366  }
367  }
368 
378  ModelPart& rModelPart,
379  DofsArrayType& rDofSet,
380  const TSystemMatrixType& rA,
381  const TSystemVectorType& rDx,
382  const TSystemVectorType& rb
383  ) override
384  {
385  // Calling base criteria
386  BaseType::FinalizeNonLinearIteration(rModelPart, rDofSet, rA, rDx, rb);
387 
388  // The current process info
389  ProcessInfo& r_process_info = rModelPart.GetProcessInfo();
390  r_process_info.SetValue(ACTIVE_SET_COMPUTED, false);
391  }
392 
398  {
399  Parameters default_parameters = Parameters(R"(
400  {
401  "name" : "base_mortar_criteria",
402  "compute_dynamic_factor" : false,
403  "gidio_debug" : false,
404  "pure_slip" : false
405  })" );
406 
407  // Getting base class default parameters
408  const Parameters base_default_parameters = BaseType::GetDefaultParameters();
409  default_parameters.RecursivelyAddMissingParameters(base_default_parameters);
410  return default_parameters;
411  }
412 
417  static std::string Name()
418  {
419  return "base_mortar_criteria";
420  }
421 
425 
429 
433 
435  std::string Info() const override
436  {
437  return "BaseMortarConvergenceCriteria";
438  }
439 
441  void PrintInfo(std::ostream& rOStream) const override
442  {
443  rOStream << Info();
444  }
445 
447  void PrintData(std::ostream& rOStream) const override
448  {
449  rOStream << Info();
450  }
451 
453 protected:
456 
460 
462 
466 
470 
475  void AssignSettings(const Parameters ThisParameters) override
476  {
477  BaseType::AssignSettings(ThisParameters);
478 
479  // Set local flags
480  mOptions.Set(BaseMortarConvergenceCriteria::COMPUTE_DYNAMIC_FACTOR, ThisParameters["compute_dynamic_factor"].GetBool());
481  mOptions.Set(BaseMortarConvergenceCriteria::IO_DEBUG, ThisParameters["gidio_debug"].GetBool());
482  mOptions.Set(BaseMortarConvergenceCriteria::PURE_SLIP, ThisParameters["pure_slip"].GetBool());
483 
484  if (mOptions.Is(BaseMortarConvergenceCriteria::IO_DEBUG)) {
485  mpIO = Kratos::make_shared<GidIOBaseType>("POST_LINEAR_ITER", GiD_PostBinary, SingleFile, WriteUndeformed, WriteElementsOnly);
486  }
487  }
488 
493  virtual void ResetWeightedGap(ModelPart& rModelPart)
494  {
495  auto& r_nodes_array = rModelPart.GetSubModelPart("Contact").Nodes();
496  VariableUtils().SetVariable(WEIGHTED_GAP, 0.0, r_nodes_array);
497  }
498 
500 private:
503 
507 
508  GidIOBaseType::Pointer mpIO;
509 
513 
517 
522  inline void ComputeNodesMeanNormalModelPartWithPairedNormal(ModelPart& rModelPart)
523  {
524  // Compute normal and tangent
525  ModelPart& r_contact_model_part = rModelPart.GetSubModelPart("Contact");
526  NormalCalculationUtils().CalculateUnitNormals<ModelPart::ConditionsContainerType>(r_contact_model_part, true);
527 
528  // Iterate over the computing conditions
529  ModelPart& r_computing_contact_model_part = rModelPart.GetSubModelPart("ComputingContact");
530  auto& r_conditions_array = r_computing_contact_model_part.Conditions();
531  block_for_each(r_conditions_array, [&](Condition& rCond) {
532  // Aux coordinates
533  Point::CoordinatesArrayType aux_coords;
534 
535  // We update the paired normal
536  GeometryType& r_parent_geometry = rCond.GetGeometry().GetGeometryPart(0);
537  aux_coords = r_parent_geometry.PointLocalCoordinates(aux_coords, r_parent_geometry.Center());
538  rCond.SetValue(NORMAL, r_parent_geometry.UnitNormal(aux_coords));
539  });
540  }
541 
543 }; // Class BaseMortarConvergenceCriteria
544 
547 
549 template<class TSparseSpace, class TDenseSpace>
550 const Kratos::Flags BaseMortarConvergenceCriteria<TSparseSpace, TDenseSpace>::COMPUTE_DYNAMIC_FACTOR(Kratos::Flags::Create(0));
551 template<class TSparseSpace, class TDenseSpace>
552 const Kratos::Flags BaseMortarConvergenceCriteria<TSparseSpace, TDenseSpace>::IO_DEBUG(Kratos::Flags::Create(1));
553 template<class TSparseSpace, class TDenseSpace>
554 const Kratos::Flags BaseMortarConvergenceCriteria<TSparseSpace, TDenseSpace>::PURE_SLIP(Kratos::Flags::Create(2));
555 
556 } // namespace Kratos
This process is used in order to adapt the penalty in the ALM formulation.
Definition: aalm_adapt_penalty_value_process.h:50
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: aalm_adapt_penalty_value_process.cpp:25
Custom convergence criteria for the mortar condition.
Definition: base_mortar_criteria.h:65
This process is used in order to compute the dynamic factor for dynamic problems.
Definition: compute_dynamic_factor_process.h:49
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: compute_dynamic_factor_process.cpp:24
Base class for all Conditions.
Definition: condition.h:59
static void ComputeExplicitContributionConditions(ModelPart &rModelPart)
It computes the explicit contributions of the conditions.
Definition: contact_utilities.cpp:182
This is the base class to define the different convergence criterion considered.
Definition: convergence_criteria.h:58
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
virtual Parameters GetDefaultParameters() const
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: convergence_criteria.h:384
virtual void Initialize(ModelPart &rModelPart)
This function initialize the convergence criteria.
Definition: convergence_criteria.h:276
virtual void FinalizeNonLinearIteration(ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &rA, const TSystemVectorType &rDx, const TSystemVectorType &rb)
This function finalizes the non-linear iteration.
Definition: convergence_criteria.h:356
TSparseSpace::VectorType TSystemVectorType
Vector type definition.
Definition: convergence_criteria.h:74
virtual void AssignSettings(const Parameters ThisParameters)
This method assigns settings to member variables.
Definition: convergence_criteria.h:479
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
TDataType & GetValue(const Variable< TDataType > &rThisVariable)
Gets the value associated with a given variable.
Definition: data_value_container.h:268
Definition: flags.h:58
void Set(const Flags ThisFlag)
Definition: flags.cpp:33
bool IsDefined(Flags const &rOther) const
Definition: flags.h:279
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
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
void SetValue(const TVariableType &rThisVariable, typename TVariableType::Type const &rValue)
Definition: geometrical_object.h:238
Geometry base class.
Definition: geometry.h:71
virtual array_1d< double, 3 > UnitNormal(const CoordinatesArrayType &rPointLocalCoordinates) const
It computes the unit normal of the geometry in the given local point.
Definition: geometry.h:1639
virtual CoordinatesArrayType & PointLocalCoordinates(CoordinatesArrayType &rResult, const CoordinatesArrayType &rPoint) const
Returns the local coordinates of a given arbitrary point.
Definition: geometry.h:1854
virtual Point Center() const
Definition: geometry.h:1514
This class defines an interface to the GiDPost library in order to provide GiD compliant I/O function...
Definition: gid_io.h:112
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MeshType::ConditionsContainerType ConditionsContainerType
Condintions container. A vector set of Conditions with their Id's as key.
Definition: model_part.h:183
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
bool HasNodalSolutionStepVariable(VariableData const &ThisVariable) const
Definition: model_part.h:544
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
ModelPart & GetSubModelPart(std::string const &SubModelPartName)
Definition: model_part.cpp:2029
MeshType & GetMesh(IndexType ThisIndex=0)
Definition: model_part.h:1791
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
This class defines the node.
Definition: node.h:65
TVariableType::Type & FastGetSolutionStepValue(const TVariableType &rThisVariable)
Definition: node.h:435
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
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
This class implements a set of auxiliar, already parallelized, methods to perform some common tasks r...
Definition: variable_utils.h:63
void SetVariable(const TVarType &rVariable, const TDataType &rValue, NodesContainerType &rNodes, const unsigned int Step=0)
Sets the nodal value of a scalar variable.
Definition: variable_utils.h:675
Short class definition.
Definition: array_1d.h:61
BaseType::Pointer Create(Parameters ThisParameters) const override
Create method.
Definition: base_mortar_criteria.h:154
BaseMortarConvergenceCriteria(const bool ComputeDynamicFactor=false, const bool IODebug=false, const bool PureSlip=false)
Default constructors.
Definition: base_mortar_criteria.h:101
void Initialize(ModelPart &rModelPart) override
This function initialize the convergence criteria.
Definition: base_mortar_criteria.h:299
typename BaseType::DofsArrayType DofsArrayType
The dofs array type.
Definition: base_mortar_criteria.h:85
void FinalizeNonLinearIteration(ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &rA, const TSystemVectorType &rDx, const TSystemVectorType &rb) override
This function finalizes the non-linear iteration.
Definition: base_mortar_criteria.h:377
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: base_mortar_criteria.h:447
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: base_mortar_criteria.h:441
virtual void ResetWeightedGap(ModelPart &rModelPart)
This method resets the weighted gap in the nodes of the problem.
Definition: base_mortar_criteria.h:493
BaseMortarConvergenceCriteria(Kratos::Parameters ThisParameters)
Default constructor. (with parameters)
Definition: base_mortar_criteria.h:123
static std::string Name()
Returns the name of the class as used in the settings (snake_case format)
Definition: base_mortar_criteria.h:417
void FinalizeSolutionStep(ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &rA, const TSystemVectorType &rDx, const TSystemVectorType &rb) override
This function finalizes the solution step.
Definition: base_mortar_criteria.h:355
~BaseMortarConvergenceCriteria() override=default
Destructor.
KRATOS_DEFINE_LOCAL_FLAG(COMPUTE_DYNAMIC_FACTOR)
Local Flags.
typename BaseType::TSystemMatrixType TSystemMatrixType
The sparse matrix type.
Definition: base_mortar_criteria.h:88
std::string Info() const override
Turn back information as a string.
Definition: base_mortar_criteria.h:435
BaseMortarConvergenceCriteria(BaseMortarConvergenceCriteria const &rOther)
Copy constructor.
Definition: base_mortar_criteria.h:132
bool PostCriteria(ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &rA, const TSystemVectorType &rDx, const TSystemVectorType &rb) override
Compute relative and absolute error.
Definition: base_mortar_criteria.h:235
typename BaseType::TSystemVectorType TSystemVectorType
The dense vector type.
Definition: base_mortar_criteria.h:91
KRATOS_CLASS_POINTER_DEFINITION(BaseMortarConvergenceCriteria)
Pointer definition of BaseMortarConvergenceCriteria.
Flags mOptions
Definition: base_mortar_criteria.h:461
void InitializeSolutionStep(ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &rA, const TSystemVectorType &rDx, const TSystemVectorType &rb) override
This function initializes the solution step.
Definition: base_mortar_criteria.h:317
bool PreCriteria(ModelPart &rModelPart, DofsArrayType &rDofSet, const TSystemMatrixType &rA, const TSystemVectorType &rDx, const TSystemVectorType &rb) override
Criterias that need to be called before getting the solution.
Definition: base_mortar_criteria.h:168
Parameters GetDefaultParameters() const override
This method provides the defaults parameters to avoid conflicts between the different constructors.
Definition: base_mortar_criteria.h:397
void AssignSettings(const Parameters ThisParameters) override
This method assigns settings to member variables.
Definition: base_mortar_criteria.h:475
void ComputeNodesTangentModelPart(ModelPart &rModelPart, const Variable< array_1d< double, 3 >> *pSlipVariable, const double SlipCoefficient, const bool SlipAlways)
It computes the tangent in all the nodes of the model part.
Definition: mortar_utilities.cpp:149
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
@ WriteUndeformed
Definition: gid_io.h:52
@ SingleFile
Definition: gid_io.h:54
NormalDerivativesComputation
An enumeration of the different options for normal derivatives computation.
Definition: contact_structural_mechanics_application_variables.h:57
@ NO_DERIVATIVES_COMPUTATION
No computation of normal derivatives.
void block_for_each(TIterator itBegin, TIterator itEnd, TFunction &&rFunction)
Execute a functor on all items of a range in parallel.
Definition: parallel_utilities.h:299
@ WriteElementsOnly
Definition: gid_io.h:53
Tool to evaluate the normals on nodes based on the normals of a set of surface conditions.
label
Definition: angle_finder.py:48