12 : m_lenY(lenY),m_lenX(lenX),
13 m_defo0(std::move(defo0))
23 throw std::runtime_error(
"Should call Element::cacheTransforms() first");
49 * Eigen::AngleAxisd(
pars[
THZ], Eigen::Vector3d::UnitZ())
50 * Eigen::AngleAxisd(
pars[
THY], Eigen::Vector3d::UnitY())
51 * Eigen::AngleAxisd(
pars[
THX], Eigen::Vector3d::UnitX());
62 if (
parname ==
"thx")
return parameter_t::THX;
63 if (
parname ==
"thy")
return parameter_t::THY;
64 if (
parname ==
"thz")
return parameter_t::THZ;
65 if (
parname ==
"rot")
return parameter_t::ROT;
66 if (
parname ==
"off")
return parameter_t::OFF;
67 if (
parname ==
"scl")
return parameter_t::SCL;
68 if (
parname ==
"npar")
return parameter_t::NPAR;
69 throw std::runtime_error(
"Invalid parameter name "+
parname);
77 case THX:
return "thx";
78 case THY:
return "thy";
79 case THZ:
return "thz";
80 case ROT:
return "rot";
81 case OFF:
return "off";
82 case SCL:
return "scl";
83 case NPAR:
return "npar";
84 default:
throw std::runtime_error(
"Invalid parameter");
90 return off * Amg::Vector3D::UnitY();
95 return -rot *
d0.cross(Amg::Vector3D::UnitZ());
100 return d0.array() * Eigen::Array3d{0., scl/
m_lenY, 0.};
130 double off = parvec[
OFF];
131 double rot = parvec[
ROT];
136 local.array().colwise() += Eigen::Array3d{0. ,off, 0.};
139 local.topRows<2>().
array() +=
d0.topRows<2>().
array().colwise().reverse().colwise() * Eigen::Array2d{0., rot};
142 local.array() +=
d0.array().colwise() * Eigen::Array3d{0., scl, 0.};
145 local.topRows<2>().
array() += (
d0.topRows<2>().
array().colwise().reverse() *
d0.topRows<2>().
array()).colwise() * Eigen::Array2d{0., npar};