diff options
Diffstat (limited to 'Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc')
-rw-r--r-- | Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc b/Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc index 62450333c..f9b3c2247 100644 --- a/Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc +++ b/Carpet/CarpetLib/src/restrict_3d_vc_rf2.cc @@ -249,6 +249,43 @@ namespace CarpetLib { size_t const srcdk = SRCOFF3(0,0,1) - SRCOFF3(0,0,0); + + if (not use_loopcontrol_in_operators) { + + // Loop over coarse region +#pragma omp parallel for collapse(3) + for (int k=0; k<regkext; ++k) { + for (int j=0; j<regjext; ++j) { + for (int i=0; i<regiext; ++i) { +#ifdef CARPET_DEBUG + if(not (2 * k + centk < srckext and + 2 * j + centj < srcjext and + 2 * i + centi < srciext)) + { + cout << "restrict_3d_vc_rf2.cc\n"; + cout << "regext " << regext << "\n"; + cout << "srcext " << srcext << "\n"; + cout << "srcbbox=" << srcbbox << "\n"; + cout << "dstbbox=" << dstbbox << "\n"; + cout << "regbbox=" << regbbox << "\n"; + cout << "srcregbbox=" << srcregbbox << "\n"; + cout << "icent=" << icent << "\n"; + } + assert(2 * k + centk < srckext and + 2 * j + centj < srcjext and + 2 * i + centi < srciext); +#endif + + dst [DSTIND3(i, j, k)] = + restrict3<T,centi,centj,centk>::call + (& src[SRCIND3(2*i, 2*j, 2*k)], srcdi, srcdj, srcdk); + + } + } + } + + } else { + // Loop over coarse region #pragma omp parallel CCTK_LOOP3(restrict_3d_vc_rf2, @@ -280,6 +317,8 @@ namespace CarpetLib { } CCTK_ENDLOOP3(restrict_3d_vc_rf2); + } + } |