#include <StressDivergenceTensorsTruss.h>
◆ StressDivergenceTensorsTruss()
StressDivergenceTensorsTruss::StressDivergenceTensorsTruss |
( |
const InputParameters & |
parameters | ) |
|
◆ computeJacobian()
void StressDivergenceTensorsTruss::computeJacobian |
( |
| ) |
|
|
overrideprotectedvirtual |
Definition at line 97 of file StressDivergenceTensorsTruss.C.
99 prepareMatrixTag(_assembly, _var.number(), _var.number());
101 for (
unsigned int i = 0; i < _test.size(); ++i)
102 for (
unsigned int j = 0; j < _phi.size(); ++j)
105 accumulateTaggedLocalMatrix();
107 if (_has_diag_save_in)
109 unsigned int rows = _local_ke.m();
110 DenseVector<Number> diag(rows);
111 for (
unsigned int i = 0; i < rows; ++i)
112 diag(i) = _local_ke(i, i);
114 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
115 for (
unsigned int i = 0; i < _diag_save_in.size(); ++i)
116 _diag_save_in[i]->sys().solution().add_vector(diag, _diag_save_in[i]->dofIndices());
Referenced by computeOffDiagJacobian().
◆ computeOffDiagJacobian()
void StressDivergenceTensorsTruss::computeOffDiagJacobian |
( |
MooseVariableFEBase & |
jvar | ) |
|
|
overrideprotectedvirtual |
Definition at line 121 of file StressDivergenceTensorsTruss.C.
123 size_t jvar_num = jvar.number();
124 if (jvar_num == _var.number())
130 auto phi_size = _sys.getVariable(_tid, jvar.number()).dofIndices().size();
132 unsigned int coupled_component = 0;
133 bool disp_coupled =
false;
135 for (
unsigned int i = 0; i <
_ndisp; ++i)
138 coupled_component = i;
145 prepareMatrixTag(_assembly, _var.number(), jvar_num);
147 for (
unsigned int i = 0; i < _test.size(); ++i)
148 for (
unsigned int j = 0; j < phi_size; ++j)
151 accumulateTaggedLocalMatrix();
◆ computeQpResidual()
virtual Real StressDivergenceTensorsTruss::computeQpResidual |
( |
| ) |
|
|
inlineoverrideprotectedvirtual |
◆ computeResidual()
void StressDivergenceTensorsTruss::computeResidual |
( |
| ) |
|
|
overrideprotectedvirtual |
Definition at line 63 of file StressDivergenceTensorsTruss.C.
65 prepareVectorTag(_assembly, _var.number());
67 mooseAssert(_local_re.size() == 2,
"Truss element has and only has two nodes.");
70 orientation /= orientation.norm();
75 _local_re(1) = -_local_re(0);
77 accumulateTaggedLocalResidual();
81 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
82 for (
unsigned int i = 0; i < _save_in.size(); ++i)
83 _save_in[i]->sys().solution().add_vector(_local_re, _save_in[i]->dofIndices());
◆ computeStiffness()
Real StressDivergenceTensorsTruss::computeStiffness |
( |
unsigned int |
i, |
|
|
unsigned int |
j |
|
) |
| |
|
protectedvirtual |
◆ initialSetup()
void StressDivergenceTensorsTruss::initialSetup |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ validParams()
InputParameters StressDivergenceTensorsTruss::validParams |
( |
| ) |
|
|
static |
Definition at line 23 of file StressDivergenceTensorsTruss.C.
26 params.addClassDescription(
"Kernel for truss element");
27 params.addRequiredParam<
unsigned int>(
"component",
28 "An integer corresponding to the direction "
29 "the variable this kernel acts in. (0 for x, "
31 params.addCoupledVar(
"displacements",
32 "The string of displacements suitable for the problem statement");
33 params.addCoupledVar(
"temperature",
"The temperature");
34 params.addCoupledVar(
"area",
"Cross-sectional area of truss element");
35 params.addParam<std::string>(
"base_name",
"Material property base name");
36 params.set<
bool>(
"use_displaced_mesh") =
true;
◆ _area
const VariableValue& StressDivergenceTensorsTruss::_area |
|
private |
◆ _axial_stress
const MaterialProperty<Real>& StressDivergenceTensorsTruss::_axial_stress |
|
protected |
◆ _base_name
const std::string StressDivergenceTensorsTruss::_base_name |
|
protected |
◆ _component
const unsigned int StressDivergenceTensorsTruss::_component |
|
private |
◆ _disp_var
std::vector<unsigned int> StressDivergenceTensorsTruss::_disp_var |
|
private |
◆ _e_over_l
const MaterialProperty<Real>& StressDivergenceTensorsTruss::_e_over_l |
|
protected |
◆ _ndisp
const unsigned int StressDivergenceTensorsTruss::_ndisp |
|
private |
◆ _orientation
const std::vector<RealGradient>* StressDivergenceTensorsTruss::_orientation |
|
private |
◆ _temp_coupled
const bool StressDivergenceTensorsTruss::_temp_coupled |
|
private |
◆ _temp_var
const unsigned int StressDivergenceTensorsTruss::_temp_var |
|
private |
The documentation for this class was generated from the following files: