@@ -50,28 +50,34 @@ void IEFSolver::buildSystemMatrix_impl(const Cavity & cavity, const IGreensFunct
5050
5151void IEFSolver::buildAnisotropicMatrix (const Cavity & cav, const IGreensFunction & gf_i, const IGreensFunction & gf_o)
5252{
53- TinvR_ = anisotropicIEFMatrix (cav, gf_i, gf_o);
53+ Tepsilon_ = anisotropicTEpsilon (cav, gf_i, gf_o);
5454 // Pack into a block diagonal matrix
5555 // The number of irreps in the group
5656 int nrBlocks = cav.pointGroup ().nrIrrep ();
5757 // The size of the irreducible portion of the cavity
5858 int dimBlock = cav.irreducible_size ();
5959 // For the moment just packs into a std::vector<Eigen::MatrixXd>
60- symmetryPacking (blockTinvR_, TinvR_, dimBlock, nrBlocks);
60+ symmetryPacking (blockTepsilon_, Tepsilon_, dimBlock, nrBlocks);
61+
62+ Rinfinity_ = anisotropicRinfinity (cav, gf_i, gf_o);
63+ symmetryPacking (blockRinfinity_, Rinfinity_, dimBlock, nrBlocks);
6164
6265 built_ = true ;
6366}
6467
6568void IEFSolver::buildIsotropicMatrix (const Cavity & cav, const IGreensFunction & gf_i, const IGreensFunction & gf_o)
6669{
67- TinvR_ = isotropicIEFMatrix (cav, gf_i, profiles::epsilon (gf_o.permittivity ()));
70+ Tepsilon_ = isotropicTEpsilon (cav, gf_i, profiles::epsilon (gf_o.permittivity ()));
6871 // Pack into a block diagonal matrix
6972 // The number of irreps in the group
7073 int nrBlocks = cav.pointGroup ().nrIrrep ();
7174 // The size of the irreducible portion of the cavity
7275 int dimBlock = cav.irreducible_size ();
7376 // For the moment just packs into a std::vector<Eigen::MatrixXd>
74- symmetryPacking (blockTinvR_, TinvR_, dimBlock, nrBlocks);
77+ symmetryPacking (blockTepsilon_, Tepsilon_, dimBlock, nrBlocks);
78+
79+ Rinfinity_ = isotropicRinfinity (cav, gf_i);
80+ symmetryPacking (blockRinfinity_, Rinfinity_, dimBlock, nrBlocks);
7581
7682 built_ = true ;
7783}
@@ -81,12 +87,12 @@ Eigen::VectorXd IEFSolver::computeCharge_impl(const Eigen::VectorXd & potential,
8187 // The potential and charge vector are of dimension equal to the
8288 // full dimension of the cavity. We have to select just the part
8389 // relative to the irrep needed.
84- int fullDim = TinvR_ .rows ();
90+ int fullDim = Rinfinity_ .rows ();
8591 Eigen::VectorXd charge = Eigen::VectorXd::Zero (fullDim);
86- int nrBlocks = blockTinvR_ .size ();
92+ int nrBlocks = blockRinfinity_ .size ();
8793 int irrDim = fullDim/nrBlocks;
8894 charge.segment (irrep*irrDim, irrDim) =
89- - blockTinvR_ [irrep] * potential.segment (irrep*irrDim, irrDim);
95+ - blockTepsilon_ [irrep]. partialPivLu (). solve (blockRinfinity_[irrep] * potential.segment (irrep*irrDim, irrDim) );
9096 // Symmetrize ASC charge := (charge + charge*)/2
9197 if (hermitivitize_) hermitivitize (charge);
9298
0 commit comments