Synchronize and Update variants. Prepare Assigment codes.

This commit is contained in:
2024-01-08 10:26:43 +00:00
parent 2fad29b925
commit 5b50590faf
29 changed files with 336 additions and 233 deletions

View File

@@ -15,12 +15,11 @@
#include "progress.h"
#include "solver.h"
#include "timing.h"
#include <mpi.h>
int main(int argc, char** argv)
{
int rank;
double S, E;
int rank = 0;
double start, end;
Parameter params;
Solver solver;
@@ -44,7 +43,7 @@ int main(int argc, char** argv)
double te = solver.te;
double t = 0.0;
S = getTimeStamp();
start = getTimeStamp();
while (t <= te) {
if (tau > 0.0) {
computeTimestep(&solver);
@@ -56,7 +55,6 @@ int main(int argc, char** argv)
computeRHS(&solver);
solve(&solver);
adaptUV(&solver);
/* exit(EXIT_SUCCESS); */
t += solver.dt;
#ifdef VERBOSE
@@ -67,10 +65,10 @@ int main(int argc, char** argv)
printProgress(t);
#endif
}
E = getTimeStamp();
end = getTimeStamp();
stopProgress();
if (rank == 0) {
printf("Solution took %.2fs\n", E - S);
printf("Solution took %.2fs\n", end - start);
}
collectResult(&solver);