10 auto fe = std::make_shared<FE>(
mesh);
11 auto u = fe->trial<3>();
12 const double mu = 1.0,
nu = 0.3;
13 const double lambda = 2*
mu*
nu/(1-2*
nu);
14 Eigen::Matrix<double,6,6> C = Eigen::Matrix<double,6,6>::Zero();
15 C.topLeftCorner<3,3>().setConstant(lambda);
16 C.diagonal().head<3>().array() += 2*
mu;
17 C.diagonal().tail<3>().setConstant(
mu);
19 for (
size_t n=0; n<fe->nodeSize(); ++n)
20 if (std::abs(fe->node(n).P0(0)-
mesh->xMin()(0)) < 1.e-10)
21 for (
int c=0;
c<3; ++
c)
22 u->dirichletConditions()[3*n+
c] = 0.0;
26 auto stiffness = (
test(
e), C*
e)*dV;
27 const Eigen::Vector3d force(0.0, 0.0, -1.e-3);
30 problem->solveWithMasterSlaveConstraints();
31 return u->dofVector();