26 "An integer corresponding to the direction " 27 "the variable this kernel acts in. (0 for x, " 30 "The string of displacements suitable for the problem statement");
32 params.
addCoupledVar(
"area",
"Cross-sectional area of truss element");
33 params.
addParam<std::string>(
"base_name",
"Material property base name");
34 params.
set<
bool>(
"use_displaced_mesh") =
true;
40 _base_name(isParamValid(
"base_name") ? getParam<
std::string>(
"base_name") +
"_" :
""),
41 _axial_stress(getMaterialPropertyByName<
Real>(_base_name +
"axial_stress")),
42 _e_over_l(getMaterialPropertyByName<
Real>(_base_name +
"e_over_l")),
43 _component(getParam<unsigned
int>(
"component")),
44 _ndisp(coupledComponents(
"displacements")),
45 _temp_coupled(isCoupled(
"temperature")),
46 _temp_var(_temp_coupled ? coupled(
"temperature") : 0),
47 _area(coupledValue(
"area")),
50 for (
unsigned int i = 0; i <
_ndisp; ++i)
65 mooseAssert(
_local_re.
size() == 2,
"Truss element has and only has two nodes.");
79 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
80 for (
unsigned int i = 0; i <
_save_in.size(); ++i)
99 for (
unsigned int i = 0; i <
_test.size(); ++i)
100 for (
unsigned int j = 0;
j <
_phi.size(); ++
j)
109 for (
unsigned int i = 0; i < rows; ++i)
112 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
129 auto phi_size = jvar.dofIndices().size();
131 unsigned int coupled_component = 0;
132 bool disp_coupled =
false;
134 for (
unsigned int i = 0; i <
_ndisp; ++i)
137 coupled_component = i;
146 for (
unsigned int i = 0; i <
_test.size(); ++i)
147 for (
unsigned int j = 0;
j < phi_size; ++
j)
const unsigned int _ndisp
Number of displacement variables.
registerMooseObject("SolidMechanicsApp", StressDivergenceTensorsTruss)
virtual unsigned int coupled(const std::string &var_name, unsigned int comp=0) const
static InputParameters validParams()
void accumulateTaggedLocalResidual()
std::vector< MooseVariableFEBase *> _save_in
StressDivergenceTensorsTruss(const InputParameters ¶meters)
unsigned int number() const
static InputParameters validParams()
virtual void computeJacobian() override
virtual Real computeStiffness(unsigned int i, unsigned int j)
DenseMatrix< Number > _local_ke
const unsigned int _component
An integer corresponding to the direction this kernel acts in.
const MooseVariableFieldBase & getVariable(unsigned int jvar_num) const
const VariableTestValue & _test
virtual void computeOffDiagJacobian(unsigned int jvar) override
const std::vector< RealGradient > * _orientation
std::vector< MooseVariableFEBase *> _diag_save_in
unsigned int number() const
void accumulateTaggedLocalMatrix()
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num)=0
DenseVector< Number > _local_re
std::vector< unsigned int > _disp_var
Variable numbers of coupled displacement variables.
const MaterialProperty< Real > & _axial_stress
virtual unsigned int size() const override final
const MaterialProperty< Real > & _e_over_l
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
void prepareVectorTag(Assembly &assembly, unsigned int ivar)
void prepareMatrixTag(Assembly &assembly, unsigned int ivar, unsigned int jvar)
const VariablePhiValue & _phi
virtual void initialSetup() override
bool orientation(std::array< Point, N > &arr)
void ErrorVector unsigned int
virtual void computeResidual() override
const VariableValue & _area