Changeset 15025
- Timestamp:
- 05/14/13 15:27:16 (12 years ago)
- Location:
- issm/trunk-jpl/src/c/modules/GiaDeflectionCorex
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp
r15024 r15025 31 31 struct blocks{ 32 32 double aswokm; 33 double asrpos;34 double swok;35 33 }; 36 34 37 35 extern "C" { 38 int distme_( int* pidisk,int* piedge, int* pNtime, int* pNtimp, int* pNtimm, int* pNafter,double* time,double* bi,double* dmi,double* zhload,double*hload);36 int distme_(int* pNtime,int* pNtimp,int* pNtimm,double* time,double* bi,double* dmi,double* zhload); 39 37 40 int what0_( int* pidisk,int* piedge,int* pNtimp,int* pNtimm,double* time,double* bi,double* dmi);38 int what0_(int* piedge,int* pNtimp,int* pNtimm,double* time,double* bi,double* dmi); 41 39 extern struct blockp blockp_; 42 40 extern struct blocko blocko_; … … 74 72 int numtimes; //loading history length 75 73 IssmDouble currenttime; 76 int Ntime =5; // number of times with load history77 int Ntimm; 74 int Ntime; // number of times with load history 75 int Ntimm; // Ntime-1 : for slope/y-cept of load segments 78 76 int Ntimp; // Ntime+1 : for evaluation time 79 int Nafter;80 77 IssmDouble* blockt_time=NULL; 81 78 IssmDouble* blockt_bi=NULL; 82 79 IssmDouble* blockt_dmi=NULL; 83 80 IssmDouble* blocky_zhload=NULL; 84 IssmDouble* blocko_hload=NULL;85 81 86 82 /*gia material parameters: */ … … 124 120 //from our model, irate comes in with values in [1,2], which maps into [0,1] in naruse: 125 121 irate=irate-1; 126 Nafter=1;127 122 Ntime=numtimes; 128 123 Ntimm=Ntime-1; 129 Ntimp=Ntime+ Nafter;124 Ntimp=Ntime+1; 130 125 131 126 /*Prepare block inputs for fortran distme and what0 routines of the naruse code: {{{*/ … … 141 136 142 137 /*loading history: */ 143 blocky_zhload=xNew<IssmDouble>( numtimes);144 for(i=0;i< numtimes;i++){138 blocky_zhload=xNew<IssmDouble>(Ntime); 139 for(i=0;i<Ntime;i++){ 145 140 blocky_zhload[i]=hes[i]; 146 141 } 147 142 148 /*times : */149 blockt_time=xNew<IssmDouble>( numtimes+1);150 for (i=0;i< numtimes+1;i++){151 blockt_time[i]=times[i]/1000.0/yts; //in kyr152 if(i==numtimes-1)blockt_time[i]= 2500.0; // in kyr153 if(i==numtimes)blockt_time[i]=times[numtimes-1]/1000.0/yts; 143 /*times in kyr: */ 144 blockt_time=xNew<IssmDouble>(Ntimp); 145 for (i=0;i<Ntimp;i++){ 146 blockt_time[i]=times[i]/1000.0/yts; 147 if(i==numtimes-1)blockt_time[i]=times[numtimes-1]/1000.0/yts; // final loading time, same as evaluation time 148 if(i==numtimes)blockt_time[i]=times[numtimes-1]/1000.0/yts; // evaluation time 154 149 } 155 150 156 151 /*bi: */ 157 blockt_bi=xNew<IssmDouble>( numtimes-1);152 blockt_bi=xNew<IssmDouble>(Ntimm); 158 153 159 154 /*dmi: */ 160 blockt_dmi=xNew<IssmDouble>( numtimes-1);155 blockt_dmi=xNew<IssmDouble>(Ntimm); 161 156 162 /*hload:*/163 blocko_hload=xNew<IssmDouble>(numtimes);164 165 157 /*irate: */ 166 158 blockn_.irate=irate; … … 171 163 172 164 /*Call distme driver: */ 173 distme_(& idisk,&iedge,&Ntime,&Ntimp,&Ntimm,&Nafter,blockt_time,blockt_bi,blockt_dmi,blocky_zhload,blocko_hload);165 distme_(&Ntime,&Ntimp,&Ntimm,blockt_time,blockt_bi,blockt_dmi,blocky_zhload); 174 166 175 167 /*Call what0 driver: */ 176 what0_(&i disk,&iedge,&Ntimp,&Ntimm,blockt_time,blockt_bi,blockt_dmi);168 what0_(&iedge,&Ntimp,&Ntimm,blockt_time,blockt_bi,blockt_dmi); 177 169 178 170 /*output solution: */ … … 193 185 xDelete<IssmDouble>(blockt_dmi); 194 186 xDelete<IssmDouble>(blocky_zhload); 195 xDelete<IssmDouble>(blocko_hload);196 187 197 188 } -
issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/distme.f
r15016 r15025 1 subroutine distme(idisk,iedge,Ntime,Ntimp,Ntimm,Nafter,time,bi, 2 &dmi,zhload,hload) 1 subroutine distme(Ntime,Ntimp,Ntimm,time,bi,dmi,zhload) 3 2 implicit double precision (a-h,o-y) 4 integer idisk,iedge,Ntime,Ntimp,Ntimm,Nafter5 parameter (N 3G =1)3 integer Ntime,Ntimp,Ntimm 4 parameter (Nafter=1) 6 5 double precision pset(7) 7 6 double precision time(Ntimp),dmi(Ntimm),bi(Ntimm),dumbt(Ntimp) 8 7 double precision hload(Ntime),qpat(Ntime),qt(Ntime) 9 double precision z radii(N3G),zhload(Ntime),rhoi,distrad8 double precision zhload(Ntime),rhoi,distrad 10 9 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 11 10 common /blockp/ pset … … 22 21 dumbt(k) = time(k) 23 22 776 continue 24 c write(6,*) time(1), time(2), time(3)23 write(6,*) time(1), time(2), time(3), time(4),time(5) 25 24 c write(6,*) pset(1), pset(2), pset(3), pset(4), pset(5), pset(6) 26 25 c write(6,*) pset(7) -
issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/what0.f
r15024 r15025 1 subroutine what0(i disk,iedge,Ntimp,Ntimm,time,bi,dmi)1 subroutine what0(iedge,Ntimp,Ntimm,time,bi,dmi) 2 2 implicit double precision (a-h,o-z) 3 3 integer Ntimp,Ntimm … … 39 39 dk = endk/dfloat(nhank) 40 40 c 41 if(idisk.gt.1) go to 700142 41 ak = zero 43 42 do 7000 ik = 1,nhank … … 73 72 zksamp(ik) = zkp 74 73 7000 continue 75 7001 continue76 74 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 77 75 c The following looped call sets up the free solution convolved with the
Note:
See TracChangeset
for help on using the changeset viewer.