delete_model_api Subroutine

public subroutine delete_model_api(vdisp) bind(C, name=namespace//"delete_model")

Delete dispersion model

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: vdisp

Source Code

subroutine delete_model_api(vdisp) &
      & bind(C, name=namespace//"delete_model")
   !DEC$ ATTRIBUTES DLLEXPORT :: delete_model_api
   type(c_ptr), intent(inout) :: vdisp
   type(vp_model), pointer :: disp

   if (debug) print'("[Info]",1x, a)', "delete_model"

   if (c_associated(vdisp)) then
      call c_f_pointer(vdisp, disp)

      deallocate(disp)
      vdisp = c_null_ptr
   end if

end subroutine delete_model_api