Skip to content

Commit d87a355

Browse files
The9CatCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 7b4f5d7 commit d87a355

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

expui/BiorthBasis.H

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,13 @@ namespace BasisClasses
13461346
for (int n1=0; n1<Nsize; n1++) {
13471347
std::get<2>(elem)(T, 0, n1) = meanV[T](n1);
13481348
for (int n2=0; n2<Nsize; n2++) {
1349-
std::get<3>(elem)(T, 0, n1, n2) = covrV[T](n1, n2);
1349+
double cov = 0.0;
1350+
if (diagcov) {
1351+
if (n1 == n2) cov = dvarV[T](n1);
1352+
} else if (covar && T < covrV.size()) {
1353+
cov = covrV[T](n1, n2);
1354+
}
1355+
std::get<3>(elem)(T, 0, n1, n2) = cov;
13501356
}
13511357
}
13521358
}

0 commit comments

Comments
 (0)