www.mooseframework.org
NodalDamper.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 "NodalDamper.h"
16 
17 // MOOSE includes
18 #include "Assembly.h"
19 #include "FEProblem.h"
20 #include "MooseVariable.h"
21 #include "SubProblem.h"
22 #include "SystemBase.h"
23 
24 #include "libmesh/quadrature.h"
25 
26 template <>
29 {
32  params.addRequiredParam<NonlinearVariableName>(
33  "variable", "The name of the variable that this damper operates on");
34  return params;
35 }
36 
38  : Damper(parameters),
40  _tid(parameters.get<THREAD_ID>("_tid")),
41  _assembly(_subproblem.assembly(_tid)),
42  _coord_sys(_assembly.coordSystem()),
43  _var(_sys.getVariable(_tid, parameters.get<NonlinearVariableName>("variable"))),
44  _current_node(_var.node()),
45  _qp(0),
46  _u_increment(_var.increment()),
47  _u(_var.nodalSln())
48 {
49 }
50 
51 Real
53 {
54  return computeQpDamping();
55 }
InputParameters validParams< MaterialPropertyInterface >()
virtual Real computeQpDamping()=0
This MUST be overridden by a child damper.
InputParameters validParams< Damper >()
Definition: Damper.C:22
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams< NodalDamper >()
Definition: NodalDamper.C:28
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...
An interface for accessing Materials.
Base class for deriving dampers.
Definition: Damper.h:35
Real computeDamping()
Computes this Damper&#39;s damping for one node.
Definition: NodalDamper.C:52
unsigned int THREAD_ID
Definition: MooseTypes.h:79
NodalDamper(const InputParameters &parameters)
Definition: NodalDamper.C:37