Reformat. Merge improved solvers.
This commit is contained in:
@@ -39,10 +39,14 @@ int main(int argc, char** argv)
|
||||
}
|
||||
|
||||
readParameter(¶ms, argv[1]);
|
||||
printParameter(¶ms);
|
||||
// printParameter(¶ms);
|
||||
if (argc == 3) {
|
||||
variant = atoi(argv[2]);
|
||||
}
|
||||
if (argc == 4) {
|
||||
sscanf("%lf", argv[2], ¶ms.omg);
|
||||
sscanf("%lf", argv[2], ¶ms.rho);
|
||||
}
|
||||
|
||||
initSolver(&solver, ¶ms, 2);
|
||||
switch (variant) {
|
||||
@@ -59,8 +63,8 @@ int main(int argc, char** argv)
|
||||
LIKWID_PROFILE("RBA", solveRBA);
|
||||
break;
|
||||
}
|
||||
printf("Solution took %.2fs\n", endTime - startTime);
|
||||
writeResult(&solver);
|
||||
printf(" %.2fs\n", endTime - startTime);
|
||||
// writeResult(&solver);
|
||||
|
||||
LIKWID_MARKER_CLOSE;
|
||||
return EXIT_SUCCESS;
|
||||
|
@@ -108,7 +108,8 @@ void solve(Solver* solver)
|
||||
it++;
|
||||
}
|
||||
|
||||
printf("Solver took %d iterations to reach %f\n", it, sqrt(res));
|
||||
// printf("Solver took %d iterations to reach %f\n", it, sqrt(res));
|
||||
printf("%d, %f\n", it, solver->omega);
|
||||
}
|
||||
|
||||
void solveRB(Solver* solver)
|
||||
@@ -168,7 +169,8 @@ void solveRB(Solver* solver)
|
||||
it++;
|
||||
}
|
||||
|
||||
printf("Solver took %d iterations to reach %f\n", it, sqrt(res));
|
||||
// printf("Solver took %d iterations to reach %f\n", it, sqrt(res));
|
||||
printf("%d, %f\n", it, solver->omega);
|
||||
}
|
||||
|
||||
void solveRBA(Solver* solver)
|
||||
@@ -232,8 +234,9 @@ void solveRBA(Solver* solver)
|
||||
it++;
|
||||
}
|
||||
|
||||
printf("Final omega: %f\n", omega);
|
||||
printf("Solver took %d iterations to reach %f\n", it, sqrt(res));
|
||||
// printf("Final omega: %f\n", omega);
|
||||
// printf("Solver took %d iterations to reach %f\n", it, sqrt(res));
|
||||
printf("%d, %f\n", it, omega);
|
||||
}
|
||||
|
||||
void writeResult(Solver* solver)
|
||||
|
Reference in New Issue
Block a user