48 |
|
|
49 |
_RL objf |
_RL objf |
50 |
|
|
51 |
#if defined (DYNAMIC) |
#ifdef DYNAMIC |
52 |
_RL xx(nn) |
_RL, dimension(:), allocatable :: xx, adxx |
|
_RL adxx(nn) |
|
|
#elif defined (USE_POINTER) || (MAX_INDEPEND == 0) |
|
|
_RL xx |
|
|
_RL adxx |
|
|
pointer (pxx,xx(1)) |
|
|
pointer (padxx,adxx(1)) |
|
53 |
#else |
#else |
54 |
integer nmax |
integer nmax |
55 |
parameter( nmax = MAX_INDEPEND ) |
parameter( nmax = MAX_INDEPEND ) |
63 |
_RL dxmin,df1 |
_RL dxmin,df1 |
64 |
character*3 normtype |
character*3 normtype |
65 |
c work arrays |
c work arrays |
66 |
integer ndz, mupdate |
integer ndz |
67 |
CML _RL dz(ndz) |
CML _RL dz(ndz) |
68 |
double precision, dimension(:), allocatable :: dz |
double precision, dimension(:), allocatable :: dz |
69 |
c extra dummy variables |
c extra dummy variables |
84 |
|
|
85 |
c-- Allocate memory for the control variables and the gradient vector. |
c-- Allocate memory for the control variables and the gradient vector. |
86 |
#if defined(DYNAMIC) |
#if defined(DYNAMIC) |
87 |
#elif defined(USE_POINTER) || (MAX_INDEPEND == 0) |
allocate( xx(nn) ) |
88 |
call myalloc( pxx , nn*REAL_BYTE ) |
allocate( adxx(nn) ) |
|
call myalloc( padxx, nn*REAL_BYTE ) |
|
89 |
#endif |
#endif |
90 |
|
|
91 |
#if defined (DYNAMIC) |
#ifndef DYNAMIC |
|
#elif defined(USE_POINTER) || (MAX_INDEPEND == 0) |
|
|
#else |
|
92 |
if (nn .gt. nmax) then |
if (nn .gt. nmax) then |
93 |
print*,' OPTIMUM: Not enough space.' |
print*,' OPTIMUM: Not enough space.' |
94 |
print*,' nmax = ',nmax |
print*,' nmax = ',nmax |
204 |
call optim_writedata( nn, ctrlname, .false., -9999., xx ) |
call optim_writedata( nn, ctrlname, .false., -9999., xx ) |
205 |
|
|
206 |
c clean up |
c clean up |
207 |
|
#ifdef DYNAMIC |
208 |
|
deallocate(xx, adxx) |
209 |
|
#endif /* DYNAMIC */ |
210 |
deallocate(dz) |
deallocate(dz) |
211 |
|
|
212 |
c stopping criterion |
c stopping criterion |