new_rational_damping_api Function

public function new_rational_damping_api(verror, s6, s8, s9, a1, a2, alp) result(vparam) bind(C, name=namespace//"new_rational_damping")

Create new rational damping parameters

Arguments

Type IntentOptional Attributes Name
type(c_ptr), value :: verror
real(kind=c_double), intent(in), value :: s6
real(kind=c_double), intent(in), value :: s8
real(kind=c_double), intent(in), value :: s9
real(kind=c_double), intent(in), value :: a1
real(kind=c_double), intent(in), value :: a2
real(kind=c_double), intent(in), value :: alp

Return Value type(c_ptr)


Source Code

function new_rational_damping_api(verror, s6, s8, s9, a1, a2, alp) &
      & result(vparam) &
      & bind(C, name=namespace//"new_rational_damping")
   !DEC$ ATTRIBUTES DLLEXPORT :: new_rational_damping_api
   type(c_ptr), value :: verror
   type(vp_error), pointer :: error
   real(c_double), value, intent(in) :: s6
   real(c_double), value, intent(in) :: s8
   real(c_double), value, intent(in) :: s9
   real(c_double), value, intent(in) :: a1
   real(c_double), value, intent(in) :: a2
   real(c_double), value, intent(in) :: alp
   type(c_ptr) :: vparam
   type(rational_damping_param), allocatable :: tmp
   type(vp_param), pointer :: param

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

   vparam = c_null_ptr

   if (.not.c_associated(verror)) return
   call c_f_pointer(verror, error)

   allocate(tmp)
   tmp = rational_damping_param(s6=s6, s8=s8, s9=s9, a1=a1, a2=a2, alp=alp)

   allocate(param)
   call move_alloc(tmp, param%ptr)
   vparam = c_loc(param)

end function new_rational_damping_api