瀏覽代碼

Fix bug using boost display and anderson lagged

lagkey
Trevor Irons 6 年之前
父節點
當前提交
55cec3dc63
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9
    1
      Modules/FDEM1D/src/EMEarth1D.cpp

+ 9
- 1
Modules/FDEM1D/src/EMEarth1D.cpp 查看文件

@@ -232,6 +232,11 @@ namespace Lemma {
232 232
             icalc += 1;
233 233
             // Check to see if they are all on a plane? If so we can do this fast
234 234
             if (Antenna->IsHorizontallyPlanar() && HankelType == ANDERSON801) {
235
+                #ifdef HAVE_BOOST_PROGRESS
236
+                if (progressbar) {
237
+                    disp = new boost::progress_display( Receivers->GetNumberOfPoints()*Antenna->GetNumberOfFrequencies() );
238
+                }
239
+                #endif
235 240
                 for (int ifreq=0; ifreq<Antenna->GetNumberOfFrequencies();++ifreq) {
236 241
                     Real wavef = 2.*PI* Antenna->GetFrequency(ifreq);
237 242
                     #ifdef LEMMAUSEOMP
@@ -245,8 +250,11 @@ namespace Lemma {
245 250
                     for (int irec=0; irec<Receivers->GetNumberOfPoints(); ++irec) {
246 251
                         auto AntCopy = static_cast<PolygonalWireAntenna*>(Antenna.get())->ClonePA();
247 252
                         SolveLaggedTxRxPair(irec, Hankel.get(), wavef, ifreq, AntCopy.get());
253
+                        #ifdef HAVE_BOOST_PROGRESS
254
+                        if (progressbar) ++(*disp);
255
+                        #endif
248 256
                     }
249
-                    //Receivers->ClearFields();
257
+                    #pragma omp barrier
250 258
                     #ifdef LEMMAUSEOMP
251 259
                     }
252 260
                     #endif

Loading…
取消
儲存