File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -550,14 +550,17 @@ void Meddle::GaussCheck() const {
550
550
double gauss_nuclear_asc = GaussEstimate (input_.molecule ().charges (),
551
551
input_.outsideStaticGreenParams ().epsilon ,
552
552
input_.correction ());
553
- double difference = total_nuclear_asc - gauss_nuclear_asc;
553
+ double abs_rel_diff =
554
+ std::abs ((total_nuclear_asc - gauss_nuclear_asc) / gauss_nuclear_asc);
554
555
std::stringstream tmp;
555
- if (!utils::isZero (difference , 1.0e-2 )) {
556
+ if (!utils::isZero (abs_rel_diff , 1.0e-2 )) {
556
557
std::ostringstream errmsg;
557
- errmsg << " The Gauss' theorem (" << gauss_nuclear_asc << " ) " ;
558
+ errmsg
559
+ << " Absolute value of the relative difference between the Gauss' theorem ("
560
+ << gauss_nuclear_asc << " ) " ;
558
561
errmsg << " and computed (" << total_nuclear_asc << " ) values " ;
559
- errmsg << " of the total nuclear ASC differ significantly (" << difference << " ). "
560
- << std::endl;
562
+ errmsg << " of the total nuclear ASC higher than threshold (" << abs_rel_diff
563
+ << " ). " << std::endl;
561
564
errmsg << " Consider changing the average area of the cavity finite elements."
562
565
<< std::endl;
563
566
errmsg
You can’t perform that action at this time.
0 commit comments