1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 15:55:37 +00:00

Some formatting

This commit is contained in:
Daniel Richtmann 2017-10-27 14:35:04 +02:00
parent 15dfa9f663
commit 1bad64ac6a
No known key found for this signature in database
GPG Key ID: B33C490AF0772057

View File

@ -72,7 +72,7 @@ template<class Field> class MinimalResidual : public OperatorFunction<Field> {
RealD cp = norm2(r); // Cp = |r[0]|^2 // 2 Nc Ns flops // flopcount.addSiteFlops(4*Nc*Ns, s); RealD cp = norm2(r); // Cp = |r[0]|^2 // 2 Nc Ns flops // flopcount.addSiteFlops(4*Nc*Ns, s);
if(cp <= rsd_sq) { if (cp <= rsd_sq) {
return; return;
} }
@ -85,7 +85,7 @@ template<class Field> class MinimalResidual : public OperatorFunction<Field> {
SolverTimer.Start(); SolverTimer.Start();
int k; int k;
for(k = 1; k <= MaxIterations; k++) { // a[k-1] := < M.r[k-1], r[k-1] >/ < M.r[k-1], M.r[k-1] > for (k = 1; k <= MaxIterations; k++) { // a[k-1] := < M.r[k-1], r[k-1] >/ < M.r[k-1], M.r[k-1] >
MatrixTimer.Start(); MatrixTimer.Start();
Linop.Op(r, Mr); // Mr = M * r // flopcount.addFlops(M.nFlops()); Linop.Op(r, Mr); // Mr = M * r // flopcount.addFlops(M.nFlops());
@ -114,7 +114,7 @@ template<class Field> class MinimalResidual : public OperatorFunction<Field> {
std::cout << GridLogDebug << "a = " << a << " c = " << c << " d = " << d << std::endl; std::cout << GridLogDebug << "a = " << a << " c = " << c << " d = " << d << std::endl;
// Stopping condition // Stopping condition
if(cp <= rsd_sq) { if (cp <= rsd_sq) {
SolverTimer.Stop(); SolverTimer.Stop();
Linop.Op(psi, Mr); Linop.Op(psi, Mr);
@ -146,7 +146,7 @@ template<class Field> class MinimalResidual : public OperatorFunction<Field> {
std::cout << GridLogMessage << "MinimalResidual did NOT converge" std::cout << GridLogMessage << "MinimalResidual did NOT converge"
<< std::endl; << std::endl;
if(ErrorOnNoConverge) if (ErrorOnNoConverge)
assert(0); assert(0);
IterationsToComplete = k; IterationsToComplete = k;