Release the forest, the indicator, and any controller-emitted mesh/geometry. The caller-owned base mesh/geometry are untouched. A model still pointing at a controller-emitted mesh must not be used after this call.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(AMRController2D), | intent(inout) | :: | this |
subroutine Free_AMRController2D(this)
!! Release the forest, the indicator, and any controller-emitted mesh/geometry. The
!! caller-owned base mesh/geometry are untouched. A model still pointing at a
!! controller-emitted mesh must not be used after this call.
implicit none
class(AMRController2D),intent(inout) :: this
call this%forest%Free()
call this%indicator%Free()
if(this%ownsActive) then
call this%activeMesh%Free()
deallocate(this%activeMesh)
endif
if(associated(this%geomA)) then
call this%geomA%Free()
deallocate(this%geomA)
endif
if(associated(this%geomB)) then
call this%geomB%Free()
deallocate(this%geomB)
endif
if(associated(this%genGeom)) then
call this%genGeom%Free()
deallocate(this%genGeom)
endif
this%baseMesh => null()
this%activeMesh => null()
this%activeGeom => null()
this%geomA => null()
this%geomB => null()
this%genGeom => null()
this%geomSlot = 0
this%nGeomReused = 0
this%nGeomGenerated = 0
this%interp => null()
this%ownsActive = .false.
endsubroutine Free_AMRController2D