@@ -50,28 +50,34 @@ void IEFSolver::buildSystemMatrix_impl(const Cavity & cavity, const IGreensFunct
50
50
51
51
void IEFSolver::buildAnisotropicMatrix (const Cavity & cav, const IGreensFunction & gf_i, const IGreensFunction & gf_o)
52
52
{
53
- TinvR_ = anisotropicIEFMatrix (cav, gf_i, gf_o);
53
+ Tepsilon_ = anisotropicTEpsilon (cav, gf_i, gf_o);
54
54
// Pack into a block diagonal matrix
55
55
// The number of irreps in the group
56
56
int nrBlocks = cav.pointGroup ().nrIrrep ();
57
57
// The size of the irreducible portion of the cavity
58
58
int dimBlock = cav.irreducible_size ();
59
59
// 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);
61
64
62
65
built_ = true ;
63
66
}
64
67
65
68
void IEFSolver::buildIsotropicMatrix (const Cavity & cav, const IGreensFunction & gf_i, const IGreensFunction & gf_o)
66
69
{
67
- TinvR_ = isotropicIEFMatrix (cav, gf_i, profiles::epsilon (gf_o.permittivity ()));
70
+ Tepsilon_ = isotropicTEpsilon (cav, gf_i, profiles::epsilon (gf_o.permittivity ()));
68
71
// Pack into a block diagonal matrix
69
72
// The number of irreps in the group
70
73
int nrBlocks = cav.pointGroup ().nrIrrep ();
71
74
// The size of the irreducible portion of the cavity
72
75
int dimBlock = cav.irreducible_size ();
73
76
// 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);
75
81
76
82
built_ = true ;
77
83
}
@@ -81,12 +87,12 @@ Eigen::VectorXd IEFSolver::computeCharge_impl(const Eigen::VectorXd & potential,
81
87
// The potential and charge vector are of dimension equal to the
82
88
// full dimension of the cavity. We have to select just the part
83
89
// relative to the irrep needed.
84
- int fullDim = TinvR_ .rows ();
90
+ int fullDim = Rinfinity_ .rows ();
85
91
Eigen::VectorXd charge = Eigen::VectorXd::Zero (fullDim);
86
- int nrBlocks = blockTinvR_ .size ();
92
+ int nrBlocks = blockRinfinity_ .size ();
87
93
int irrDim = fullDim/nrBlocks;
88
94
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) );
90
96
// Symmetrize ASC charge := (charge + charge*)/2
91
97
if (hermitivitize_) hermitivitize (charge);
92
98
0 commit comments