17 #include <libmesh/int_range.h> 20 #include <Eigen/Dense> 61 mooseError(
"Wrong number of properties passed in.");
64 Eigen::Matrix<Real, 6, 1> u;
65 u << U_[0], U_[1], U_[2], U_[3], U_[4], U_[5];
68 Eigen::Matrix<Real, 6, 1> du;
69 du << DU_[0], DU_[1], DU_[2], DU_[3], DU_[4], DU_[5];
74 const auto & x1 = COORDS[0];
75 const auto & y1 = COORDS[1];
76 const auto & x2 = COORDS[2];
77 const auto & y2 = COORDS[3];
78 const auto & x3 = COORDS[4];
79 const auto & y3 = COORDS[5];
81 const auto x13 = x1 - x3;
82 const auto x21 = x2 - x1;
83 const auto y12 = y1 - y2;
84 const auto y21 = y2 - y1;
85 const auto x31 = x3 - x1;
86 const auto y31 = y3 - y1;
87 const auto x32 = x3 - x2;
88 const auto y23 = y2 - y3;
91 Eigen::Matrix<Real, 2, 2> J;
95 const auto Jdet = J.determinant();
97 mooseError(
"Negative Jacobian in element ", *JELEM);
102 const auto A = Jdet / 2.0;
104 Eigen::Matrix<Real, 3, 6>
B;
105 B << y23, 0.0, y31, 0.0, y12, 0.0,
106 0.0, x32, 0.0, x13, 0.0, x21,
107 x32, y23, x13, y31, x21, y12;
110 const auto Bt =
B.transpose();
116 const auto Y = PROPS[0];
119 const auto nu = PROPS[1];
121 Eigen::Matrix<Real, 3, 3> E;
130 E << 1.0 - nu, nu, 0.0,
132 0.0, 0.0, (1.0 - 2.0 * nu) / 2.0;
133 E *= Y / (1.0 + nu) / (1.0 - 2.0 * nu);
136 const auto ke = Bt * E *
B * t *
A;
139 const auto re = ke * u;
146 AMATRX[i * 6 +
j] = -ke(i,
j);
void mooseError(Args &&... args)
void uel_(double RHS[], double AMATRX[], double [], double [], int *, int *, int *, double PROPS[], int *NPROPS, double COORDS[], int *, int *, double U_[], double DU_[], double [], double [], int *, double [], double *, int *, int *, int *JELEM, double [], int *, int [], double [], double [], int *, int [], int *, double [], int *, double *, int [], int *, double *)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")