m_sigmaph/sigmaph_free [ Functions ]

1942 subroutine sigmaph_free(self)
1943 1944 1945 !This section has been created automatically by the script Abilint (TD).
1946 !Do not modify the following lines by hand.
1947 #undef ABI_FUNC
1948 #define ABI_FUNC 'sigmaph_free'
1949 !End of the abilint section
1950 1951 implicit none
1952 1953 !Arguments ------------------------------------
1954 type(sigmaph_t),intent(inout) :: self
1955 1956 !Local variables-------------------------------
1957 integer :: ii,jj,ideg
1958 1959 ! *************************************************************************
1960 1961 ! integer
1962 if (allocated(self%bstart_ks)) then
1963 ABI_FREE(self%bstart_ks)
1964 end if
1965 if (allocated(self%nbcalc_ks)) then
1966 ABI_FREE(self%nbcalc_ks)
1967 end if
1968 if (allocated(self%kcalc2ibz)) then
1969 ABI_FREE(self%kcalc2ibz)
1970 end if
1971 1972 ! real
1973 if (allocated(self%kcalc)) then
1974 ABI_FREE(self%kcalc)
1975 end if
1976 if (allocated(self%kTmesh)) then
1977 ABI_FREE(self%kTmesh)
1978 end if
1979 if (allocated(self%mu_e)) then
1980 ABI_FREE(self%mu_e)
1981 end if
1982 if (allocated(self%wrmesh_b)) then
1983 ABI_FREE(self%wrmesh_b)
1984 end if
1985 if (allocated(self%qbz)) then
1986 ABI_FREE(self%qbz)
1987 end if
1988 if (allocated(self%qibz)) then
1989 ABI_FREE(self%qibz)
1990 end if
1991 if (allocated(self%wtq)) then
1992 ABI_FREE(self%wtq)
1993 end if
1994 if (allocated(self%qibz_k)) then
1995 ABI_FREE(self%qibz_k)
1996 end if
1997 if (allocated(self%wtq_k)) then
1998 ABI_FREE(self%wtq_k)
1999 end if
2000 if (allocated(self%gfw_mesh)) then
2001 ABI_FREE(self%gfw_mesh)
2002 end if
2003 2004 ! complex
2005 if (allocated(self%vals_e0ks)) then
2006 ABI_FREE(self%vals_e0ks)
2007 end if
2008 if (allocated(self%dvals_de0ks)) then
2009 ABI_FREE(self%dvals_de0ks)
2010 end if
2011 if (allocated(self%dw_vals)) then
2012 ABI_FREE(self%dw_vals)
2013 end if
2014 if (allocated(self%vals_wr)) then
2015 ABI_FREE(self%vals_wr)
2016 end if
2017 if (allocated(self%gfw_vals)) then
2018 ABI_FREE(self%gfw_vals)
2019 end if
2020 if (allocated(self%vals_nuq)) then
2021 ABI_FREE(self%vals_nuq)
2022 end if
2023 2024 ! types.
2025 if (allocated(self%degtab)) then
2026 do jj=1,size(self%degtab, dim=2)
2027 do ii=1,size(self%degtab, dim=1)
2028 do ideg=1,size(self%degtab(ii, jj)%bids)
2029 ABI_FREE(self%degtab(ii, jj)%bids(ideg)%vals)
2030 end do
2031 ABI_DT_FREE(self%degtab(ii, jj)%bids)
2032 end do
2033 end do
2034 ABI_DT_FREE(self%degtab)
2035 end if
2036 2037 ! Close netcdf file.
2038 #ifdef HAVE_NETCDF
2039 if (self%ncid /= nctk_noid) then
2040 NCF_CHECK(nf90_close(self%ncid))
2041 end if
2042 #endif
2043 2044 end subroutine sigmaph_free