Changeset 926
- Timestamp:
- 06/11/09 16:45:42 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Pengrid.cpp
r803 r926 309 309 void Pengrid::PenaltyCreateKMatrixMelting(Mat Kgg,void* vinputs,double kmax,int analysis_type,int sub_analysis_type){ 310 310 311 311 312 int found=0; 312 313 const int numgrids=1; … … 325 326 ParameterInputs* inputs=NULL; 326 327 328 /*check that pengrid is not a clone (penalty to be added only once)*/ 329 if (node->IsClone()) return; 330 327 331 /*recover pointers: */ 328 332 inputs=(ParameterInputs*)vinputs; … … 345 349 if (temperature<t_pmp){ //If T<Tpmp, there must be no melting. Therefore, melting should be constrained to 0 when T<Tpmp, instead of using spcs, use penalties 346 350 Ke[0][0]=kmax*pow(10,penalty_offset); 351 if (id==65){ 352 printf("Ke_terms[0] = %10.10lf\n",Ke[0]); 353 printf("penalty_offset(K) = %g\n",penalty_offset); 354 printf("kmax = %10.10lf\n",kmax); 355 } 347 356 } 348 357 … … 458 467 ParameterInputs* inputs=NULL; 459 468 469 /*check that pengrid is not a clone (penalty to be added only once)*/ 470 if (node->IsClone()) return; 471 460 472 /*recover pointers: */ 461 473 inputs=(ParameterInputs*)vinputs; … … 495 507 if (sub_analysis_type==SteadyAnalysisEnum()){ 496 508 P_terms[0]=melting_offset*pow(10,penalty_offset)*(temperature-t_pmp); 509 if (id==65){ 510 printf("penalty_offset(P) = %g\n",penalty_offset); 511 printf("melting_offset(P) = %10.10lf\n",melting_offset); 512 printf("P_terms[0] = %10.10lf\n",P_terms[0]); 513 } 497 514 } 498 515 else{ … … 553 570 ParameterInputs* inputs=NULL; 554 571 572 /*check that pengrid is not a clone (penalty to be added only once)*/ 573 if (node->IsClone()){ 574 unstable=0; 575 *punstable=unstable; 576 return; 577 } 578 555 579 /*recover pointers: */ 556 580 inputs=(ParameterInputs*)vinputs; 557 558 581 559 582 //First recover beta, pressure and temperature vectors;
Note:
See TracChangeset
for help on using the changeset viewer.