From 93a3b0996962cb85ea276e6359adb5f0825c0f95 Mon Sep 17 00:00:00 2001 From: Jeremy Vachier <89128100+jvachier@users.noreply.github.com> Date: Tue, 28 Nov 2023 19:04:51 +0100 Subject: [PATCH] Update and correction. --- .gitignore | 1 + src/abp_3D_confine.cpp | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 3efbd5a..9f308f8 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ *.txt *.bin *data/ +*videos/ # Ignore specific file test.mp4 diff --git a/src/abp_3D_confine.cpp b/src/abp_3D_confine.cpp index 5cca596..5426cac 100644 --- a/src/abp_3D_confine.cpp +++ b/src/abp_3D_confine.cpp @@ -94,15 +94,14 @@ int main(int argc, char *argv[]) double r = 5.0 * L; /* does not work when using openmp - clock_t tStart = clock(); // check time for one trajectory - fprintf(datacsv, "Particles,x-position,y-position,z-position,ex-orientation,ey-orientation,ez-orientation,time\n"); + clock_t tStart = clock(); // check time for one trajectory */ // Open MP to get execution time double itime, ftime, exec_time; itime = omp_get_wtime(); - + fprintf(datacsv, "Particles,x-position,y-position,z-position,ex-orientation,ey-orientation,ez-orientation,time\n"); // initialization position and activity initialization( @@ -115,8 +114,7 @@ int main(int argc, char *argv[]) printf("Initialization done.\n"); // Time evoultion - int time; - for (time = 0; time < N; time++) + for (int time = 0; time < N; time++) { update_position( x, y, z, ex, ey, ez, prefactor_e, Particles,