Skip to content

Commit bc936be

Browse files
author
Roberto Di Remigio
committed
Symmetrize S matrix in CPCMSolver
1 parent f16aeb2 commit bc936be

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## [Unreleased]
44

5+
### Changed
6+
7+
- The `CPCMSolver` object now stores the scaled, Hermitian, symmetry-adapted S matrix.
8+
Polarization weights are then directly computed from the incoming MEP.
9+
510
## [v1.1.3] (2016-07-03)
611

712
### Changed

src/solver/CPCMSolver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ void CPCMSolver::buildSystemMatrix_impl(const Cavity & cavity, const IGreensFunc
4747
double epsilon = profiles::epsilon(gf_o.permittivity());
4848
S_ = gf_i.singleLayer(cavity.elements());
4949
S_ /= (epsilon - 1.0)/(epsilon + correction_);
50+
// Get in Hermitian form
51+
if (hermitivitize_) hermitivitize(S_);
5052
TIMER_OFF("Computing S");
5153

5254
// Symmetry-pack
@@ -78,8 +80,6 @@ Eigen::VectorXd CPCMSolver::computeCharge_impl(const Eigen::VectorXd & potential
7880
int irrDim = fullDim/nrBlocks;
7981
charge.segment(irrep*irrDim, irrDim) =
8082
- blockS_[irrep].ldlt().solve(potential.segment(irrep*irrDim, irrDim));
81-
// Symmetrize ASC charge := (charge + charge*)/2
82-
if (hermitivitize_) hermitivitize(charge);
8383

8484
return charge;
8585
}

src/solver/CPCMSolver.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ class IGreensFunction;
4545
* \author Roberto Di Remigio
4646
* \date 2013, 2016
4747
*
48-
* \note We store the unsymmetrized S matrix and use a robust
49-
* Cholesky decomposition to solve for the ASC. The ASC is then
50-
* symmetrized. This avoids computing and storing the inverse explicitly.
48+
* \note We store the scaled, Hermitian, symmetrized S matrix and use a robust
49+
* Cholesky decomposition to solve for the ASC.
50+
* This avoids computing and storing the inverse explicitly.
5151
* The S matrix is already scaled by the dielectric factor entering the
5252
* definition of the conductor model!
5353
*/

0 commit comments

Comments
 (0)