https://mooseframework.inl.gov
Loading...
Searching...
No Matches
TestNewmarkTI.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
10#include "TestNewmarkTI.h"
11
12registerMooseObject("SolidMechanicsApp", TestNewmarkTI);
13
16{
18 params.addClassDescription("Assigns the velocity/acceleration calculated by time integrator to "
19 "the velocity/acceleration auxvariable.");
21 "displacement",
22 "The variable whose first/second derivative needs to be copied to the provided auxvariable.");
23 params.addParam<bool>("first",
24 true,
25 "Set to true to copy the first derivative to the auxvariable. If false, "
26 "the second derivative is copied.");
27 return params;
28}
29
31 : AuxKernel(parameters),
32 _first(getParam<bool>("first")),
33 _value(_first ? coupledDot("displacement") : coupledDotDot("displacement"))
34{
35}
36
37Real
39{
40 if (!isNodal())
41 mooseError("must run on a nodal variable");
42
43 // assigns the first/second time derivative of displacement to the provided auxvariable
44 return _value[_qp];
45}
registerMooseObject("SolidMechanicsApp", TestNewmarkTI)
static InputParameters validParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void mooseError(Args &&... args) const
static InputParameters validParams()
virtual Real computeValue()
const VariableValue & _value
Value of the first/second time derivative of dispalcement.
TestNewmarkTI(const InputParameters &parameters)
Stores the velocity/acceleration computed using the time integrator into the provided auxvariable.