Changeset 9636 for issm/trunk/src/c/objects/Elements/Penta.cpp
- Timestamp:
- 09/06/11 16:53:02 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Penta.cpp
r9632 r9636 530 530 Input* input=NULL; 531 531 532 if(enum_type== RheologyBbarEnum){532 if(enum_type==MaterialsRheologyBbarEnum){ 533 533 if(!IsOnBed()) return; 534 input=(Input*)matice->inputs->GetInput( RheologyBEnum);534 input=(Input*)matice->inputs->GetInput(MaterialsRheologyBEnum); 535 535 } 536 536 else{ … … 549 549 Input* input=NULL; 550 550 551 if(enum_type== RheologyBbarEnum){552 input=(Input*)matice->inputs->GetInput( RheologyBEnum);551 if(enum_type==MaterialsRheologyBbarEnum){ 552 input=(Input*)matice->inputs->GetInput(MaterialsRheologyBEnum); 553 553 } 554 554 else{ … … 568 568 Input* input=NULL; 569 569 570 if(enum_type== RheologyBbarEnum){571 input=(Input*)matice->inputs->GetInput( RheologyBEnum);570 if(enum_type==MaterialsRheologyBbarEnum){ 571 input=(Input*)matice->inputs->GetInput(MaterialsRheologyBEnum); 572 572 } 573 573 else{ … … 1224 1224 1225 1225 /*Depth Averaging B*/ 1226 this->InputDepthAverageAtBase( RheologyBEnum,RheologyBbarEnum,MaterialsEnum);1226 this->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum,MaterialsEnum); 1227 1227 1228 1228 /*Call Tria function*/ … … 1232 1232 1233 1233 /*Delete B averaged*/ 1234 this->matice->inputs->DeleteInput( RheologyBbarEnum);1234 this->matice->inputs->DeleteInput(MaterialsRheologyBbarEnum); 1235 1235 1236 1236 /*clean up and return*/ … … 4429 4429 break; 4430 4430 4431 case RheologyBbarEnum:4431 case MaterialsRheologyBbarEnum: 4432 4432 inputs->GetParameterValue(&approximation,ApproximationEnum); 4433 4433 switch(approximation){ … … 4669 4669 4670 4670 /*Depth Average B*/ 4671 this->InputDepthAverageAtBase( RheologyBEnum,RheologyBbarEnum,MaterialsEnum);4671 this->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum,MaterialsEnum); 4672 4672 4673 4673 /*Collapse element to the base*/ … … 4677 4677 4678 4678 /*delete Average B*/ 4679 this->matice->inputs->DeleteInput( RheologyBbarEnum);4679 this->matice->inputs->DeleteInput(MaterialsRheologyBbarEnum); 4680 4680 4681 4681 } /*}}}*/ … … 4687 4687 4688 4688 /*Depth Average B*/ 4689 this->InputDepthAverageAtBase( RheologyBEnum,RheologyBbarEnum,MaterialsEnum);4689 this->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum,MaterialsEnum); 4690 4690 4691 4691 /*Collapse element to the base*/ … … 4695 4695 4696 4696 /*delete Average B*/ 4697 this->matice->inputs->DeleteInput( RheologyBbarEnum);4697 this->matice->inputs->DeleteInput(MaterialsRheologyBbarEnum); 4698 4698 } /*}}}*/ 4699 4699 /*FUNCTION Penta::GradjBbarStokes {{{1*/ … … 4704 4704 4705 4705 /*Depth Average B*/ 4706 this->InputDepthAverageAtBase( RheologyBEnum,RheologyBbarEnum,MaterialsEnum);4706 this->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum,MaterialsEnum); 4707 4707 4708 4708 /*Collapse element to the base*/ … … 4712 4712 4713 4713 /*delete Average B*/ 4714 this->matice->inputs->DeleteInput( RheologyBbarEnum);4714 this->matice->inputs->DeleteInput(MaterialsRheologyBbarEnum); 4715 4715 } /*}}}*/ 4716 4716 /*FUNCTION Penta::Sid {{{1*/ … … 4785 4785 for(int i=0;i<num_controls;i++){ 4786 4786 4787 if(control_type[i]== RheologyBbarEnum){4787 if(control_type[i]==MaterialsRheologyBbarEnum){ 4788 4788 if (!IsOnBed()) goto cleanup_and_return; 4789 input=(Input*)matice->inputs->GetInput( RheologyBEnum); _assert_(input);4789 input=(Input*)matice->inputs->GetInput(MaterialsRheologyBEnum); _assert_(input); 4790 4790 } 4791 4791 else{ … … 4799 4799 if (save_parameter) ((ControlInput*)input)->SaveValue(); 4800 4800 4801 if(control_type[i]== RheologyBbarEnum){4802 this->InputExtrude( RheologyBEnum,MaterialsEnum);4801 if(control_type[i]==MaterialsRheologyBbarEnum){ 4802 this->InputExtrude(MaterialsRheologyBEnum,MaterialsEnum); 4803 4803 } 4804 4804 } … … 5096 5096 5097 5097 /*Go through all the input objects, and find the one corresponding to enum_type, if it exists: */ 5098 if (enum_type== RheologyBbarEnum) input=this->matice->inputs->GetInput(RheologyBEnum);5098 if (enum_type==MaterialsRheologyBbarEnum) input=this->matice->inputs->GetInput(MaterialsRheologyBEnum); 5099 5099 else input=this->inputs->GetInput(enum_type); 5100 5100 //if (!input) _error_("Input %s not found in penta->inputs",EnumToStringx(enum_type)); why error out? if the requested input does not exist, we should still … … 5204 5204 } 5205 5205 break; 5206 case RheologyBbarEnum:5206 case MaterialsRheologyBbarEnum: 5207 5207 /*Matice will take care of it*/ break; 5208 5208 default: … … 6249 6249 /*Update Rheology only if converged (we must make sure that the temperature is below melting point 6250 6250 * otherwise the rheology could be negative*/ 6251 this->parameters->FindParam(&rheology_law, RheologyLawEnum);6251 this->parameters->FindParam(&rheology_law,MaterialsRheologyLawEnum); 6252 6252 switch(rheology_law){ 6253 6253 case NoneEnum: … … 6257 6257 B_average=Paterson((values[0]+values[1]+values[2]+values[3]+values[4]+values[5])/6.0); 6258 6258 for(i=0;i<numdof;i++) B[i]=B_average; 6259 this->matice->inputs->AddInput(new PentaVertexInput( RheologyBEnum,B));6259 this->matice->inputs->AddInput(new PentaVertexInput(MaterialsRheologyBEnum,B)); 6260 6260 break; 6261 6261 case ArrheniusEnum: … … 6265 6265 matice->GetN()); 6266 6266 for(i=0;i<numdof;i++) B[i]=B_average; 6267 this->matice->inputs->AddInput(new PentaVertexInput( RheologyBEnum,B));6267 this->matice->inputs->AddInput(new PentaVertexInput(MaterialsRheologyBEnum,B)); 6268 6268 break; 6269 6269 default: … … 6324 6324 /*Update Rheology only if converged (we must make sure that the temperature is below melting point 6325 6325 * otherwise the rheology could be negative*/ 6326 this->parameters->FindParam(&rheology_law, RheologyLawEnum);6326 this->parameters->FindParam(&rheology_law,MaterialsRheologyLawEnum); 6327 6327 switch(rheology_law){ 6328 6328 case NoneEnum: … … 6332 6332 B_average=Paterson((temperatures[0]+temperatures[1]+temperatures[2]+temperatures[3]+temperatures[4]+temperatures[5])/6.0); 6333 6333 for(i=0;i<numdof;i++) B[i]=B_average; 6334 this->matice->inputs->AddInput(new PentaVertexInput( RheologyBEnum,B));6334 this->matice->inputs->AddInput(new PentaVertexInput(MaterialsRheologyBEnum,B)); 6335 6335 break; 6336 6336 case ArrheniusEnum: … … 6340 6340 matice->GetN()); 6341 6341 for(i=0;i<numdof;i++) B[i]=B_average; 6342 this->matice->inputs->AddInput(new PentaVertexInput( RheologyBEnum,B));6342 this->matice->inputs->AddInput(new PentaVertexInput(MaterialsRheologyBEnum,B)); 6343 6343 break; 6344 6344 default: … … 7081 7081 7082 7082 /*We have found the base under this. Call InputDepthAverageAtBase on it: */ 7083 base->InputDepthAverageAtBase( RheologyBEnum,RheologyBbarEnum,MaterialsEnum);7083 base->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum,MaterialsEnum); 7084 7084 7085 7085 /*Ok, base->matice now has the Bbar. Ask Bbar from this enum: */ … … 7507 7507 iomodel->Constant(&dakota_analysis,DakotaAnalysisEnum); 7508 7508 iomodel->Constant(&isstokes,IsstokesEnum); 7509 iomodel->Constant(&beta, BetaEnum);7510 iomodel->Constant(&heatcapacity, HeatcapacityEnum);7509 iomodel->Constant(&beta,MaterialsBetaEnum); 7510 iomodel->Constant(&heatcapacity,MaterialsHeatcapacityEnum); 7511 7511 iomodel->Constant(&referencetemperature,ConstantsReferencetemperatureEnum); 7512 iomodel->Constant(&meltingpoint,MeltingpointEnum); 7513 iomodel->Constant(&latentheat,LatentheatEnum); 7514 7512 iomodel->Constant(&meltingpoint,MaterialsMeltingpointEnum); 7513 iomodel->Constant(&latentheat,MaterialsLatentheatEnum); 7515 7514 7516 7515 /*Checks if debuging*/
Note:
See TracChangeset
for help on using the changeset viewer.