diff options
Diffstat (limited to 'Carpet/CarpetLib/src/restrict_3d_rf2.cc')
-rw-r--r-- | Carpet/CarpetLib/src/restrict_3d_rf2.cc | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Carpet/CarpetLib/src/restrict_3d_rf2.cc b/Carpet/CarpetLib/src/restrict_3d_rf2.cc index c1dade7fb..9f0936e1f 100644 --- a/Carpet/CarpetLib/src/restrict_3d_rf2.cc +++ b/Carpet/CarpetLib/src/restrict_3d_rf2.cc @@ -1,6 +1,8 @@ #include <cctk.h> #include <cctk_Parameters.h> +#include <loopcontrol.h> + #include <algorithm> #include <cassert> #include <cmath> @@ -113,15 +115,15 @@ namespace CarpetLib { // Loop over coarse region - for (int k=0; k<regkext; ++k) { - for (int j=0; j<regjext; ++j) { - for (int i=0; i<regiext; ++i) { - - dst [DSTIND3(i, j, k)] = src [SRCIND3(2*i, 2*j, 2*k)]; - - } - } - } +#pragma omp parallel + CCTK_LOOP3(restrict_3d_rf2, + i,j,k, 0,0,0, regiext,regjext,regkext, + dstipadext,dstjpadext,dstkpadext) + { + + dst [DSTIND3(i, j, k)] = src [SRCIND3(2*i, 2*j, 2*k)]; + + } CCTK_ENDLOOP3(restrict_3d_rf2); } |