Skip to content

Commit

Permalink
Prefer preincrement over postincrement in convergence tester
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan Harries committed Feb 7, 2017
1 parent 4179f2e commit 0371386
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions meta/ConvergenceTester.m
Expand Up @@ -35,7 +35,7 @@
,
dimStart = TreeMasses`GetDimensionStartSkippingGoldstones[particle] - 1;
result = "for (int i = " <> ToString[dimStart] <>
"; i < " <> ToString[dim] <> "; i++) {\n";
"; i < " <> ToString[dim] <> "; ++i) {\n";
body = diff <> "[i + " <> ToString[offset] <> "] = " <>
"MaxRelDiff(OLD1(" <> esStr <> ",i),NEW1(" <> esStr <> ",i));";
result = result <> IndentText[body] <> "\n}\n";
Expand Down Expand Up @@ -81,7 +81,7 @@
dim = Length[idx];
dimStr = ToString[dim];
i = idxPool[[pos]];
result = "for (int " <> i <> " = 0; " <> i <> " < " <> ToString[idx[[pos]]] <> "; " <> i <> "++) {\n" <>
result = "for (int " <> i <> " = 0; " <> i <> " < " <> ToString[idx[[pos]]] <> "; ++" <> i <> ") {\n" <>
IndentText[
CalcDifference[parameter, offset, diff, {idx, pos+1, idxPool}]
] <>
Expand Down

0 comments on commit 0371386

Please sign in to comment.