https://mooseframework.inl.gov
Loading...
Searching...
No Matches
peridynamics
src
nodalkernels
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
10
#include "
PenaltyDirichletOldValuePD.h
"
11
12
registerMooseObject
(
"PeridynamicsApp"
,
PenaltyDirichletOldValuePD
);
13
14
InputParameters
15
PenaltyDirichletOldValuePD::validParams
()
16
{
17
InputParameters
params =
NodalKernel::validParams
();
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
27
PenaltyDirichletOldValuePD::PenaltyDirichletOldValuePD
(
const
InputParameters
& parameters)
28
:
NodalKernel
(parameters), _p(getParam<Real>(
"penalty"
)), _u_old(_var.dofValuesOld())
29
{
30
}
31
32
Real
33
PenaltyDirichletOldValuePD::computeQpResidual
()
34
{
35
return
_p
* (-
_u_old
[
_qp
] +
_u
[
_qp
]);
36
}
37
38
Real
39
PenaltyDirichletOldValuePD::computeQpJacobian
()
40
{
41
return
_p
;
42
}
registerMooseObject
registerMooseObject("PeridynamicsApp", PenaltyDirichletOldValuePD)
PenaltyDirichletOldValuePD.h
InputParameters::addRequiredParam
void addRequiredParam(const std::string &name, const std::string &doc_string)
InputParameters::addClassDescription
void addClassDescription(const std::string &doc_string)
NodalKernel::_qp
unsigned int _qp
NodalKernel
NodalKernel::validParams
static InputParameters validParams()
NodalKernel::_u
const VariableValue & _u
PenaltyDirichletOldValuePD
Definition
PenaltyDirichletOldValuePD.h:17
PenaltyDirichletOldValuePD::validParams
static InputParameters validParams()
Definition
PenaltyDirichletOldValuePD.C:15
PenaltyDirichletOldValuePD::PenaltyDirichletOldValuePD
PenaltyDirichletOldValuePD(const InputParameters ¶meters)
Definition
PenaltyDirichletOldValuePD.C:27
PenaltyDirichletOldValuePD::computeQpResidual
virtual Real computeQpResidual() override
Definition
PenaltyDirichletOldValuePD.C:33
PenaltyDirichletOldValuePD::_p
const Real & _p
Definition
PenaltyDirichletOldValuePD.h:28
PenaltyDirichletOldValuePD::_u_old
const VariableValue & _u_old
Definition
PenaltyDirichletOldValuePD.h:29
PenaltyDirichletOldValuePD::computeQpJacobian
virtual Real computeQpJacobian() override
Definition
PenaltyDirichletOldValuePD.C:39
InputParameters
Generated on Fri Aug 21 2026 13:41:19 for https://mooseframework.inl.gov by
1.9.8