Changeset 16800
- Timestamp:
- 11/16/13 08:58:30 (11 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp
r16799 r16800 881 881 }/*}}}*/ 882 882 ElementVector* StressbalanceAnalysis::CreatePVectorSSAFront(Element* element){/*{{{*/ 883 883 return NULL; 884 884 }/*}}}*/ 885 885 void StressbalanceAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/ -
issm/trunk-jpl/src/c/classes/Elements/Element.h
r16799 r16800 43 43 virtual void AddInput(int input_enum, IssmDouble* values, int interpolation_enum)=0; 44 44 virtual void AddMaterialInput(int input_enum, IssmDouble* values, int interpolation_enum)=0; 45 virtual void CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs)=0;46 45 virtual ElementMatrix* CreateKMatrix(void)=0; 47 46 virtual void CreateDVector(Vector<IssmDouble>* df)=0; 48 virtual void CreatePVector(Vector<IssmDouble>* pf)=0;49 47 virtual ElementVector* CreatePVector(void)=0; 50 48 virtual void CreateJacobianMatrix(Matrix<IssmDouble>* Jff)=0; -
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r16799 r16800 414 414 /*get inputs configured too: */ 415 415 this->inputs->Configure(parameters); 416 }417 /*}}}*/418 /*FUNCTION Penta::CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs) {{{*/419 void Penta::CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs){420 421 /*Skip if water element*/422 if(NoIceInElement()) return;423 424 /*Create element stiffness matrix*/425 ElementMatrix* Ke=CreateKMatrix();426 427 if(Ke){428 int analysis_type;429 parameters->FindParam(&analysis_type,AnalysisTypeEnum);430 if(analysis_type==StressbalanceAnalysisEnum){431 int approximation;432 inputs->GetInputValue(&approximation,ApproximationEnum);433 if(approximation==HOFSApproximationEnum || approximation==SSAFSApproximationEnum){434 //Do nothing condensatino already done for Stokes part435 }436 else{437 /*Condense if requested*/438 if(this->element_type==MINIcondensedEnum){439 int indices[3]={18,19,20};440 Ke->StaticCondensation(3,&indices[0]);441 }442 else if(this->element_type==P1bubblecondensedEnum){443 int size = nodes[6]->GetNumberOfDofs(NoneApproximationEnum,GsetEnum);444 int offset = 0;445 for(int i=0;i<6;i++) offset+=nodes[i]->GetNumberOfDofs(NoneApproximationEnum,GsetEnum);446 int* indices=xNew<int>(size);447 for(int i=0;i<size;i++) indices[i] = offset+i;448 Ke->StaticCondensation(size,indices);449 xDelete<int>(indices);450 }451 }452 }453 454 /*Add to global matrix*/455 Ke->AddToGlobal(Kff,Kfs);456 delete Ke;457 }458 416 } 459 417 /*}}}*/ … … 618 576 De->InsertIntoGlobal(df); 619 577 delete De; 620 }621 }622 /*}}}*/623 /*FUNCTION Penta::CreatePVector(Vector<IssmDouble>* pf) {{{*/624 void Penta::CreatePVector(Vector<IssmDouble>* pf){625 626 /*Skip if water element*/627 if(NoIceInElement()) return;628 629 /*Create element load vector*/630 ElementVector* pe = CreatePVector();631 632 if(pe){633 int analysis_type;634 parameters->FindParam(&analysis_type,AnalysisTypeEnum);635 if(analysis_type==StressbalanceAnalysisEnum){636 /*StaticCondensation if requested*/637 if(this->element_type==MINIcondensedEnum){638 int approximation;639 inputs->GetInputValue(&approximation,ApproximationEnum);640 if(approximation==HOFSApproximationEnum || approximation==SSAFSApproximationEnum){641 //Do nothing, condensation already done in PVectorCoupling642 }643 else{644 int indices[3]={18,19,20};645 646 this->element_type=MINIEnum;647 ElementMatrix* Ke = CreateKMatrixStressbalanceFS();648 this->element_type=MINIcondensedEnum;649 650 pe->StaticCondensation(Ke,3,&indices[0]);651 delete Ke;652 }653 }654 else if(this->element_type==P1bubblecondensedEnum){655 int size = nodes[6]->GetNumberOfDofs(NoneApproximationEnum,GsetEnum);656 int offset = 0;657 for(int i=0;i<6;i++) offset+=nodes[i]->GetNumberOfDofs(NoneApproximationEnum,GsetEnum);658 int* indices=xNew<int>(size);659 for(int i=0;i<size;i++) indices[i] = offset+i;660 661 this->element_type=P1bubbleEnum;662 ElementMatrix* Ke = CreateKMatrix();663 this->element_type=P1bubblecondensedEnum;664 pe->StaticCondensation(Ke,size,indices);665 xDelete<int>(indices);666 delete Ke;667 }668 }669 670 /*Add to global Vector*/671 pe->AddToGlobal(pf);672 delete pe;673 578 } 674 579 } … … 2667 2572 } 2668 2573 /*}}}*/ 2669 /*FUNCTION Penta::ReduceMatrices ){{{*/2574 /*FUNCTION Penta::ReduceMatrices{{{*/ 2670 2575 void Penta::ReduceMatrices(ElementMatrix* Ke,ElementVector* pe){ 2671 2576 -
issm/trunk-jpl/src/c/classes/Elements/Penta.h
r16799 r16800 79 79 void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters); 80 80 void SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum); 81 void CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs);82 81 void CreateDVector(Vector<IssmDouble>* df); 83 void CreatePVector(Vector<IssmDouble>* pf);84 82 void CreateJacobianMatrix(Matrix<IssmDouble>* Jff); 85 83 void Delta18oParameterization(void); -
issm/trunk-jpl/src/c/classes/Elements/Seg.h
r16799 r16800 77 77 void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters){_error_("not implemented yet");}; 78 78 void SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum){_error_("not implemented yet");}; 79 void CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs){_error_("not implemented yet");};80 79 ElementMatrix* CreateKMatrix(void){_error_("not implemented yet");}; 81 80 void CreateDVector(Vector<IssmDouble>* df){_error_("not implemented yet");}; 82 void CreatePVector(Vector<IssmDouble>* pf){_error_("not implemented yet");};83 81 ElementVector* CreatePVector(void){_error_("not implemented yet");}; 84 82 ElementVector* CreatePVectorL2Projection(void); -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r16799 r16800 196 196 _assert_(this->material); 197 197 this->material->inputs->AddInput(new TriaInput(input_enum,values,interpolation_enum)); 198 }199 /*}}}*/200 /*FUNCTION Tria::CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs) {{{*/201 void Tria::CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs){202 203 204 /*Skip if water element*/205 if(NoIceInElement()) return;206 207 /*Create element stiffness matrix*/208 ElementMatrix* Ke=CreateKMatrix();209 210 if(Ke){211 /*Static condensation if requested*/212 if(this->element_type==MINIcondensedEnum){213 int indices[2]={6,7};214 Ke->StaticCondensation(2,&indices[0]);215 }216 else if(this->element_type==P1bubblecondensedEnum){217 int size = nodes[3]->GetNumberOfDofs(NoneApproximationEnum,GsetEnum);218 int offset = 0;219 for(int i=0;i<3;i++) offset+=nodes[i]->GetNumberOfDofs(NoneApproximationEnum,GsetEnum);220 int* indices=xNew<int>(size);221 for(int i=0;i<size;i++) indices[i] = offset+i;222 Ke->StaticCondensation(size,indices);223 xDelete<int>(indices);224 }225 226 /*Add to global matrix*/227 Ke->AddToGlobal(Kff,Kfs);228 delete Ke;229 }230 198 } 231 199 /*}}}*/ … … 411 379 412 380 /*Nothing done yet*/ 413 }414 /*}}}*/415 /*FUNCTION Tria::CreatePVector(Vector<IssmDouble>* pf) {{{*/416 void Tria::CreatePVector(Vector<IssmDouble>* pf){417 418 /*Skip if water element*/419 if(NoIceInElement()) return;420 421 /*Create element load vector*/422 ElementVector* pe = CreatePVector();423 424 /*Add to global Vector*/425 if(pe){426 /*Static condensation if requested*/427 if(this->element_type==MINIcondensedEnum){428 int indices[2]={6,7};429 this->element_type=MINIEnum;430 ElementMatrix* Ke = CreateKMatrixStressbalanceFS();431 this->element_type=MINIcondensedEnum;432 433 pe->StaticCondensation(Ke,2,&indices[0]);434 delete Ke;435 }436 else if(this->element_type==P1bubblecondensedEnum){437 int size = nodes[3]->GetNumberOfDofs(NoneApproximationEnum,GsetEnum);438 int offset = 0;439 for(int i=0;i<3;i++) offset+=nodes[i]->GetNumberOfDofs(NoneApproximationEnum,GsetEnum);440 int* indices=xNew<int>(size);441 for(int i=0;i<size;i++) indices[i] = offset+i;442 443 this->element_type=P1bubbleEnum;444 ElementMatrix* Ke = CreateKMatrix();445 this->element_type=P1bubblecondensedEnum;446 447 pe->StaticCondensation(Ke,size,indices);448 xDelete<int>(indices);449 delete Ke;450 }451 452 pe->AddToGlobal(pf);453 delete pe;454 }455 381 } 456 382 /*}}}*/ … … 1226 1152 } 1227 1153 /*}}}*/ 1154 /*FUNCTION Tria::GetVerticesCoordinates(IssmDouble** pxyz_list){{{*/ 1155 void Tria::GetVerticesCoordinates(IssmDouble** pxyz_list){ 1156 1157 IssmDouble* xyz_list = xNew<IssmDouble>(NUMVERTICES*3); 1158 ::GetVerticesCoordinates(xyz_list,this->vertices,NUMVERTICES); 1159 1160 /*Assign output pointer*/ 1161 *pxyz_list = xyz_list; 1162 1163 }/*}}}*/ 1228 1164 /*FUNCTION Tria::GetSegmentNormal {{{*/ 1229 1165 void Tria:: GetSegmentNormal(IssmDouble* normal,IssmDouble xyz_list[2][3]){ -
issm/trunk-jpl/src/c/classes/Elements/Tria.h
r16799 r16800 73 73 void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters); 74 74 void SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum); 75 void CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs);76 75 void CreateDVector(Vector<IssmDouble>* df); 77 void CreatePVector(Vector<IssmDouble>* pf);78 76 void CreateJacobianMatrix(Matrix<IssmDouble>* Jff); 79 77 void DeleteMaterials(void); … … 111 109 void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type); 112 110 void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum); 113 void GetVerticesCoordinates(IssmDouble** pxyz_list) {_error_("not implemented yet");};111 void GetVerticesCoordinates(IssmDouble** pxyz_list); 114 112 void InputCreate(IssmDouble* vector,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code); 115 113 void InputDepthAverageAtBase(int enum_type,int average_enum_type,int object_enum=MeshElementsEnum);
Note:
See TracChangeset
for help on using the changeset viewer.