https://mooseframework.inl.gov
Loading...
Searching...
No Matches
AugmentedLagrangianContactProblem.C
Go to the documentation of this file.
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
11
12// MOOSE includes
13#include "AuxiliarySystem.h"
14#include "DisplacedProblem.h"
15#include "MooseApp.h"
16#include "MooseMesh.h"
17#include "MooseVariable.h"
18#include "NearestNodeLocator.h"
19#include "NonlinearSystem.h"
20#include "PenetrationLocator.h"
21
22#include "SystemBase.h"
23#include "Assembly.h"
24#include "Executioner.h"
25#include "AddVariableAction.h"
26#include "ConstraintWarehouse.h"
27#include "MortarUserObject.h"
30#include "Convergence.h"
31
34
35template <class T>
38{
39 InputParameters params = T::validParams();
41 params.addClassDescription("Manages nested solution for augmented Lagrange contact");
42 return params;
43}
44
45template <class T>
51
52template <class T>
53void
55{
56 _lagrangian_iteration_number = 0;
57 T::timestepSetup();
58}
59
60template <>
61void
63 const InputParameters & params_to_apply)
64{
65 std::string class_name = "AugmentedLagrangianContactReferenceConvergence";
66 InputParameters params = this->_factory.getValidParams(class_name);
67 params.applyParameters(params_to_apply);
68 params.applyParameters(parameters());
69 params.set<bool>("added_as_default") = true;
70 // TODO: Add multi-nonlinear system support
71 if (this->numNonlinearSystems() > 1)
72 mooseError("Multi-system not currently implemented");
73 this->addConvergence(class_name, this->getNonlinearConvergenceNames()[0], params);
74}
75
76template <>
77void
79 const InputParameters & params_to_apply)
80{
81 std::string class_name = "AugmentedLagrangianContactFEProblemConvergence";
82 InputParameters params = _factory.getValidParams(class_name);
83 params.applyParameters(params_to_apply);
84 params.applyParameters(parameters());
85 params.set<bool>("added_as_default") = true;
86 // TODO: Add multi-nonlinear system support
87 if (this->numNonlinearSystems() > 1)
88 mooseError("Multi-system not currently implemented");
89 this->addConvergence(class_name, this->getNonlinearConvergenceNames()[0], params);
90}
91
registerMooseObject("ContactApp", AugmentedLagrangianContactProblem)
const double T
void mooseError(Args &&... args)
Class to provide an interface for parameters and routines required to check convergence for the augme...
Class to manage nested solution for augmented Lagrange contact.
virtual void addDefaultNonlinearConvergence(const InputParameters &params) override
AugmentedLagrangianContactProblemTempl(const InputParameters &params)
void addClassDescription(const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
void applyParameters(const InputParameters &common, const std::vector< std::string > &exclude={}, const bool allow_private=false)