25#include <boost/format.hpp>
46 }
catch (
const std::runtime_error&) {
63 Eigen::SelfAdjointEigenSolver<Eigen::Matrix3d> es;
64 es.computeDirect(pol);
65 pinv_ = es.eigenvectors() * es.eigenvalues().cwiseInverse().asDiagonal() *
66 es.eigenvectors().transpose();
72 Eigen::MatrixX3d pol =
pinv_.inverse() * conv_pol;
73 return (boost::format(
" P %1$+1.7f %2$+1.7f %3$+1.7f %4$+1.7f %5$+1.7f "
75 pol(0, 0) % pol(1, 0) % pol(2, 0) % pol(1, 1) % pol(1, 2) % pol(2, 2))
81 table.
addCol<std::string>(
"type", HOFFSET(
data, element));
83 table.
addCol<
double>(
"posX", HOFFSET(
data, posX));
84 table.
addCol<
double>(
"posY", HOFFSET(
data, posY));
85 table.
addCol<
double>(
"posZ", HOFFSET(
data, posZ));
89 table.
addCol<
double>(
"Q00", HOFFSET(
data, Q00));
90 table.
addCol<
double>(
"Q11c", HOFFSET(
data, Q11c));
91 table.
addCol<
double>(
"Q11s", HOFFSET(
data, Q11s));
92 table.
addCol<
double>(
"Q10", HOFFSET(
data, Q10));
93 table.
addCol<
double>(
"Q20", HOFFSET(
data, Q20));
94 table.
addCol<
double>(
"Q21c", HOFFSET(
data, Q21c));
95 table.
addCol<
double>(
"Q21s", HOFFSET(
data, Q21s));
96 table.
addCol<
double>(
"Q22c", HOFFSET(
data, Q22c));
97 table.
addCol<
double>(
"Q22s", HOFFSET(
data, Q22s));
100 table.
addCol<
double>(
"Vy", HOFFSET(
data, Vy));
101 table.
addCol<
double>(
"Vz", HOFFSET(
data, Vz));
103 table.
addCol<
double>(
"Vx_noE", HOFFSET(
data, Vx_noE));
104 table.
addCol<
double>(
"Vy_NoE", HOFFSET(
data, Vy_noE));
105 table.
addCol<
double>(
"Vz_noE", HOFFSET(
data, Vz_noE));
107 table.
addCol<
double>(
"pxx", HOFFSET(
data, pxx));
108 table.
addCol<
double>(
"pxy", HOFFSET(
data, pxy));
109 table.
addCol<
double>(
"pxz", HOFFSET(
data, pxz));
110 table.
addCol<
double>(
"pyy", HOFFSET(
data, pyy));
111 table.
addCol<
double>(
"pyz", HOFFSET(
data, pyz));
112 table.
addCol<
double>(
"pzz", HOFFSET(
data, pzz));
114 table.
addCol<
double>(
"d_ind_x", HOFFSET(
data, d_x_ind));
115 table.
addCol<
double>(
"d_ind_y", HOFFSET(
data, d_y_ind));
116 table.
addCol<
double>(
"d_ind_z", HOFFSET(
data, d_z_ind));
146 Eigen::Matrix3d
P =
pinv_.inverse();
void addCol(const std::string &name, const size_t &offset)
PolarSite(Index id, std::string element, Eigen::Vector3d pos)
static void SetupCptTable(CptTable &table)
void WriteData(StaticSite::data &d) const =delete
Eigen::Vector3d induced_dipole_
void setpolarization(const Eigen::Matrix3d &pol) final
Eigen::Vector3d getStaticDipole() const final
Eigen::Vector3d getInducedDipole() const final
std::string writepolarization() const final
Eigen::Vector3d getDipole() const final
void ReadData(StaticSite::data &d)=delete
double eigendamp_invsqrt_
StaticSite(Index id, std::string element, Eigen::Vector3d pos)
Charge transport classes.
Provides a means for comparing floating point numbers.