set_model_work_partition Subroutine

public subroutine set_model_work_partition(verror, vdisp, part, nparts) bind(C, name=namespace//"set_model_work_partition")

Assign an externally managed part of the interaction loops to this model.

Parts are zero based, summing the results of all parts reproduces the complete calculation.

Arguments

Type IntentOptional Attributes Name
type(c_ptr), value :: verror
type(c_ptr), value :: vdisp
integer(kind=c_int), intent(in), value :: part
integer(kind=c_int), intent(in), value :: nparts

Source Code

subroutine set_model_work_partition(verror, vdisp, part, nparts) &
      & bind(C, name=namespace//"set_model_work_partition")
   type(c_ptr), value :: verror
   type(vp_error), pointer :: error
   type(c_ptr), value :: vdisp
   type(vp_model), pointer :: disp
   integer(c_int), value, intent(in) :: part
   integer(c_int), value, intent(in) :: nparts

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

   if (.not.c_associated(vdisp)) then
      call fatal_error(error%ptr, "D3 dispersion model is missing")
      return
   end if
   call c_f_pointer(vdisp, disp)

   call new_work_partition(error%ptr, disp%partition, int(part), int(nparts))
end subroutine set_model_work_partition