new_mzero_damping_api Function

public function new_mzero_damping_api(verror, s6, s8, s9, rs6, rs8, alp, bet) result(vparam) bind(C, name=namespace//"new_mzero_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
real(kind=c_double), intent(in), value :: bet

Return Value type(c_ptr)


Source Code

function new_mzero_damping_api(verror, s6, s8, s9, rs6, rs8, alp, bet) &
      & result(vparam) &
      & bind(C, name=namespace//"new_mzero_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
   real(c_double), value, intent(in) :: bet
   type(c_ptr) :: vparam
   type(mzero_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_mzero_damping(tmp, d3_param(s6=s6, s8=s8, s9=s9, rs6=rs6, rs8=rs8, &
      & alp=alp, bet=bet))

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

end function new_mzero_damping_api