Browse Source

Fix bug using boost display and anderson lagged

lagkey
Trevor Irons 6 years ago
parent
commit
55cec3dc63
1 changed files with 9 additions and 1 deletions
  1. 9
    1
      Modules/FDEM1D/src/EMEarth1D.cpp

+ 9
- 1
Modules/FDEM1D/src/EMEarth1D.cpp View File

232
             icalc += 1;
232
             icalc += 1;
233
             // Check to see if they are all on a plane? If so we can do this fast
233
             // Check to see if they are all on a plane? If so we can do this fast
234
             if (Antenna->IsHorizontallyPlanar() && HankelType == ANDERSON801) {
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
                 for (int ifreq=0; ifreq<Antenna->GetNumberOfFrequencies();++ifreq) {
240
                 for (int ifreq=0; ifreq<Antenna->GetNumberOfFrequencies();++ifreq) {
236
                     Real wavef = 2.*PI* Antenna->GetFrequency(ifreq);
241
                     Real wavef = 2.*PI* Antenna->GetFrequency(ifreq);
237
                     #ifdef LEMMAUSEOMP
242
                     #ifdef LEMMAUSEOMP
245
                     for (int irec=0; irec<Receivers->GetNumberOfPoints(); ++irec) {
250
                     for (int irec=0; irec<Receivers->GetNumberOfPoints(); ++irec) {
246
                         auto AntCopy = static_cast<PolygonalWireAntenna*>(Antenna.get())->ClonePA();
251
                         auto AntCopy = static_cast<PolygonalWireAntenna*>(Antenna.get())->ClonePA();
247
                         SolveLaggedTxRxPair(irec, Hankel.get(), wavef, ifreq, AntCopy.get());
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
                     #ifdef LEMMAUSEOMP
258
                     #ifdef LEMMAUSEOMP
251
                     }
259
                     }
252
                     #endif
260
                     #endif

Loading…
Cancel
Save