@@ -37,7 +37,7 @@ void ApplyDirichletConditions(typename TSparse::MatrixType& rRelationMatrix,
37
37
int Verbosity)
38
38
{
39
39
// Sanity checks.
40
- KRATOS_ERROR_IF_NOT (std::distance (itDofBegin, itDofEnd) == rRelationMatrix.size2 ());
40
+ KRATOS_ERROR_IF_NOT (static_cast < typename TSparse::IndexType>( std::distance (itDofBegin, itDofEnd) ) == rRelationMatrix.size2 ());
41
41
KRATOS_ERROR_IF_NOT (rConstraintGaps.size () == rRelationMatrix.size1 ());
42
42
43
43
KRATOS_TRY
@@ -181,9 +181,8 @@ AugmentedLagrangeConstraintAssembler<TSparse,TDense>::AugmentedLagrangeConstrain
181
181
mpImpl->mpPenaltyFunctor = std::make_unique<Scaling>(Settings[" penalty_factor" ]);
182
182
183
183
// Parse other algorithmic settings.
184
- Vector algorithmic_parameters (2 );
185
- algorithmic_parameters[0 ] = Settings[" initial_lagrange_multiplier" ].Get <double >();
186
- algorithmic_parameters[1 ] = Settings[" tolerance" ].Get <double >();
184
+ Vector algorithmic_parameters (1 );
185
+ algorithmic_parameters[0 ] = Settings[" tolerance" ].Get <double >();
187
186
this ->SetValue (this ->GetAlgorithmicParametersVariable (), algorithmic_parameters);
188
187
this ->SetValue (NL_ITERATION_NUMBER, Settings[" max_iterations" ].Get <int >());
189
188
@@ -306,7 +305,6 @@ void AugmentedLagrangeConstraintAssembler<TSparse,TDense>::Initialize(typename T
306
305
using SparseUtils = SparseMatrixMultiplicationUtility;
307
306
mpImpl->mpPenaltyFunctor ->template Cache <TSparse>(rLhs);
308
307
const typename TSparse::DataType penalty_factor = this ->GetPenaltyFactor ();
309
- const typename TSparse::DataType initial_lagrange_multiplier = this ->GetInitialLagrangeMultiplier ();
310
308
311
309
// Apply initial penalty- and lagrange terms to the left- and right hand sides.
312
310
{
@@ -333,22 +331,9 @@ void AugmentedLagrangeConstraintAssembler<TSparse,TDense>::Initialize(typename T
333
331
penalty_factor);
334
332
335
333
// Add terms to the RHS vector.
336
- typename TSparse::VectorType rhs_term (rRhs.size ()),
337
- lagrange_multipliers (this ->GetRelationMatrix ().size1 (),
338
- initial_lagrange_multiplier);
339
-
340
- TSparse::UnaliasedAdd (lagrange_multipliers,
341
- -penalty_factor,
342
- this ->GetConstraintGapVector ());
343
-
344
- TSparse::SetToZero (rhs_term);
345
334
BalancedProduct<TSparse,TSparse,TSparse>(r_transpose_relation_matrix,
346
- lagrange_multipliers,
347
- rhs_term);
348
-
349
- TSparse::UnaliasedAdd (rRhs,
350
- -1.0 ,
351
- rhs_term);
335
+ this ->GetConstraintGapVector (),
336
+ rRhs);
352
337
}
353
338
KRATOS_CATCH (" " )
354
339
}
@@ -436,7 +421,6 @@ Parameters AugmentedLagrangeConstraintAssembler<TSparse,TDense>::GetDefaultParam
436
421
return Parameters (R"( {
437
422
"method" : "augmented_lagrange",
438
423
"penalty_factor" : "norm",
439
- "initial_lagrange_multiplier" : 0.0,
440
424
"tolerance" : 1e-6,
441
425
"max_iterations" : 1e1,
442
426
"verbosity" : 1
0 commit comments