solve_with_pikaia Subroutine

private subroutine solve_with_pikaia(me, x, f, status)

Main pikaia wrapper used by the class.

Type Bound

pikaia_class

Arguments

Type IntentOptional 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

Calls

proc~~solve_with_pikaia~~CallsGraph proc~solve_with_pikaia pikaia_module::pikaia_class%solve_with_pikaia proc~pikaia pikaia_module::pikaia_class%pikaia proc~solve_with_pikaia->proc~pikaia proc~adjmut pikaia_module::pikaia_class%adjmut proc~pikaia->proc~adjmut proc~cross pikaia_module::pikaia_class%cross proc~pikaia->proc~cross proc~decode pikaia_module::pikaia_class%decode proc~pikaia->proc~decode proc~encode pikaia_module::pikaia_class%encode proc~pikaia->proc~encode proc~func_wrapper pikaia_module::pikaia_class%func_wrapper proc~pikaia->proc~func_wrapper proc~genrep pikaia_module::pikaia_class%genrep proc~pikaia->proc~genrep proc~mutate pikaia_module::pikaia_class%mutate proc~pikaia->proc~mutate proc~newpop pikaia_module::pikaia_class%newpop proc~pikaia->proc~newpop proc~report pikaia_module::pikaia_class%report proc~pikaia->proc~report proc~rninit pikaia_module::pikaia_class%rninit proc~pikaia->proc~rninit proc~rnkpop pikaia_module::pikaia_class%rnkpop proc~pikaia->proc~rnkpop proc~select_parents pikaia_module::pikaia_class%select_parents proc~pikaia->proc~select_parents proc~stdrep pikaia_module::pikaia_class%stdrep proc~pikaia->proc~stdrep proc~urand pikaia_module::pikaia_class%urand proc~pikaia->proc~urand proc~cross->proc~urand proc~mutate->proc~urand proc~newpop->proc~func_wrapper proc~newpop->proc~rnkpop initialize initialize proc~rninit->initialize proc~rqsort pikaia_module::rqsort proc~rnkpop->proc~rqsort proc~select_parents->proc~urand proc~stdrep->proc~urand genrand64_real1 genrand64_real1 proc~urand->genrand64_real1

Source Code

    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