https://mooseframework.inl.gov
PenaltyDirichletOldValuePD.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 
13 
16 {
18  params.addClassDescription("Enforces a Dirichlet boundary condition "
19  "in a weak sense by penalizing differences between the current "
20  "solution and the old solution for transient problems.");
21 
22  params.addRequiredParam<Real>("penalty", "Penalty scalar");
23 
24  return params;
25 }
26 
28  : NodalKernel(parameters), _p(getParam<Real>("penalty")), _u_old(_var.dofValuesOld())
29 {
30 }
31 
32 Real
34 {
35  return _p * (-_u_old[_qp] + _u[_qp]);
36 }
37 
38 Real
40 {
41  return _p;
42 }
PenaltyDirichletOldValuePD(const InputParameters &parameters)
virtual Real computeQpResidual() override
static InputParameters validParams()
registerMooseObject("PeridynamicsApp", PenaltyDirichletOldValuePD)
virtual Real computeQpJacobian() override
void addRequiredParam(const std::string &name, const std::string &doc_string)
const VariableValue & _u
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
unsigned int _qp