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,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…
Cancel
Save