Add timing for file IO

This commit is contained in:
2024-01-15 06:33:42 +01:00
parent f36089a56c
commit aa5c98a436
3 changed files with 19 additions and 0 deletions

View File

@@ -73,11 +73,17 @@ int main(int argc, char** argv)
printf("Solution took %.2fs\n", timeStop - timeStart);
}
timeStart = getTimeStamp();
VtkOptions opts = { .grid = s.grid, .comm = s.comm };
vtkOpen(&opts, s.problem);
vtkScalar(&opts, "pressure", s.p);
vtkVector(&opts, "velocity", (VtkVector) { s.u, s.v, s.w });
vtkClose(&opts);
timeStop = getTimeStamp();
if (commIsMaster(&s.comm)) {
printf("Result output took %.2fs\n", timeStop - timeStart);
}
commFinalize(&s.comm);
return EXIT_SUCCESS;