Changeset 27798
- Timestamp:
- 06/22/23 12:29:24 (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r27797 r27798 1128 1128 int dim, domaintype; 1129 1129 IssmDouble vx, vy, vel, c, wrate; 1130 IssmDouble time, groundedice; 1130 1131 1131 1132 /*Get problem dimension and whether there is moving front or not*/ 1132 1133 this->FindParam(&domaintype,DomainTypeEnum); 1134 this->FindParam(&time,TimeEnum); 1133 1135 1134 1136 switch(domaintype){ … … 1144 1146 Input *vy_input = this->GetInput(VyEnum); _assert_(vy_input); 1145 1147 Input *wrate_input = this->GetInput(CalvingAblationrateEnum); _assert_(wrate_input); 1148 Input* gr_input = this->GetInput(MaskOceanLevelsetEnum); _assert_(gr_input); 1146 1149 1147 1150 /* Use which experiment: use existing Enum */ … … 1149 1152 1150 1153 /* Start looping on the number of vertices: */ 1151 GaussTria * gauss=new GaussTria();1154 GaussTria gauss; 1152 1155 for(int iv=0;iv<NUMVERTICES;iv++){ 1153 gauss ->GaussVertex(iv);1156 gauss.GaussVertex(iv); 1154 1157 1155 1158 /*Get velocity components */ 1156 vx_input->GetInputValue(&vx, gauss);1157 vy_input->GetInputValue(&vy, gauss);1159 vx_input->GetInputValue(&vx,&gauss); 1160 vy_input->GetInputValue(&vy,&gauss); 1158 1161 vel=sqrt(vx*vx+vy*vy)+1.e-14; 1159 1162 1163 /* no calving for grounded ice in EXP4 */ 1164 gr_input->GetInputValue(&groundedice,&gauss); 1160 1165 1161 1166 switch (experiment) { … … 1166 1171 break; 1167 1172 case 2: 1173 /* Exp 2: set c=v-wrate(given)*/ 1174 wrate_input->GetInputValue(&wrate,&gauss); 1175 break; 1168 1176 case 4: 1169 /* Exp 2 and 4: set c=v-wrate(given)*/ 1170 /*Get wrate*/ 1171 wrate_input->GetInputValue(&wrate,gauss); 1172 break; 1173 case 0: 1174 /* This is for second half of Exp 2 and 4: to set c=0*/ 1175 wrate = vel; 1177 /* Exp 4: set c=v-wrate(given), for the first 500 years, then c=0 for the second 500 years*/ 1178 if((groundedice<0) && (time<=500.0)) { 1179 wrate_input->GetInputValue(&wrate,&gauss); 1180 } 1181 else { 1182 /* no calving on the grounded ice*/ 1183 wrate = vel; 1184 } 1176 1185 break; 1177 1186 default: … … 1187 1196 this->AddInput(CalvingratexEnum,&calvingratex[0],P1DGEnum); 1188 1197 this->AddInput(CalvingrateyEnum,&calvingratey[0],P1DGEnum); 1189 1190 /*Clean up and return*/1191 delete gauss;1192 1198 } 1193 1199 /*}}}*/
Note:
See TracChangeset
for help on using the changeset viewer.