We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
bool MFIter::initialized
1 parent 2a7cba8 commit ea536b7Copy full SHA for ea536b7
Src/Base/AMReX_MFIter.H
@@ -180,6 +180,7 @@ protected:
180
IndexType typ;
181
182
bool dynamic;
183
+ bool initialized;
184
185
struct DeviceSync {
186
DeviceSync () = default;
Src/Base/AMReX_MFIter.cpp
@@ -215,10 +215,13 @@ MFIter::~MFIter ()
215
void
216
MFIter::Finalize ()
217
{
218
+ if (!initialized) return;
219
+
220
#ifdef AMREX_USE_OMP
221
#pragma omp master
222
#endif
223
224
+ initialized = false;
225
depth = 0;
226
}
227
@@ -354,6 +357,13 @@ MFIter::Initialize ()
354
357
355
358
typ = fabArray.boxArray().ixType();
356
359
360
361
+#ifdef AMREX_USE_OMP
362
+#pragma omp master
363
+#endif
364
+ {
365
+ initialized = true;
366
+ }
367
368
369
Box
0 commit comments