new_zero_damping_api Function

public function new_zero_damping_api(verror, s6, s8, s9, rs6, rs8, alp) result(vparam) bind(C, name=namespace//"new_zero_damping")

Create new zero 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 :: rs6
real(kind=c_double), intent(in), value :: rs8
real(kind=c_double), intent(in), value :: alp

Return Value type(c_ptr)


Source Code

function new_zero_damping_api(verror, s6, s8, s9, rs6, rs8, alp) &
      & result(vparam) &
      & bind(C, name=namespace//"new_zero_damping")
   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) :: rs6
   real(c_double), value, intent(in) :: rs8
   real(c_double), value, intent(in) :: alp
   type(c_ptr) :: vparam
   type(zero_damping_param), allocatable :: tmp
   type(vp_param), pointer :: param

   vparam = c_null_ptr

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

   allocate(tmp)
   call new_zero_damping(tmp, d3_param(s6=s6, s8=s8, s9=s9, rs6=rs6, rs8=rs8, &
      & alp=alp))

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

end function new_zero_damping_api