@brief Subroutine that deallocates all the variables of the electric and magnetic fields.
@param[in,out] F An instance of the KORC derived type FIELDS.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(FIELDS), | intent(inout) | :: | F |
subroutine DEALLOCATE_FIELDS_ARRAYS(F)
TYPE(FIELDS), INTENT(INOUT) :: F
if (ALLOCATED(F%PSIp)) DEALLOCATE(F%PSIp)
if (ALLOCATED(F%B_2D%R)) DEALLOCATE(F%B_2D%R)
if (ALLOCATED(F%B_2D%PHI)) DEALLOCATE(F%B_2D%PHI)
if (ALLOCATED(F%B_2D%Z)) DEALLOCATE(F%B_2D%Z)
if (ALLOCATED(F%gradB_2D%R)) DEALLOCATE(F%gradB_2D%R)
if (ALLOCATED(F%gradB_2D%PHI)) DEALLOCATE(F%gradB_2D%PHI)
if (ALLOCATED(F%gradB_2D%Z)) DEALLOCATE(F%gradB_2D%Z)
if (ALLOCATED(F%curlb_2D%R)) DEALLOCATE(F%curlb_2D%R)
if (ALLOCATED(F%curlb_2D%PHI)) DEALLOCATE(F%curlb_2D%PHI)
if (ALLOCATED(F%curlb_2D%Z)) DEALLOCATE(F%curlb_2D%Z)
if (ALLOCATED(F%B_3D%R)) DEALLOCATE(F%B_3D%R)
if (ALLOCATED(F%B_3D%PHI)) DEALLOCATE(F%B_3D%PHI)
if (ALLOCATED(F%B_3D%Z)) DEALLOCATE(F%B_3D%Z)
if (ALLOCATED(F%E_2D%R)) DEALLOCATE(F%E_2D%R)
if (ALLOCATED(F%E_2D%PHI)) DEALLOCATE(F%E_2D%PHI)
if (ALLOCATED(F%E_2D%Z)) DEALLOCATE(F%E_2D%Z)
if (ALLOCATED(F%E_3D%R)) DEALLOCATE(F%E_3D%R)
if (ALLOCATED(F%E_3D%PHI)) DEALLOCATE(F%E_3D%PHI)
if (ALLOCATED(F%E_3D%Z)) DEALLOCATE(F%E_3D%Z)
if (ALLOCATED(F%E_SC_1D%PHI)) DEALLOCATE(F%E_SC_1D%PHI)
if (ALLOCATED(F%J1_SC_1D%PHI)) DEALLOCATE(F%J1_SC_1D%PHI)
if (ALLOCATED(F%J2_SC_1D%PHI)) DEALLOCATE(F%J2_SC_1D%PHI)
if (ALLOCATED(F%J3_SC_1D%PHI)) DEALLOCATE(F%J3_SC_1D%PHI)
if (ALLOCATED(F%A1_SC_1D%PHI)) DEALLOCATE(F%A1_SC_1D%PHI)
if (ALLOCATED(F%A2_SC_1D%PHI)) DEALLOCATE(F%A2_SC_1D%PHI)
if (ALLOCATED(F%A3_SC_1D%PHI)) DEALLOCATE(F%A3_SC_1D%PHI)
if (ALLOCATED(F%X%R)) DEALLOCATE(F%X%R)
if (ALLOCATED(F%X%PHI)) DEALLOCATE(F%X%PHI)
if (ALLOCATED(F%X%Z)) DEALLOCATE(F%X%Z)
if (ALLOCATED(F%FLAG2D)) DEALLOCATE(F%FLAG2D)
if (ALLOCATED(F%FLAG3D)) DEALLOCATE(F%FLAG3D)
if (ALLOCATED(F%LCFS2D)) DEALLOCATE(F%LCFS2D)
if (ALLOCATED(F%LCFS3D)) DEALLOCATE(F%LCFS3D)
end subroutine DEALLOCATE_FIELDS_ARRAYS