Changeset 15643
- Timestamp:
- 07/27/13 14:25:22 (12 years ago)
- Location:
- issm/trunk-jpl/src
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.h
r15613 r15643 133 133 virtual void HydrologyEPLGetActive(Vector<IssmDouble>* active)=0; 134 134 #endif 135 135 136 136 #ifdef _HAVE_GROUNDINGLINE_ 137 137 virtual void MigrateGroundingLine(IssmDouble* old_floating_ice,IssmDouble* sheet_ungrounding)=0; -
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r15641 r15643 794 794 area_init=fabs(xyz_list[1][0]*xyz_list[2][1] - xyz_list[1][1]*xyz_list[2][0] + xyz_list[0][0]*xyz_list[1][1] - xyz_list[0][1]*xyz_list[1][0] + xyz_list[2][0]*xyz_list[0][1] - xyz_list[2][1]*xyz_list[0][0])/2.; 795 795 796 797 796 /*Initialize xyz_list with original xyz_list of triangle coordinates*/ 798 797 for(j=0;j<3;j++){ … … 2342 2341 /*Add input to the element: */ 2343 2342 this->inputs->AddInput(new PentaInput(name,values,P1Enum)); 2344 2343 2345 2344 /*Free ressources:*/ 2346 2345 xDelete<int>(doflist); 2347 2346 return; 2348 2347 2349 2348 default: 2350 2349 _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet"); … … 2422 2421 name==HydrologydcMaskEplactiveEnum || 2423 2422 name==WaterTransferEnum 2424 2423 2425 2424 ) { 2426 2425 return true; … … 7325 7324 /*Transform Coordinate System*/ 7326 7325 TransformStiffnessMatrixCoord(Ke,nodes,NUMVERTICES,XYZPEnum); 7327 7326 7328 7327 /*Clean up and return*/ 7329 7328 delete gauss; … … 8173 8172 _error_("Finite element" << fe_FS << " not supported yet"); 8174 8173 } 8175 8176 8174 8177 8175 /*clean-up and return*/ … … 9985 9983 9986 9984 if (!IsOnBed()) return; 9987 9985 9988 9986 Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria. 9989 9987 tria->GetHydrologyDCInefficientHmax(ph_max,innode); … … 9995 9993 9996 9994 if (!IsOnBed()) return; 9997 9995 9998 9996 Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria. 9999 9997 tria->GetHydrologyTransfer(transfer); … … 10036 10034 10037 10035 if (!IsOnBed())return; 10038 10036 10039 10037 Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria. 10040 10038 tria->HydrologyEPLGetActive(active_vec); … … 10047 10045 10048 10046 if (!IsOnBed())return; 10049 10047 10050 10048 Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria. 10051 10049 tria->HydrologyEPLGetMask(vec_mask); 10052 10050 delete tria->material; delete tria; 10053 10051 10054 10052 } 10055 10053 /*}}}*/ … … 10087 10085 this->parameters->FindParam(&kmax,HydrologySedimentKmaxEnum); 10088 10086 this->parameters->FindParam(&penalty_factor,HydrologydcPenaltyFactorEnum); 10089 10087 10090 10088 kappa=kmax*pow(10.,penalty_factor); 10091 10089 10092 10090 Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria. 10093 10091 for(int i=0;i<NUMVERTICES2D;i++){ -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r15625 r15643 168 168 void InputControlUpdate(IssmDouble scalar,bool save_parameter); 169 169 #endif 170 170 171 171 #ifdef _HAVE_GROUNDINGLINE_ 172 172 void MigrateGroundingLine(IssmDouble* old_floating_ice,IssmDouble* sheet_ungrounding); … … 316 316 317 317 #ifdef _HAVE_HYDROLOGY_ 318 318 319 319 ElementMatrix* CreateKMatrixHydrologyDCInefficient(void); 320 320 ElementMatrix* CreateKMatrixHydrologyDCEfficient(void); 321 321 ElementVector* CreatePVectorHydrologyDCInefficient(void); 322 322 ElementVector* CreatePVectorHydrologyDCEfficient(void); 323 323 324 324 void GetHydrologyDCInefficientHmax(IssmDouble* ph_max, Node* innode); 325 325 void GetHydrologyTransfer(Vector<IssmDouble>* transfer); -
issm/trunk-jpl/src/c/classes/Elements/PentaRef.cpp
r15642 r15643 1457 1457 } 1458 1458 1459 1460 1459 } 1461 1460 /*}}}*/ -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r15641 r15643 24 24 /*FUNCTION Tria::Tria(){{{*/ 25 25 Tria::Tria(){ 26 26 27 27 int i; 28 28 … … 3483 3483 xDelete<IssmDouble>(values); 3484 3484 xDelete<int>(doflist); 3485 3486 3485 3487 3486 } … … 4541 4540 pow(log((fabs(vx)+epsvel)/(fabs(vxobs)+epsvel)),2) + 4542 4541 pow(log((fabs(vy)+epsvel)/(fabs(vyobs)+epsvel)),2) ); 4543 4544 4542 4545 4543 /*Add to cost function*/ … … 5628 5626 /*FUNCTION Tria::AllActive{{{*/ 5629 5627 bool Tria::AllActive(void){ 5630 5628 5631 5629 /*Intermediaries*/ 5632 5630 const int numnodes = NUMVERTICES; 5633 5631 5634 5632 for(int i=0;i<numnodes;i++){ 5635 5633 if(!this->nodes[i]->IsActive()) return false; 5636 5634 } 5637 5635 5638 5636 return true; 5639 5637 } … … 5641 5639 /*FUNCTION Tria::AnyActive{{{*/ 5642 5640 bool Tria::AnyActive(void){ 5643 5641 5644 5642 /*Intermediaries*/ 5645 5643 const int numnodes = NUMVERTICES; 5646 5644 5647 5645 for(int i=0;i<numnodes;i++){ 5648 5646 if(this->nodes[i]->IsActive()) return true; 5649 5647 } 5650 5648 5651 5649 return false; 5652 5650 }/*}}}*/ … … 6096 6094 } 6097 6095 delete gauss; 6098 6096 6099 6097 /* Add residual if necessary*/ 6100 6098 gauss=new GaussTria(); … … 6113 6111 /*FUNCTION Tria::GetSolutionFromInputsOneDof{{{*/ 6114 6112 void Tria::GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution, int enum_type){ 6115 6113 6116 6114 const int numdof=NDOF1*NUMVERTICES; 6117 6115 … … 6200 6198 this->parameters->FindParam(&kmax,HydrologySedimentKmaxEnum); 6201 6199 this->parameters->FindParam(&penalty_factor,HydrologydcPenaltyFactorEnum); 6202 6200 6203 6201 kappa=kmax*pow(10.,penalty_factor); 6204 6202 6205 6203 for(int i=0;i<NUMVERTICES;i++){ 6206 6204 this->GetHydrologyDCInefficientHmax(&h_max,nodes[i]); … … 6272 6270 6273 6271 GetDofList(&doflist,NoneApproximationEnum,GsetEnum); 6274 6272 6275 6273 /*Get the flag to know if the efficient layer is present*/ 6276 6274 this->parameters->FindParam(&isefficientlayer,HydrologydcIsefficientlayerEnum); 6277 6275 6278 6276 if(isefficientlayer){ 6279 6277 /*Also get the flag to the transfer method*/ … … 6290 6288 GetInputListOnVertices(&sed_head[0],SedimentHeadEnum); 6291 6289 GetInputListOnVertices(&epl_head[0],EplHeadEnum); 6292 6290 6293 6291 this->parameters->FindParam(&leakage,HydrologydcLeakageFactorEnum); 6294 6292 6295 6293 sed_trans = matpar->GetSedimentTransmitivity(); 6296 6294 sed_thick = matpar->GetSedimentThickness(); 6297 6295 6298 6296 for(int i=0;i<numdof;i++){ 6299 6297 /*No transfer if the EPL is not active*/ … … 6304 6302 eplstoring[i]=matpar->GetEplStoring(); 6305 6303 sedstoring[i]=matpar->GetSedimentStoring(); 6306 6304 6307 6305 /*EPL head higher than sediment head, transfer from the epl to the sediment*/ 6308 6306 if(epl_head[i]>sed_head[i]){ 6309 6307 wh_trans=eplstoring[i]*sed_trans*(epl_head[i]-sed_head[i])/(leakage*sed_thick); 6310 6308 6311 6309 /*No transfer if the sediment head is allready at the maximum*/ 6312 6310 this->GetHydrologyDCInefficientHmax(&h_max,nodes[i]); … … 6337 6335 IssmDouble flag = 0.; 6338 6336 IssmDouble active[numnodes]; 6339 6337 6340 6338 GetInputListOnVertices(&active[0],HydrologydcMaskEplactiveEnum); 6341 6339 6342 6340 for(int i=0;i<numnodes;i++) flag+=active[i]; 6343 6341 6344 6342 if(flag>0.){ 6345 6343 for(int i=0;i<numnodes;i++){ … … 6350 6348 /*Do not do anything: at least one node is active for this element but this element is not solved for*/ 6351 6349 } 6352 6350 6353 6351 } 6354 6352 /*}}}*/ … … 6374 6372 sedheadmin=sedhead[0]; 6375 6373 for(i=1;i<numdof;i++) if(sedhead[i]<=sedheadmin)sedheadmin=sedhead[i]; 6376 6374 6377 6375 for(i=0;i<numdof;i++){ 6378 6376 /*Activate EPL if residual is >0 */ … … 6380 6378 vec_mask->SetValue(nodes[i]->Sid(),1.,INS_VAL); 6381 6379 } 6382 6380 6383 6381 /*If mask was alread one, keep one*/ 6384 6382 else if(old_active[i]>0.){ -
issm/trunk-jpl/src/c/classes/FemModel.cpp
r15559 r15643 345 345 _printf0_("Core solution number of flops : " << solution_flops << " Flops\n"); 346 346 _printf0_("Core solution memory used : " << solution_memory << " Bytes\n"); 347 347 348 348 /*Add to results: */ 349 349 results->AddObject(new GenericExternalResult<IssmDouble>(results->Size()+1, ProfilingSolutionTimeEnum, solution_time, 1, 0)); … … 359 359 _printf0_("AD Solution number of flops : " << solution_flops << " Flops\n"); 360 360 _printf0_("AD Solution memory used : " << solution_memory << " Bytes\n"); 361 362 361 363 362 #endif … … 884 883 element->CreateKMatrix(Kff,Kfs); 885 884 } 886 885 887 886 for (i=0;i<this->loads->Size();i++){ 888 887 load=dynamic_cast<Load*>(this->loads->GetObjectByOffset(i)); -
issm/trunk-jpl/src/c/classes/IndependentObject.cpp
r15322 r15643 181 181 iomodel->data[name]=matrix; 182 182 iomodel->independents[name]=true; 183 183 184 184 //Finally, record the number of independents created: 185 185 this->numberofindependents=M*N; -
issm/trunk-jpl/src/c/classes/Inputs/PentaInput.cpp
r15625 r15643 288 288 _assert_(this->NumberofNodes()==6); //Check Tria too 289 289 290 291 290 /*Here, we are computing the strain rate of (vx,0)*/ 292 291 for(i=0;i<numnodes;i++){ … … 313 312 GetBHO(&B[0][0], xyz_list, gauss); 314 313 _assert_(this->NumberofNodes()==6); //Check Tria too 315 316 314 317 315 /*Here, we are computing the strain rate of (0,vy)*/ -
issm/trunk-jpl/src/c/modules/InterpFromMeshToGridx/InterpFromMeshToGridx.cpp
r15557 r15643 62 62 if (yposting<0) yflip=1; 63 63 else yflip=0; 64 65 66 64 67 65 /*Get extreme coordinates of the grid*/ -
issm/trunk-jpl/src/c/modules/ModelProcessorx/HydrologyDCInefficient/CreateLoadsHydrologyDCInefficient.cpp
r15465 r15643 16 16 iomodel->Constant(&hydrology_model,HydrologyModelEnum); 17 17 if(hydrology_model!=HydrologydcEnum) return; 18 18 19 19 iomodel->FetchData(1,MeshVertexonbedEnum); 20 20 -
issm/trunk-jpl/src/c/modules/ModelProcessorx/NodesPartitioning.cpp
r15611 r15643 43 43 * continuous galerkin, but the nodes partitioning involves faces, which 44 44 * messes up sorting of ids. */ 45 46 45 47 46 /*Intermediaries*/ -
issm/trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp
r15412 r15643 19 19 Vector<IssmDouble>* uf_epl_sub_iter=NULL; 20 20 Vector<IssmDouble>* ug_epl_main_iter=NULL; 21 21 22 22 Vector<IssmDouble>* ys=NULL; 23 23 Vector<IssmDouble>* dug=NULL; 24 24 25 25 Matrix<IssmDouble>* Kff=NULL; 26 26 Matrix<IssmDouble>* Kfs=NULL; … … 51 51 //femmodel->SetCurrentConfiguration(HydrologyDCInefficientAnalysisEnum); 52 52 GetSolutionFromInputsx(&ug_sed, femmodel->elements, femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials, femmodel->parameters); 53 53 54 54 if(isefficientlayer) { 55 55 femmodel->SetCurrentConfiguration(HydrologyDCEfficientAnalysisEnum); … … 137 137 ConstraintsStatex(&constraints_converged,&num_unstable_constraints, femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters); 138 138 femmodel->HydrologyEPLupdateDomainx(); 139 139 140 140 if (!eplconverged){ 141 141 if(VerboseConvergence()) _printf0_(" # EPL unstable constraints = " << num_unstable_constraints << "\n"); … … 206 206 if(hydroconverged)break; 207 207 } 208 208 209 209 InputUpdateFromSolutionx(femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,ug_sed); 210 210 if(isefficientlayer)InputUpdateFromSolutionx(femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,ug_epl); -
issm/trunk-jpl/src/m/classes/model/model.m
r15614 r15643 1207 1207 eval(['delete ' id]); 1208 1208 1209 1210 1209 end % }}} 1211 1210 function md=download(md) % {{{ 1212 1211 1213 1212 %the goal of this routine is to download the internals of the current model from a server, because 1214 1213 %this model is empty, except for the settings which tell us where to go and find this model! 1215 1214 1216 1215 %Download the file: 1217 1216 issmscpin(md.settings.upload_server, md.settings.upload_login, md.settings.upload_port, md.settings.upload_path, {md.settings.upload_filename}); -
issm/trunk-jpl/src/m/classes/settings.m
r15316 r15643 46 46 %0 to deactivate 47 47 obj.waitonlock=Inf; 48 48 49 49 %upload options: 50 50 upload_port = 0; -
issm/trunk-jpl/src/m/coordsystems/lambert2xy.m
r15139 r15643 67 67 y=(B/D)*((cos(b0)*sin(b))-(sin(b0)*cos(b)*cos(lam-lam0))); 68 68 end 69 -
issm/trunk-jpl/src/m/coordsystems/xy2lambert.m
r15139 r15643 67 67 lon=lon_rad*180/pi; 68 68 end 69 -
issm/trunk-jpl/src/m/plot/plot_icefront.m
r15612 r15643 35 35 %Plot zero icelevelset line 36 36 37 38 37 else 39 38
Note:
See TracChangeset
for help on using the changeset viewer.