fBase_free Subroutine

public subroutine fBase_free(sf)

finalize the type fBase

Arguments

Type IntentOptional Attributes Name
type(t_fBase), intent(inout) :: sf

self


Source Code

SUBROUTINE fBase_free( sf )
  ! MODULES
  IMPLICIT NONE
  ! INPUT/OUTPUT VARIABLES -------------------------!
  TYPE(t_fBase), INTENT(INOUT) :: sf !! self
  ! CODE --------------------------------------------------------------------------------------------------------------------------!
  IF(.NOT.sf%initialized) RETURN
  !allocatables
  SDEALLOCATE(sf%Xmn)
  SDEALLOCATE(sf%zero_odd_even)
  SDEALLOCATE(sf%x_IP)
  SDEALLOCATE(sf%thet_IP)
  SDEALLOCATE(sf%zeta_IP)
  SDEALLOCATE(sf%base_IP)
  SDEALLOCATE(sf%base_dthet_IP)
  SDEALLOCATE(sf%base_dzeta_IP)
  SDEALLOCATE(sf%snorm_base)
  SDEALLOCATE(sf%base1D_IPthet)
  SDEALLOCATE(sf%base1D_dthet_IPthet)
  SDEALLOCATE(sf%base1D_IPzeta)
  SDEALLOCATE(sf%base1D_dzeta_IPzeta)
  SDEALLOCATE(sf%offset_modes)

  sf%mn_max     =-1
  sf%mn_nyq     =-1
  sf%mn_IP      =-1
  sf%nfp        =-1
  sf%modes      =-1
  sf%sin_cos    =-1
  sf%d_thet     =0.0_wp
  sf%d_zeta     =0.0_wp
  sf%exclude_mn_zero=.FALSE.
  sf%initialized=.FALSE.

END SUBROUTINE fBase_free