www.mooseframework.org
ConstantDamper.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 "ConstantDamper.h"
16 
17 template <>
20 {
22  params.addRequiredParam<Real>("damping",
23  "The percentage (between 0 and 1) of the newton update to take.");
24  return params;
25 }
26 
28  : GeneralDamper(parameters), _damping(getParam<Real>("damping"))
29 {
30 }
31 
32 Real
33 ConstantDamper::computeDamping(const NumericVector<Number> & /*solution*/,
34  const NumericVector<Number> & /*update*/)
35 {
36  return _damping;
37 }
virtual Real computeDamping(const NumericVector< Number > &solution, const NumericVector< Number > &update) override
Return the constant damping value.
Base class for deriving general dampers.
Definition: GeneralDamper.h:34
ConstantDamper(const InputParameters &parameters)
InputParameters validParams< GeneralDamper >()
Definition: GeneralDamper.C:19
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
Real _damping
The constant amount of the Newton update to take.
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...
InputParameters validParams< ConstantDamper >()