www.mooseframework.org
MaxIncrement.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "MaxIncrement.h"
16 
17 template <>
20 {
22  params.addRequiredParam<Real>("max_increment", "The maximum newton increment for the variable.");
23  return params;
24 }
25 
27  : ElementDamper(parameters), _max_increment(parameters.get<Real>("max_increment"))
28 {
29 }
30 
31 Real
33 {
34 
35  if (std::abs(_u_increment[_qp]) > _max_increment)
36  {
37  return std::abs(_max_increment / _u_increment[_qp]);
38  }
39 
40  return 1.0;
41 }
InputParameters validParams< MaxIncrement >()
Definition: MaxIncrement.C:19
unsigned int _qp
Quadrature point index.
Definition: ElementDamper.h:74
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Real _max_increment
The maximum Newton increment for the variable.
Definition: MaxIncrement.h:39
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
VariableValue & _u_increment
The current Newton increment.
Definition: ElementDamper.h:83
MaxIncrement(const InputParameters &parameters)
Definition: MaxIncrement.C:26
virtual Real computeQpDamping() override
This MUST be overridden by a child damper.
Definition: MaxIncrement.C:32
Base class for deriving element dampers.
Definition: ElementDamper.h:37
InputParameters validParams< ElementDamper >()
Definition: ElementDamper.C:28