Changeset 14435
- Timestamp:
- 03/05/13 19:37:53 (12 years ago)
- Location:
- issm/trunk-jpl/src/c/classes
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/FemModel.cpp
r14194 r14435 826 826 for (i=0;i<this->elements->Size();i++){ 827 827 element=dynamic_cast<Element*>(this->elements->GetObjectByOffset(i)); 828 element->CreateKMatrix(Kff_temp,NULL ,NULL);828 element->CreateKMatrix(Kff_temp,NULL); 829 829 } 830 830 for (i=0;i<this->loads->Size();i++){ … … 845 845 for (i=0;i<this->elements->Size();i++){ 846 846 element=dynamic_cast<Element*>(this->elements->GetObjectByOffset(i)); 847 element->CreateKMatrix(Kff,Kfs ,df);847 element->CreateKMatrix(Kff,Kfs); 848 848 } 849 849 for (i=0;i<this->loads->Size();i++){ … … 872 872 if(load->InAnalysis(configuration_type)) load->PenaltyCreatePVector(pf,kmax); 873 873 } 874 } 875 876 /*Create dof vector for stiffness matrix preconditioning*/ 877 for (i=0;i<this->elements->Size();i++){ 878 element=dynamic_cast<Element*>(this->elements->GetObjectByOffset(i)); 879 element->CreateDVector(df); 874 880 } 875 881 -
issm/trunk-jpl/src/c/classes/matrix/ElementVector.cpp
r14434 r14435 190 190 IssmDouble* localvalues=NULL; 191 191 192 if(this->fsize && pf){192 if(this->fsize){ 193 193 /*first, retrieve values that are in the f-set from the g-set values vector: */ 194 194 localvalues=xNew<IssmDouble>(this->fsize); -
issm/trunk-jpl/src/c/classes/objects/Elements/Element.h
r14378 r14435 30 30 virtual void SetCurrentConfiguration(Elements* elements,Loads* loads,DataSet* nodes,Materials* materials,Parameters* parameters)=0; 31 31 virtual void SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int set1_enum,int set2_enum)=0; 32 virtual void CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs,Vector<IssmDouble>* df)=0; 32 virtual void CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs)=0; 33 virtual void CreateDVector(Vector<IssmDouble>* df)=0; 33 34 virtual void CreatePVector(Vector<IssmDouble>* pf)=0; 34 35 virtual void CreateJacobianMatrix(Matrix<IssmDouble>* Jff)=0; -
issm/trunk-jpl/src/c/classes/objects/Elements/Penta.cpp
r14378 r14435 405 405 /*}}}*/ 406 406 /*FUNCTION Penta::CreateKMatrix {{{*/ 407 void Penta::CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs ,Vector<IssmDouble>* df){407 void Penta::CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs){ 408 408 409 409 /*retrieve parameters: */ 410 410 ElementMatrix* Ke=NULL; 411 ElementVector* De=NULL;412 411 int analysis_type; 413 412 parameters->FindParam(&analysis_type,AnalysisTypeEnum); … … 424 423 #ifdef _HAVE_DIAGNOSTIC_ 425 424 case DiagnosticHorizAnalysisEnum: 426 Ke=CreateKMatrixDiagnosticHoriz(); De=CreateDVectorDiagnosticHoriz();425 Ke=CreateKMatrixDiagnosticHoriz(); 427 426 break; 428 427 case AdjointHorizAnalysisEnum: … … 467 466 delete Ke; 468 467 } 468 } 469 /*}}}*/ 470 /*FUNCTION Penta::CreateKMatrixPrognostic {{{*/ 471 ElementMatrix* Penta::CreateKMatrixPrognostic(void){ 472 473 if (!IsOnBed()) return NULL; 474 475 /*Depth Averaging Vx and Vy*/ 476 this->InputDepthAverageAtBase(VxEnum,VxAverageEnum); 477 this->InputDepthAverageAtBase(VyEnum,VyAverageEnum); 478 479 Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria. 480 ElementMatrix* Ke=tria->CreateKMatrixPrognostic(); 481 delete tria->material; delete tria; 482 483 /*Delete Vx and Vy averaged*/ 484 this->inputs->DeleteInput(VxAverageEnum); 485 this->inputs->DeleteInput(VyAverageEnum); 486 487 /*clean up and return*/ 488 return Ke; 489 } 490 /*}}}*/ 491 /*FUNCTION Penta::CreateBasalMassMatrix{{{*/ 492 ElementMatrix* Penta::CreateBasalMassMatrix(void){ 493 494 if (!IsOnBed()) return NULL; 495 496 Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria. 497 ElementMatrix* Ke=tria->CreateMassMatrix(); 498 delete tria->material; delete tria; 499 500 /*clean up and return*/ 501 return Ke; 502 } 503 /*}}}*/ 504 /*FUNCTION Penta::CreateDVector {{{*/ 505 void Penta::CreateDVector(Vector<IssmDouble>* df){ 506 507 /*retrieve parameters: */ 508 ElementMatrix* Ke=NULL; 509 ElementVector* De=NULL; 510 int analysis_type; 511 parameters->FindParam(&analysis_type,AnalysisTypeEnum); 512 513 /*Checks in debugging {{{*/ 514 _assert_(this->nodes && this->material && this->matpar && this->verticalneighbors && this->parameters && this->inputs); 515 /*}}}*/ 516 517 switch(analysis_type){ 518 #ifdef _HAVE_DIAGNOSTIC_ 519 case DiagnosticHorizAnalysisEnum: 520 De=CreateDVectorDiagnosticHoriz(); 521 break; 522 #endif 523 } 524 469 525 /*Add to global Vector*/ 470 526 if(De){ … … 472 528 delete De; 473 529 } 474 }475 /*}}}*/476 /*FUNCTION Penta::CreateKMatrixPrognostic {{{*/477 ElementMatrix* Penta::CreateKMatrixPrognostic(void){478 479 if (!IsOnBed()) return NULL;480 481 /*Depth Averaging Vx and Vy*/482 this->InputDepthAverageAtBase(VxEnum,VxAverageEnum);483 this->InputDepthAverageAtBase(VyEnum,VyAverageEnum);484 485 Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.486 ElementMatrix* Ke=tria->CreateKMatrixPrognostic();487 delete tria->material; delete tria;488 489 /*Delete Vx and Vy averaged*/490 this->inputs->DeleteInput(VxAverageEnum);491 this->inputs->DeleteInput(VyAverageEnum);492 493 /*clean up and return*/494 return Ke;495 }496 /*}}}*/497 /*FUNCTION Penta::CreateBasalMassMatrix{{{*/498 ElementMatrix* Penta::CreateBasalMassMatrix(void){499 500 if (!IsOnBed()) return NULL;501 502 Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.503 ElementMatrix* Ke=tria->CreateMassMatrix();504 delete tria->material; delete tria;505 506 /*clean up and return*/507 return Ke;508 530 } 509 531 /*}}}*/ -
issm/trunk-jpl/src/c/classes/objects/Elements/Penta.h
r14378 r14435 81 81 void SetCurrentConfiguration(Elements* elements,Loads* loads,DataSet* nodes,Materials* materials,Parameters* parameters); 82 82 void SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int set1_enum,int set2_enum); 83 void CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs,Vector<IssmDouble>* df); 83 void CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs); 84 void CreateDVector(Vector<IssmDouble>* df); 84 85 void CreatePVector(Vector<IssmDouble>* pf); 85 86 void CreateJacobianMatrix(Matrix<IssmDouble>* Jff); -
issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp
r14423 r14435 214 214 /*}}}*/ 215 215 /*FUNCTION Tria::CreateKMatrix {{{*/ 216 void Tria::CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs ,Vector<IssmDouble>* df){216 void Tria::CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs){ 217 217 218 218 /*retreive parameters: */ … … 561 561 delete gauss; 562 562 return Ke; 563 } 564 /*}}}*/ 565 /*FUNCTION Tria::CreateDVector {{{*/ 566 void Tria::CreateDVector(Vector<IssmDouble>* df){ 567 568 /*Nothing done yet*/ 563 569 } 564 570 /*}}}*/ -
issm/trunk-jpl/src/c/classes/objects/Elements/Tria.h
r14378 r14435 77 77 void SetCurrentConfiguration(Elements* elements,Loads* loads,DataSet* nodes,Materials* materials,Parameters* parameters); 78 78 void SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int set1_enum,int set2_enum); 79 void CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs,Vector<IssmDouble>* df); 79 void CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs); 80 void CreateDVector(Vector<IssmDouble>* df); 80 81 void CreatePVector(Vector<IssmDouble>* pf); 81 82 void CreateJacobianMatrix(Matrix<IssmDouble>* Jff);
Note:
See TracChangeset
for help on using the changeset viewer.