41 Eigen::Matrix3d theta = Eigen::Matrix3d::Zero();
43 double sqr3 = std::sqrt(3);
44 theta(0, 0) = 0.5 * (-MP(4) + sqr3 * MP(7));
45 theta(1, 1) = 0.5 * (-MP(4) - sqr3 * MP(7));
47 theta(0, 1) = theta(1, 0) = 0.5 * sqr3 * MP(8);
48 theta(0, 2) = theta(2, 0) = 0.5 * sqr3 * MP(5);
49 theta(1, 2) = theta(2, 1) = 0.5 * sqr3 * MP(6);
55 const Eigen::Matrix3d& quad_cart) {
56 Eigen::VectorXd quadrupole_polar = Eigen::VectorXd::Zero(5);
57 const double sqr3 = std::sqrt(3);
58 quadrupole_polar(0) = quad_cart(2, 2);
59 quadrupole_polar(1) = (2. / sqr3) * quad_cart(0, 2);
60 quadrupole_polar(2) = (2. / sqr3) * quad_cart(1, 2);
61 quadrupole_polar(3) = (1. / sqr3) * (quad_cart(0, 0) - quad_cart(1, 1));
62 quadrupole_polar(4) = (2. / sqr3) * quad_cart(0, 1);
63 return quadrupole_polar;