Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #include "NumAugmentedLagrangeIterations.h" 11 : #include "AugmentedLagrangianContactProblem.h" 12 : 13 : registerMooseObject("ContactApp", NumAugmentedLagrangeIterations); 14 : 15 : InputParameters 16 74 : NumAugmentedLagrangeIterations::validParams() 17 : { 18 74 : InputParameters params = GeneralPostprocessor::validParams(); 19 74 : params.addClassDescription( 20 : "Get the number of extra augmented Lagrange loops around the non-linear solve."); 21 74 : return params; 22 0 : } 23 : 24 36 : NumAugmentedLagrangeIterations::NumAugmentedLagrangeIterations(const InputParameters & parameters) 25 : : GeneralPostprocessor(parameters), 26 36 : _augmented_lagrange_problem( 27 36 : dynamic_cast<AugmentedLagrangianContactProblemInterface *>(&_fe_problem)) 28 : 29 : { 30 36 : } 31 : 32 : PostprocessorValue 33 26 : NumAugmentedLagrangeIterations::getValue() const 34 : { 35 26 : return _augmented_lagrange_problem ? _augmented_lagrange_problem->getLagrangianIterationNumber() 36 52 : : 0; 37 : }