Changeset 15738
- Timestamp:
- 08/07/13 10:05:25 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r15737 r15738 500 500 this->InputDepthAverageAtBase(VyEnum,VyAverageEnum); 501 501 502 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.502 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 503 503 ElementMatrix* Ke=tria->CreateKMatrixPrognostic(); 504 504 delete tria->material; delete tria; … … 517 517 if (!IsOnBed()) return NULL; 518 518 519 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.519 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 520 520 ElementMatrix* Ke=tria->CreateMassMatrix(); 521 521 delete tria->material; delete tria; … … 675 675 676 676 /*Call Tria function*/ 677 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.677 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 678 678 ElementVector* pe=tria->CreatePVectorPrognostic(); 679 679 delete tria->material; delete tria; … … 693 693 694 694 /*Call Tria function*/ 695 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.695 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 696 696 ElementVector* pe=tria->CreatePVectorSlope(); 697 697 delete tria->material; delete tria; … … 3159 3159 /*This element should be collapsed into a tria element at its base. Create this tria element, 3160 3160 * and compute SurfaceArea*/ 3161 tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria (lower face).3161 tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 3162 3162 S=tria->SurfaceArea(); 3163 3163 delete tria->material; delete tria; … … 3166 3166 else{ 3167 3167 3168 tria=(Tria*)SpawnTria(1); // nodes 3, 4 and 5 make the new tria (upper face).3168 tria=(Tria*)SpawnTria(1); //lower face is 0, upper face is 1. 3169 3169 S=tria->SurfaceArea(); 3170 3170 delete tria->material; delete tria; … … 3655 3655 3656 3656 /*Spawn Tria element from the base of the Penta: */ 3657 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.3657 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 3658 3658 mass_flux=tria->MassFlux(segment); 3659 3659 delete tria->material; delete tria; … … 4038 4038 if (!IsOnBed()) return NULL; 4039 4039 4040 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.4040 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 4041 4041 ElementMatrix* Ke=tria->CreateKMatrixMelting(); 4042 4042 … … 5079 5079 5080 5080 /*Call Tria function*/ 5081 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.5081 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 5082 5082 ElementMatrix* Ke=tria->CreateKMatrixAdjointSSA(); 5083 5083 delete tria->material; delete tria; … … 5262 5262 5263 5263 /*Call Tria function*/ 5264 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.5264 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 5265 5265 ElementVector* pe=tria->CreatePVectorAdjointHoriz(); 5266 5266 delete tria->material; delete tria; … … 5749 5749 case DragCoefficientAbsGradientEnum: 5750 5750 if(IsOnBed()){ 5751 tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.5751 tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 5752 5752 tria->GradjDragGradient(gradient,resp,control_index); 5753 5753 delete tria->material; delete tria; … … 5756 5756 case RheologyBbarAbsGradientEnum: 5757 5757 if(IsOnBed()){ 5758 tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.5758 tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 5759 5759 tria->GradjBGradient(gradient,resp,control_index); 5760 5760 delete tria->material; delete tria; … … 5774 5774 5775 5775 /*Spawn tria*/ 5776 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.5776 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 5777 5777 tria->GradjDragSSA(gradient,control_index); 5778 5778 delete tria->material; delete tria; … … 5952 5952 5953 5953 /*Collapse element to the base*/ 5954 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria (lower face).5954 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 5955 5955 tria->GradjBSSA(gradient,control_index); 5956 5956 delete tria->material; delete tria; … … 6162 6162 /*This element should be collapsed into a tria element at its base. Create this tria element, 6163 6163 * and compute SurfaceAverageVelMisfit*/ 6164 tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria (lower face).6164 tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 6165 6165 J=tria->SurfaceAverageVelMisfit(weight_index); 6166 6166 delete tria->material; delete tria; … … 6169 6169 else{ 6170 6170 6171 tria=(Tria*)SpawnTria(1); // nodes 3, 4 and 5 make the new tria (upper face).6171 tria=(Tria*)SpawnTria(1); //lower face is 0, upper face is 1. 6172 6172 J=tria->SurfaceAverageVelMisfit(weight_index); 6173 6173 delete tria->material; delete tria; … … 6199 6199 /*This element should be collapsed into a tria element at its base. Create this tria element, 6200 6200 * and compute SurfaceAbsVelMisfit*/ 6201 tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria (lower face).6201 tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 6202 6202 J=tria->SurfaceAbsVelMisfit(weight_index); 6203 6203 delete tria->material; delete tria; … … 6206 6206 else{ 6207 6207 6208 tria=(Tria*)SpawnTria(1); // nodes 3, 4 and 5 make the new tria (upper face).6208 tria=(Tria*)SpawnTria(1); //lower face is 0, upper face is 1. 6209 6209 J=tria->SurfaceAbsVelMisfit(weight_index); 6210 6210 delete tria->material; delete tria; … … 6236 6236 /*This element should be collapsed into a tria element at its base. Create this tria element, 6237 6237 * and compute SurfaceLogVelMisfit*/ 6238 tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria (lower face).6238 tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 6239 6239 J=tria->SurfaceLogVelMisfit(weight_index); 6240 6240 delete tria->material; delete tria; … … 6243 6243 else{ 6244 6244 6245 tria=(Tria*)SpawnTria(1); // nodes 3, 4 and 5 make the new tria (upper face).6245 tria=(Tria*)SpawnTria(1); //lower face is 0, upper face is 1. 6246 6246 J=tria->SurfaceLogVelMisfit(weight_index); 6247 6247 delete tria->material; delete tria; … … 6275 6275 /*This element should be collapsed into a tria element at its base. Create this tria element, 6276 6276 * and compute SurfaceLogVxVyMisfit*/ 6277 tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria (lower face).6277 tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 6278 6278 J=tria->SurfaceLogVxVyMisfit(weight_index); 6279 6279 delete tria->material; delete tria; … … 6282 6282 else{ 6283 6283 6284 tria=(Tria*)SpawnTria(1); // nodes 3, 4 and 5 make the new tria (upper face).6284 tria=(Tria*)SpawnTria(1); //lower face is 0, upper face is 1. 6285 6285 J=tria->SurfaceLogVxVyMisfit(weight_index); 6286 6286 delete tria->material; delete tria; … … 6312 6312 /*This element should be collapsed into a tria element at its base. Create this tria element, 6313 6313 * and compute SurfaceRelVelMisfit*/ 6314 tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria (lower face).6314 tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 6315 6315 J=tria->SurfaceRelVelMisfit(weight_index); 6316 6316 delete tria->material; delete tria; … … 6319 6319 else{ 6320 6320 6321 tria=(Tria*)SpawnTria(1); // nodes 3, 4 and 5 make the new tria (upper face).6321 tria=(Tria*)SpawnTria(1); //lower face is 0, upper face is 1. 6322 6322 J=tria->SurfaceRelVelMisfit(weight_index); 6323 6323 delete tria->material; delete tria; … … 6361 6361 if(IsOnWater()|| IsFloating() || !IsOnBed()) return 0; 6362 6362 6363 tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria6363 tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1 6364 6364 J=tria->DragCoefficientAbsGradient(weight_index); 6365 6365 delete tria->material; delete tria; … … 6376 6376 if(IsOnWater() || !IsOnBed()) return 0; 6377 6377 6378 tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria6378 tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1 6379 6379 J=tria->RheologyBbarAbsGradient(weight_index); 6380 6380 delete tria->material; delete tria; … … 6680 6680 /*Find penta on bed as HO must be coupled to the dofs on the bed: */ 6681 6681 Penta* pentabase=GetBasalElement(); 6682 Tria* tria=pentabase->SpawnTria(0); // nodes 0, 1 and 2 make the new tria.6682 Tria* tria=pentabase->SpawnTria(0); //lower face is 0, upper face is 1. 6683 6683 6684 6684 /*Prepare node list*/ … … 6877 6877 /*Find penta on bed as FS must be coupled to the dofs on the bed: */ 6878 6878 Penta* pentabase=GetBasalElement(); 6879 Tria* tria=pentabase->SpawnTria(0); // nodes 0, 1 and 2 make the new tria.6879 Tria* tria=pentabase->SpawnTria(0); //lower face is 0, upper face is 1. 6880 6880 6881 6881 /*Prepare node list*/ … … 7234 7234 7235 7235 /*Call Tria function*/ 7236 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.7236 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 7237 7237 ElementMatrix* Ke=tria->CreateKMatrixDiagnosticSSA(); 7238 7238 delete tria->material; delete tria; … … 7285 7285 /*Find penta on bed as this is a SSA elements: */ 7286 7286 pentabase=GetBasalElement(); 7287 tria=pentabase->SpawnTria(0); // nodes 0, 1 and 2 make the new tria.7287 tria=pentabase->SpawnTria(0); //lower face is 0, upper face is 1. 7288 7288 7289 7289 /*Initialize Element matrix*/ … … 7357 7357 * the tria functionality to build a friction stiffness matrix on these 3 7358 7358 * nodes: */ 7359 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.7359 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 7360 7360 ElementMatrix* Ke=tria->CreateKMatrixDiagnosticSSAFriction(); 7361 7361 delete tria->material; delete tria; … … 7433 7433 /*Find penta on bed as this is a SSA elements: */ 7434 7434 pentabase=GetBasalElement(); 7435 tria=pentabase->SpawnTria(0); // nodes 0, 1 and 2 make the new tria.7435 tria=pentabase->SpawnTria(0); //lower face is 0, upper face is 1. 7436 7436 7437 7437 /*Initialize Element matrix*/ … … 7488 7488 * the tria functionality to build a friction stiffness matrix on these 3 7489 7489 * nodes: */ 7490 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.7490 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 7491 7491 ElementMatrix* Ke=tria->CreateKMatrixDiagnosticSSAFriction(); 7492 7492 delete tria->material; delete tria; … … 8515 8515 8516 8516 /*Call Tria function*/ 8517 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.8517 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 8518 8518 ElementVector* pe=tria->CreatePVectorDiagnosticSSA(); 8519 8519 delete tria->material; delete tria; … … 8529 8529 8530 8530 /*Call Tria function*/ 8531 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.8531 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 8532 8532 ElementVector* pe=tria->CreatePVectorDiagnosticSSA(); 8533 8533 delete tria->material; delete tria; … … 9214 9214 9215 9215 /*Call Tria function*/ 9216 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.9216 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 9217 9217 ElementMatrix* Ke=tria->CreateJacobianDiagnosticSSA(); 9218 9218 delete tria->material; delete tria; … … 10446 10446 10447 10447 /*Spawn Tria element from the base of the Penta: */ 10448 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.10448 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 10449 10449 ElementMatrix* Ke=tria->CreateKMatrixBalancethickness(); 10450 10450 delete tria->material; delete tria; … … 10468 10468 10469 10469 /*Call Tria function*/ 10470 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.10470 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 10471 10471 ElementVector* pe=tria->CreatePVectorBalancethickness(); 10472 10472 delete tria->material; delete tria; … … 10488 10488 if (!IsOnBed()) return NULL; 10489 10489 10490 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.10490 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 10491 10491 ElementMatrix* Ke=tria->CreateKMatrixHydrologyDCInefficient(); 10492 10492 delete tria->material; delete tria; … … 10501 10501 if (!IsOnBed()) return NULL; 10502 10502 10503 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.10503 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 10504 10504 ElementMatrix* Ke=tria->CreateKMatrixHydrologyDCEfficient(); 10505 10505 delete tria->material; delete tria; … … 10515 10515 10516 10516 /*Call Tria function*/ 10517 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.10517 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 10518 10518 ElementVector* pe=tria->CreatePVectorHydrologyDCInefficient(); 10519 10519 delete tria->material; delete tria; … … 10529 10529 10530 10530 /*Call Tria function*/ 10531 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.10531 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 10532 10532 ElementVector* pe=tria->CreatePVectorHydrologyDCEfficient(); 10533 10533 delete tria->material; delete tria; … … 10542 10542 if (!IsOnBed()) return; 10543 10543 10544 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.10544 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 10545 10545 tria->GetHydrologyDCInefficientHmax(ph_max,innode); 10546 10546 delete tria->material; delete tria; … … 10552 10552 if (!IsOnBed()) return; 10553 10553 10554 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.10554 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 10555 10555 tria->GetHydrologyTransfer(transfer); 10556 10556 delete tria->material; delete tria; … … 10593 10593 if (!IsOnBed())return; 10594 10594 10595 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.10595 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 10596 10596 tria->HydrologyEPLGetActive(active_vec); 10597 10597 delete tria->material; delete tria; … … 10604 10604 if (!IsOnBed())return; 10605 10605 10606 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.10606 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 10607 10607 tria->HydrologyEPLGetMask(vec_mask); 10608 10608 delete tria->material; delete tria; … … 10646 10646 kappa=kmax*pow(10.,penalty_factor); 10647 10647 10648 Tria* tria=(Tria*)SpawnTria(0); // nodes 0, 1 and 2 make the new tria.10648 Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1. 10649 10649 for(int i=0;i<NUMVERTICES2D;i++){ 10650 10650 tria->GetHydrologyDCInefficientHmax(&h_max,nodes[i]);
Note:
See TracChangeset
for help on using the changeset viewer.