Changeset 15017


Ignore:
Timestamp:
05/13/13 15:23:37 (12 years ago)
Author:
Eric.Larour
Message:

CHG: dynamic allocation of field within the GIA core

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp

    r15016 r15017  
    150150        /*times: */
    151151        blockt_time=xNew<IssmDouble>(numtimes+1);
    152         for (i=0;i<numtimes;i++){
     152        for (i=0;i<numtimes+1;i++){
    153153                blockt_time[i]=times[i]/1000.0/yts; //in kyr
    154                 if(i==numtimes-2)blockt_time[i]=2500.0;                 // in kyr 
    155         }
    156        
     154                if(i==numtimes-1)blockt_time[i]=2500.0;                 // in kyr 
     155                if(i==numtimes)blockt_time[i]=times[numtimes-1]/1000.0/yts;
     156        }
     157
    157158        /*bi: */
    158159        blockt_bi=xNew<IssmDouble>(numtimes-1);
Note: See TracChangeset for help on using the changeset viewer.