Changeset 13092
- Timestamp:
- 08/20/12 10:51:05 (13 years ago)
- Location:
- issm/trunk-jpl/src/c/classes/objects/Elements
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/objects/Elements/Penta.cpp
r13073 r13092 442 442 #endif 443 443 case BedSlopeXAnalysisEnum: case SurfaceSlopeXAnalysisEnum: case BedSlopeYAnalysisEnum: case SurfaceSlopeYAnalysisEnum: 444 Ke=Create KMatrixSlope();444 Ke=CreateBasalMassMatrix(); 445 445 break; 446 446 case PrognosticAnalysisEnum: … … 500 500 } 501 501 /*}}}*/ 502 /*FUNCTION Penta::Create KMatrixSlope{{{*/503 ElementMatrix* Penta::Create KMatrixSlope(void){502 /*FUNCTION Penta::CreateBasalMassMatrix{{{*/ 503 ElementMatrix* Penta::CreateBasalMassMatrix(void){ 504 504 505 505 if (!IsOnBed()) return NULL; 506 506 507 507 Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria. 508 ElementMatrix* Ke=tria->Create KMatrixSlope();508 ElementMatrix* Ke=tria->CreateMassMatrix(); 509 509 delete tria->matice; delete tria; 510 510 -
issm/trunk-jpl/src/c/classes/objects/Elements/Penta.h
r13051 r13092 169 169 /*Penta specific routines:{{{*/ 170 170 void BedNormal(IssmDouble* bed_normal, IssmDouble xyz_list[3][3]); 171 ElementMatrix* CreateBasalMassMatrix(void); 171 172 ElementMatrix* CreateKMatrixPrognostic(void); 172 ElementMatrix* CreateKMatrixSlope(void);173 173 ElementVector* CreatePVectorPrognostic(void); 174 174 ElementVector* CreatePVectorSlope(void); -
issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp
r13081 r13092 193 193 #endif 194 194 case BedSlopeXAnalysisEnum: case SurfaceSlopeXAnalysisEnum: case BedSlopeYAnalysisEnum: case SurfaceSlopeYAnalysisEnum: 195 Ke=Create KMatrixSlope();195 Ke=CreateMassMatrix(); 196 196 break; 197 197 case PrognosticAnalysisEnum: … … 477 477 } 478 478 /*}}}*/ 479 /*FUNCTION Tria::Create KMatrixSlope{{{*/480 ElementMatrix* Tria::Create KMatrixSlope(void){479 /*FUNCTION Tria::CreateMassMatrix {{{*/ 480 ElementMatrix* Tria::CreateMassMatrix(void){ 481 481 482 482 /*constants: */ … … 484 484 485 485 /* Intermediaries */ 486 int i,j,ig; 487 IssmDouble DL_scalar,Jdet; 488 IssmDouble xyz_list[NUMVERTICES][3]; 489 IssmDouble L[1][3]; 490 GaussTria *gauss = NULL; 486 IssmDouble D,Jdet; 487 IssmDouble xyz_list[NUMVERTICES][3]; 488 IssmDouble L[1][3]; 489 GaussTria *gauss = NULL; 491 490 492 491 /*Initialize Element matrix*/ 493 492 ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum); 494 495 493 GetVerticesCoordinates(&xyz_list[0][0],nodes,NUMVERTICES); 496 494 497 495 /* Start looping on the number of gaussian points: */ 498 496 gauss=new GaussTria(2); 499 for (ig=gauss->begin();ig<gauss->end();ig++){497 for(int ig=gauss->begin();ig<gauss->end();ig++){ 500 498 501 499 gauss->GaussPoint(ig); 502 500 503 501 GetJacobianDeterminant2d(&Jdet, &xyz_list[0][0],gauss); 504 D L_scalar=gauss->weight*Jdet;502 D=gauss->weight*Jdet; 505 503 506 504 GetL(&L[0][0], &xyz_list[0][0], gauss,NDOF1); 507 505 508 506 TripleMultiply(&L[0][0],1,3,1, 509 &D L_scalar,1,1,0,507 &D,1,1,0, 510 508 &L[0][0],1,3,0, 511 509 &Ke->values[0],1); -
issm/trunk-jpl/src/c/classes/objects/Elements/Tria.h
r13036 r13092 177 177 ElementMatrix* CreateKMatrixPrognostic_CG(void); 178 178 ElementMatrix* CreateKMatrixPrognostic_DG(void); 179 ElementMatrix* Create KMatrixSlope(void);179 ElementMatrix* CreateMassMatrix(void); 180 180 ElementVector* CreatePVectorBalancethickness(void); 181 181 ElementVector* CreatePVectorBalancethickness_DG(void);
Note:
See TracChangeset
for help on using the changeset viewer.