File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,8 @@ public:
164164
165165 static int allowMultipleMFIters (int allow);
166166
167+ void Finalize ();
168+
167169protected:
168170
169171 std::unique_ptr<FabArrayBase> m_fa; // !< This must be the first member!
@@ -202,7 +204,6 @@ protected:
202204 static AMREX_EXPORT int allow_multiple_mfiters;
203205
204206 void Initialize ();
205- void Finalize ();
206207};
207208
208209// ! Is it safe to have these two MultiFabs in the same MFiter?
Original file line number Diff line number Diff line change @@ -215,9 +215,13 @@ MFIter::~MFIter ()
215215void
216216MFIter::Finalize ()
217217{
218+ // avoid double finalize
218219 if (finalized) return ;
219220 finalized = true ;
220221
222+ // mark as invalid
223+ currentIndex = endIndex;
224+
221225#ifdef AMREX_USE_OMP
222226#pragma omp master
223227#endif
You can’t perform that action at this time.
0 commit comments