Main pikaia wrapper used by the class.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(pikaia_class), | intent(inout) | :: | me | |||
real(kind=wp), | intent(inout), | dimension(:) | :: | x | ||
real(kind=wp), | intent(out) | :: | f | |||
integer, | intent(out) | :: | status |
subroutine solve_with_pikaia(me,x,f,status) implicit none class(pikaia_class),intent(inout) :: me real(wp),dimension(:),intent(inout) :: x real(wp),intent(out) :: f integer,intent(out) :: status if (associated(me%user_f)) then !scale input initial guess to be [0,1]: x = (x-me%xl)/me%del !call the main routine, using the wrapper function: call me%pikaia(x,f,status) !unscale output to be [xl,xu]: x = me%xl + me%del*x else write(output_unit,'(A)') 'Error: pikaia class not initialized.' status = -1 end if end subroutine solve_with_pikaia