Changeset 23293
- Timestamp:
 - 09/16/18 19:51:25 (7 years ago)
 - Location:
 - issm/trunk-jpl/src/c
 - Files:
 - 
      
- 3 edited
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
issm/trunk-jpl/src/c/cores/controladm1qn3_core.cpp
r23281 r23293 322 322 int num_dependents_old = num_dependents; 323 323 int num_independents_old = num_independents; 324 325 #if defined(_HAVE_ADOLC_) 326 /*Get gradient for ADOLC {{{*/ 324 327 if(my_rank!=0){ 325 328 num_dependents = 0; 326 329 num_independents = 0; 327 330 } 328 329 #if defined(_HAVE_ADOLC_)330 /*Get gradient for ADOLC {{{*/331 331 332 332 /*get the EDF pointer:*/ … … 382 382 /*initialize direction index in the weights vector: */ 383 383 aWeightVector=xNewZeroInit<IssmPDouble>(num_dependents); 384 if(my_rank==0) tape_codi.setGradient(codi_global.output_indices[aDepIndex],1.0); 384 if(my_rank==0){ 385 if(aDepIndex<0 || aDepIndex>=num_dependents || codi_global.output_indices.size() <= aDepIndex){ 386 _error_("index value for AutodiffFosReverseIndexEnum should be in [0,num_dependents-1]"); 387 } 388 tape_codi.setGradient(codi_global.output_indices[aDepIndex],1.0); 389 } 385 390 tape_codi.evaluate(); 386 391 … … 461 466 xDelete<double>(XU); 462 467 xDelete<double>(XL); 468 xDelete<int>(control_enum); 469 xDelete<int>(N); 463 470 xDelete<IssmDouble>(scaling_factors); 464 471 xDelete<IssmPDouble>(totalgradient);  - 
      
issm/trunk-jpl/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp
r23255 r23293 229 229 xDelete<IssmDouble>(independents_fullmax); 230 230 xDelete<int>(start_point); 231 xDelete<int>(control_sizes); 231 232 /*Step2: create cost functions (dependents)*/ 232 233  - 
      
issm/trunk-jpl/src/c/modules/SetControlInputsFromVectorx/SetControlInputsFromVectorx.cpp
r23066 r23293 33 33 34 34 xDelete<int>(control_type); 35 xDelete<int>(M); 36 xDelete<int>(N); 35 37 } 36 38 else{  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  ![(please configure the [header_logo] section in trac.ini)](/trac/issm/chrome/common/trac_banner.png)