Changeset 539
- Timestamp:
- 05/20/09 12:03:38 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Pengrid.cpp
r503 r539 404 404 /*Get dof list: */ 405 405 GetDofList(&doflist[0],&numberofdofspernode); 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 406 407 //First recover pressure 408 found=inputs->Recover("pressure",&pressure,1,dofs1,numgrids,(void**)&node); 409 if(!found)throw ErrorException(__FUNCT__," could not find pressure in inputs!"); 410 411 //Compute pressure melting point 412 meltingpoint=matpar->GetMeltingPoint(); 413 beta=matpar->GetBeta(); 414 t_pmp=meltingpoint-beta*pressure; 415 416 //Add penalty load 417 P_terms[0]=kmax*pow(10,penalty_offset)*t_pmp; 418 419 /*Add P_terms to global vector pg: */ 420 VecSetValues(pg,numdof,doflist,(const double*)P_terms,ADD_VALUES); 421 421 } 422 422 … … 426 426 const int NDOF1=1; 427 427 const int numdof=numgrids*NDOF1; 428 int 429 double 430 int numberofdofspernode;428 int doflist[numdof]; 429 double P_terms[numdof]={0.0}; 430 int numberofdofspernode; 431 431 int found=0; 432 int dofs1[1]={0};432 int dofs1[1]={0}; 433 433 double pressure; 434 434 double temperature; … … 445 445 inputs=(ParameterInputs*)vinputs; 446 446 447 /*Get dof list: */ 448 GetDofList(&doflist[0],&numberofdofspernode); 449 447 450 //First recover pressure,melting offset and temperature vectors 448 451 found=inputs->Recover("pressure",&pressure,1,dofs1,numgrids,(void**)&node); … … 457 460 found=inputs->Recover("dt",&dt); 458 461 if((!found) && (sub_analysis_type==TransientAnalysisEnum()))throw ErrorException(__FUNCT__," could not find dt in inputs!"); 459 460 462 461 463 meltingpoint=matpar->GetMeltingPoint(); … … 482 484 } 483 485 } 486 484 487 /*Add P_terms to global vector pg: */ 485 488 VecSetValues(pg,numdof,doflist,(const double*)P_terms,ADD_VALUES);
Note:
See TracChangeset
for help on using the changeset viewer.