solve_with_pikaia Subroutine

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

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
logical, intent(in), optional :: omp

if OpenMP is being used


Calls

proc~~solve_with_pikaia~~CallsGraph proc~solve_with_pikaia pikaia_class%solve_with_pikaia proc~pikaia pikaia_class%pikaia proc~solve_with_pikaia->proc~pikaia proc~adjmut pikaia_class%adjmut proc~pikaia->proc~adjmut proc~cross pikaia_class%cross proc~pikaia->proc~cross proc~decode pikaia_class%decode proc~pikaia->proc~decode proc~encode pikaia_class%encode proc~pikaia->proc~encode proc~func_wrapper pikaia_class%func_wrapper proc~pikaia->proc~func_wrapper proc~genrep pikaia_class%genrep proc~pikaia->proc~genrep proc~mutate pikaia_class%mutate proc~pikaia->proc~mutate proc~newpop pikaia_class%newpop proc~pikaia->proc~newpop proc~report pikaia_class%report proc~pikaia->proc~report proc~rninit pikaia_class%rninit proc~pikaia->proc~rninit proc~rnkpop pikaia_class%rnkpop proc~pikaia->proc~rnkpop proc~select_parents pikaia_class%select_parents proc~pikaia->proc~select_parents proc~stdrep pikaia_class%stdrep proc~pikaia->proc~stdrep proc~urand pikaia_class%urand proc~pikaia->proc~urand proc~cross->proc~urand proc~mutate->proc~urand proc~newpop->proc~func_wrapper proc~newpop->proc~rnkpop none~initialize mt19937%initialize proc~rninit->none~initialize proc~rqsort rqsort proc~rnkpop->proc~rqsort proc~select_parents->proc~urand proc~stdrep->proc~urand proc~genrand64_real1 mt19937%genrand64_real1 proc~urand->proc~genrand64_real1 proc~init_by_array64 mt19937%init_by_array64 none~initialize->proc~init_by_array64 proc~init_genrand64 mt19937%init_genrand64 none~initialize->proc~init_genrand64 proc~init_genrand64_i4 mt19937%init_genrand64_i4 none~initialize->proc~init_genrand64_i4 proc~genrand64_int64 mt19937%genrand64_int64 proc~genrand64_real1->proc~genrand64_int64 proc~genrand64_int64->proc~init_genrand64 proc~init_by_array64->proc~init_genrand64 proc~init_genrand64_i4->none~initialize

Called by

proc~~solve_with_pikaia~~CalledByGraph proc~solve_with_pikaia pikaia_class%solve_with_pikaia program~test_algen test_algen program~test_algen->proc~solve_with_pikaia

Source Code

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

    implicit none

    class(pikaia_class),intent(inout)   :: me
    real(wp),dimension(:),intent(inout) :: x
    real(wp),intent(out)                :: f
    integer,intent(out)                 :: status
    logical, intent(in), optional       :: omp !! if OpenMP is being used

    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,omp)

        !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