Commit b2bded48 authored by Mark Olesen's avatar Mark Olesen

STYLE: use Time::printExecutionTime() method

- makes format of ExecutionTime = ... output configurable (#788)
  and reduces code clutter.

STYLE: more consistent line-breaks after "End" tag
parent 1178fc19
......@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -144,9 +145,7 @@ int main(int argc, char *argv[])
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
runTime.printExecutionTime(Info);
}
Info<< "End\n" << endl;
......
......@@ -93,8 +93,8 @@ int main(int argc, char *argv[])
runTime.printExecutionTime(Info);
}
Info << "Number of steps = " << runTime.timeIndex() << endl;
Info << "End" << nl << endl;
Info<< "Number of steps = " << runTime.timeIndex() << nl;
Info<< "End\n" << endl;
return 0;
}
......
......@@ -130,7 +130,7 @@ int main(int argc, char *argv[])
runTime.printExecutionTime(Info);
}
Info<< "End" << endl;
Info<< "End\n" << endl;
return 0;
}
......
......@@ -75,9 +75,10 @@ int main(int argc, char *argv[])
// Compute all sensitivities
om.computeSensitivities();
}
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -151,7 +151,7 @@ int main(int argc, char *argv[])
runTime.printExecutionTime(Info);
}
Info<< "End" << endl;
Info<< "End\n" << endl;
return 0;
}
......
......@@ -98,7 +98,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -121,9 +122,7 @@ int main(int argc, char *argv[])
combustion->Qdot()().write();
}
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
runTime.printExecutionTime(Info);
}
Info<< "End\n" << endl;
......
......@@ -130,9 +130,7 @@ int main(int argc, char *argv[])
runTime.write();
Info<< "ExecutionTime = "
<< runTime.elapsedCpuTime()
<< " s\n\n" << endl;
runTime.printExecutionTime(Info);
}
Info<< "End\n" << endl;
......
......@@ -57,7 +57,7 @@ int main(int argc, char *argv[])
Info<< fvc::div(U);
Info<< "End" << endl;
Info<< "End\n" << endl;
}
......
......@@ -56,7 +56,7 @@ int main()
a = h + i + j;
Info<< a << endl;
Info<< "End" << endl;
Info<< "End\n" << endl;
return 0;
}
......
......@@ -59,7 +59,7 @@ int main(int argc, char *argv[])
Info<< (gradx4a - gradx4[i])/gradx4a << endl;
}
Info<< "End" << endl;
Info<< "End\n" << endl;
}
......
......@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
mesh
);
Info<< "End" << endl;
Info<< "End\n" << endl;
}
......
......@@ -67,7 +67,7 @@ int main()
);
phi.write("phi", "xmgr");
Info<< "End" << endl;
Info<< "End\n" << endl;
}
......
......@@ -59,7 +59,7 @@ int main()
"xmgr"
);
Info<< "End" << endl;
Info<< "End\n" << endl;
}
......
......@@ -59,7 +59,7 @@ int main()
graph("r", "x", "r", x, r).write("r", "xmgr");
Info<< "End" << endl;
Info<< "End\n" << endl;
return 0;
}
......
......@@ -159,7 +159,7 @@ int main(int argc, char *argv[])
runTime.writeEndDivider(pFile);
Info<< "End" << endl;
Info<< "End\n" << endl;
return 0;
}
......
......@@ -146,7 +146,7 @@ int main(int argc, char *argv[])
refData.updateMesh(map);
refData.write();
Info<< "End" << nl << endl;
Info<< "End\n" << endl;
return 0;
}
......
......@@ -346,7 +346,7 @@ int main(int argc, char *argv[])
Info<< endl;
}
Info<< "End" << nl << endl;
Info<< "End\n" << endl;
return 0;
}
......
......@@ -66,9 +66,9 @@ int main(int argc, char *argv[])
runTime.printExecutionTime(Info);
Info<< "End" << endl;
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -154,7 +154,7 @@ int main(int argc, char *argv[])
Info<< "End\n" << endl;
return(0);
return 0;
}
......
......@@ -85,7 +85,7 @@ int main(int argc, char *argv[])
runTime.graphFormat()
);
Info<< "End" << nl << endl;
Info<< "End\n" << endl;
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment