3 |
|
|
4 |
#include "GRDCHK_OPTIONS.h" |
#include "GRDCHK_OPTIONS.h" |
5 |
#include "AD_CONFIG.h" |
#include "AD_CONFIG.h" |
6 |
|
#ifdef ALLOW_COST |
7 |
|
# include "COST_OPTIONS.h" |
8 |
|
#endif |
9 |
|
#ifdef ALLOW_CTRL |
10 |
|
# include "CTRL_OPTIONS.h" |
11 |
|
#endif |
12 |
|
|
13 |
CBOI |
CBOI |
14 |
C |
C |
165 |
ftlxxmemo = 0. |
ftlxxmemo = 0. |
166 |
#if (defined (ALLOW_ADMTLM)) |
#if (defined (ALLOW_ADMTLM)) |
167 |
fcref = objf_state_final(idep,jdep,1,1,1) |
fcref = objf_state_final(idep,jdep,1,1,1) |
168 |
#elif (defined (ALLOW_AUTODIFF_OPENAD)) |
#elif (defined (ALLOW_OPENAD)) |
169 |
fcref = fc%v |
fcref = fc%v |
170 |
#else |
#else |
171 |
fcref = fc |
fcref = fc |
329 |
C-- forward run with perturbed control vector |
C-- forward run with perturbed control vector |
330 |
myTime = startTime |
myTime = startTime |
331 |
myIter = nIter0 |
myIter = nIter0 |
332 |
#ifdef ALLOW_AUTODIFF_OPENAD |
#ifdef ALLOW_OPENAD |
333 |
CALL OpenAD_THE_MAIN_LOOP( myTime, myIter, myThid ) |
CALL OpenAD_THE_MAIN_LOOP( myTime, myIter, myThid ) |
334 |
#else |
#else |
335 |
CALL THE_MAIN_LOOP( myTime, myIter, myThid ) |
CALL THE_MAIN_LOOP( myTime, myIter, myThid ) |
337 |
|
|
338 |
#if (defined (ALLOW_ADMTLM)) |
#if (defined (ALLOW_ADMTLM)) |
339 |
fcpertplus = objf_state_final(idep,jdep,1,1,1) |
fcpertplus = objf_state_final(idep,jdep,1,1,1) |
340 |
#elif (defined (ALLOW_AUTODIFF_OPENAD)) |
#elif (defined (ALLOW_OPENAD)) |
341 |
fcpertplus = fc%v |
fcpertplus = fc%v |
342 |
#else |
#else |
343 |
fcpertplus = fc |
fcpertplus = fc |
368 |
C-- forward run with perturbed control vector |
C-- forward run with perturbed control vector |
369 |
myTime = startTime |
myTime = startTime |
370 |
myIter = nIter0 |
myIter = nIter0 |
371 |
#ifdef ALLOW_AUTODIFF_OPENAD |
#ifdef ALLOW_OPENAD |
372 |
CALL OpenAD_THE_MAIN_LOOP( myTime, myIter, myThid ) |
CALL OpenAD_THE_MAIN_LOOP( myTime, myIter, myThid ) |
373 |
#else |
#else |
374 |
CALL THE_MAIN_LOOP( myTime, myIter, myThid ) |
CALL THE_MAIN_LOOP( myTime, myIter, myThid ) |
376 |
|
|
377 |
#if (defined (ALLOW_ADMTLM)) |
#if (defined (ALLOW_ADMTLM)) |
378 |
fcpertminus = objf_state_final(idep,jdep,1,1,1) |
fcpertminus = objf_state_final(idep,jdep,1,1,1) |
379 |
#elif (defined (ALLOW_AUTODIFF_OPENAD)) |
#elif (defined (ALLOW_OPENAD)) |
380 |
fcpertminus = fc%v |
fcpertminus = fc%v |
381 |
#else |
#else |
382 |
fcpertminus = fc |
fcpertminus = fc |