Merging the new branch
This commit is contained in:
@@ -40,27 +40,30 @@ int main(int argc, char** argv)
|
||||
|
||||
readParameter(¶ms, argv[1]);
|
||||
// printParameter(¶ms);
|
||||
|
||||
initSolver(&solver, ¶ms, 2);
|
||||
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) {
|
||||
case SOR:
|
||||
// printf("Plain SOR\n");
|
||||
printf("Plain SOR\n");
|
||||
LIKWID_PROFILE("SOR", solve);
|
||||
break;
|
||||
case RB:
|
||||
// printf("Red-black SOR\n");
|
||||
printf("Red-black SOR\n");
|
||||
LIKWID_PROFILE("RB", solveRB);
|
||||
break;
|
||||
case RBA:
|
||||
// printf("Red-black SOR with acceleration\n");
|
||||
printf("Red-black SOR with acceleration\n");
|
||||
LIKWID_PROFILE("RBA", solveRBA);
|
||||
break;
|
||||
}
|
||||
printf("Solution took %.2fs\n", endTime - startTime);
|
||||
printf(" %.2fs\n", endTime - startTime);
|
||||
// writeResult(&solver);
|
||||
|
||||
LIKWID_MARKER_CLOSE;
|
||||
|
@@ -7,8 +7,6 @@
|
||||
#ifndef __SOLVER_H_
|
||||
#define __SOLVER_H_
|
||||
#include "parameter.h"
|
||||
#include "timing.h"
|
||||
|
||||
|
||||
typedef struct {
|
||||
double dx, dy;
|
||||
|
Reference in New Issue
Block a user