Changeset 14746
- Timestamp:
- 04/24/13 16:04:43 (12 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/GiaDeflectionCoreArgs.h
r14734 r14746 11 11 IssmDouble ri; //radial distance from center of disk to vertex i 12 12 IssmDouble re; //radius of disk 13 IssmDouble current_he; //thickness of ice at current time 13 14 IssmDouble* hes; //loading history (in ice thickness) 14 15 IssmDouble* times; //loading history times … … 27 28 IssmDouble rho_ice; 28 29 30 /*debug info: */ 31 int idisk; //id of the element we are running the gia code in. 32 29 33 }; 30 34 -
issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp
r14735 r14746 3057 3057 3058 3058 /*thickness averages: */ 3059 IssmDouble current_he=NULL; 3059 3060 IssmDouble* hes=NULL; 3060 3061 IssmDouble* times=NULL; … … 3099 3100 if (!thickness_input)_error_("thickness input needed to compute gia deflection!"); 3100 3101 thickness_input->GetInputAllTimeAverages(&hes,×,&numtimes); 3102 thickness_input->GetInputAverage(¤t_he); 3101 3103 3102 3104 /*recover lithosphere thickness: */ … … 3118 3120 /*start loading GiaDeflectionCore arguments: */ 3119 3121 arguments.re=re; 3122 arguments.current_he=current_he; 3120 3123 arguments.hes=hes; 3121 3124 arguments.times=times; … … 3129 3132 arguments.lithosphere_thickness=lithosphere_thickness; 3130 3133 arguments.rho_ice=rho_ice; 3134 arguments.idisk=this->id; 3131 3135 3132 3136 for(i=0;i<gsize;i++){ -
issm/trunk-jpl/src/c/modules/GiaDeflectionCorex/GiaDeflectionCorex.cpp
r14741 r14746 14 14 #include "../InputUpdateFromConstantx/InputUpdateFromConstantx.h" 15 15 16 #define Nrsl 1 17 #define N3G 1 18 #define Nafter 1 19 #define Ntime 2 20 #define Ntimp 3 21 22 /*External blocks: {{{*/ 23 struct blockp{ 24 double pset[7]; 25 }; 26 27 struct blockt{ 28 double time[Ntimp]; 29 double* time; 30 double bi[Ntime]; 31 double dmi[Ntime]; 32 }; 33 34 struct blocko{ 35 double rhoi; 36 double hload[Ntime]; 37 }; 38 39 struct blocky{ 40 double zhload[Ntime][N3G]; 41 }; 42 43 44 extern "C" { 45 int distme_( int* pidisk,int* piedge,int* pisolt); 46 extern struct blockp blockp_; 47 extern struct blockt blockt_; 48 extern struct blocko blocko_; 49 extern struct blocky blocky_; 50 } 51 /*}}}*/ 52 16 53 void GiaDeflectionCorex( IssmDouble* pwi, GiaDeflectionCoreArgs* arguments){ 17 54 18 55 /*output: */ 19 56 IssmDouble wi=1; 57 58 /*inputs: */ 59 int iedge=1; //c iedge ......... = 1 square-edged, = 2 elliptical disc x-section (see naruse.f) 60 int idisk=1; // disk # 61 int isolt=1002; 62 63 /*intermediary: */ 20 64 21 65 /*inputs: {{{*/ 22 66 IssmDouble ri; //radial distance from center of disk to vertex i 23 67 IssmDouble re; //radius of disk 68 IssmDouble current_he; //thickness at current time 24 69 IssmDouble* hes; //loading history (in ice thickness) 25 70 IssmDouble* times; //loading history times … … 37 82 /*ice properties: */ 38 83 IssmDouble rho_ice; 84 85 /*some debug info: */ 86 int disk_id; 39 87 /*}}}*/ 40 88 41 42 89 /*Recover material parameters and loading history: see GiaDeflectionCoreArgs for more details {{{*/ 43 90 ri=arguments->ri; 44 91 re=arguments->re; 92 current_he=arguments->current_he; 45 93 hes=arguments->hes; 46 94 times=arguments->times; … … 54 102 lithosphere_thickness=arguments->lithosphere_thickness; 55 103 rho_ice=arguments->rho_ice; 104 disk_id=arguments->idisk; 56 105 /*}}}*/ 106 107 /*Documentation for pset coming from naruse.f: 108 c pset(1) ....... h (thickness of elastic lithosphere in km) 109 c pset(2) ....... viscosity of sub-layer in Pa*s 110 c pset(3) ....... elastic rigidity of lithosphere in dynes/cm^2 111 c pset(4) ....... elastic rigidity of sub-lithosphere in dynes/cm^2 112 c pset(5) ....... density of lithosphere in gm/cc 113 c pset(6) ....... density of sub-lithosphere in gm/cc 114 c pset(7) ....... =dset(1) 115 c dset(1) ....... disk radius in km 116 117 Now, let's set pset from the data that we got in input to GiaDeflectionCorex: 118 */ 119 blockp_.pset[0]=lithosphere_thickness; 120 blockp_.pset[1]=mantle_viscosity; 121 blockp_.pset[2]=lithosphere_shear_modulus; 122 blockp_.pset[3]=mantle_shear_modulus; 123 blockp_.pset[4]=lithosphere_density; 124 blockp_.pset[5]=mantle_density; 125 blockp_.pset[6]=re; 126 blocko_.rhoi=rho_ice; 127 128 /*loading history: */ 129 blocky_.zhload[0][0]=current_he; 130 blocky_.zhload[1][0]=current_he; 131 132 /*times: */ 133 blockt_.time[0]=0.1; 134 blockt_.time[1]=2000; 135 blockt_.time[2]=1000; 136 137 138 /*Call distme driver: */ 139 distme_(&idisk,&iedge,&isolt); 140 141 //printf("disk id: %i bi: [%g,%g] dmi: [%g,%g] \n",disk_id,blockt_.bi[0], blockt_.bi[1],blockt_.dmi[0],blockt_.dmi[1]); 57 142 58 143 /*allocate output pointer: */ -
issm/trunk-jpl/test/NightlyRun/test2001.m
r14740 r14746 1 1 %GIA test, inspired on test101 2 md=triangle(model(),'../Exp/Square.exp', 50000.);2 md=triangle(model(),'../Exp/Square.exp',100000.); 3 3 md=setmask(md,'',''); 4 4 md=parameterize(md,'../Par/SquareSheetConstrained.par');
Note:
See TracChangeset
for help on using the changeset viewer.