@@ -92,10 +92,11 @@ contains
9292 ! Allocating the patch identities bookkeeping variable
9393 allocate (patch_id_fp(0 :m, 0 :n, 0 :p))
9494
95- allocate (ib_markers%sf(0 :m, 0 :n, 0 :p))
96-
97- allocate (levelset%sf(0 :m, 0 :n, 0 :p, 1 :num_ibs))
98- allocate (levelset_norm%sf(0 :m, 0 :n, 0 :p, 1 :num_ibs, 1 :3 ))
95+ if (ib) then
96+ allocate (ib_markers%sf(0 :m, 0 :n, 0 :p))
97+ allocate (levelset%sf(0 :m, 0 :n, 0 :p, 1 :num_ibs))
98+ allocate (levelset_norm%sf(0 :m, 0 :n, 0 :p, 1 :num_ibs, 1 :3 ))
99+ end if
99100
100101 if (qbmm .and. .not. polytropic) then
101102 !Allocate bubble pressure pb and vapor mass mv for non- polytropic qbmm at all quad nodes and R0 bins
@@ -227,7 +228,10 @@ contains
227228
228229 ! Deallocating the patch identities bookkeeping variable
229230 deallocate (patch_id_fp)
230- deallocate (ib_markers%sf)
231+
232+ if (ib) then
233+ deallocate (ib_markers%sf, levelset%sf, levelset_norm%sf)
234+ end if
231235
232236 end subroutine s_finalize_initial_condition_module
233237
0 commit comments