Changeset 9632
- Timestamp:
- 09/06/11 16:36:00 (14 years ago)
- Location:
- issm/trunk
- Files:
-
- 8 added
- 4 deleted
- 45 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
r9628 r9632 34 34 SettingsLowmemEnum, 35 35 SettingsIoGatherEnum, 36 ThermalSpctemperatureEnum, 37 ThermalPenaltyThresholdEnum, 38 ThermalPenaltyLockEnum, 39 ThermalMaxiterEnum, 40 ThermalStabilizationEnum, 41 ThermalPenaltyFactorEnum, 42 ThermalRequestedOutputsEnum, 36 43 MiscellaneousNameEnum, //FIXME: only used by qmu, should not be marshalled (already in queueing script) 37 44 TimesteppingTimeStepEnum, … … 234 241 SegmentOnIceShelfEnum, 235 242 ShelfDampeningEnum, 236 StabilizeConstraintsEnum,237 243 SurfaceAreaEnum, 238 244 SurfaceEnum, … … 350 356 MaxNonlinearIterationsEnum, 351 357 MinMechanicalConstraintsEnum, 352 MinThermalConstraintsEnum,353 358 NumberOfElementsEnum, 354 359 NumberOfVerticesEnum, … … 425 430 ZEnum, 426 431 SpcthicknessEnum, 427 SpctemperatureEnum,428 432 PenaltyLockEnum, 429 433 SpcvxEnum, -
issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp
r9628 r9632 38 38 case SettingsLowmemEnum : return "SettingsLowmem"; 39 39 case SettingsIoGatherEnum : return "SettingsIoGather"; 40 case ThermalSpctemperatureEnum : return "ThermalSpctemperature"; 41 case ThermalPenaltyThresholdEnum : return "ThermalPenaltyThreshold"; 42 case ThermalPenaltyLockEnum : return "ThermalPenaltyLock"; 43 case ThermalMaxiterEnum : return "ThermalMaxiter"; 44 case ThermalStabilizationEnum : return "ThermalStabilization"; 45 case ThermalPenaltyFactorEnum : return "ThermalPenaltyFactor"; 46 case ThermalRequestedOutputsEnum : return "ThermalRequestedOutputs"; 40 47 case MiscellaneousNameEnum : return "MiscellaneousName"; 41 48 case TimesteppingTimeStepEnum : return "TimesteppingTimeStep"; … … 201 208 case SegmentOnIceShelfEnum : return "SegmentOnIceShelf"; 202 209 case ShelfDampeningEnum : return "ShelfDampening"; 203 case StabilizeConstraintsEnum : return "StabilizeConstraints";204 210 case SurfaceAreaEnum : return "SurfaceArea"; 205 211 case SurfaceEnum : return "Surface"; … … 301 307 case MaxNonlinearIterationsEnum : return "MaxNonlinearIterations"; 302 308 case MinMechanicalConstraintsEnum : return "MinMechanicalConstraints"; 303 case MinThermalConstraintsEnum : return "MinThermalConstraints";304 309 case NumberOfElementsEnum : return "NumberOfElements"; 305 310 case NumberOfVerticesEnum : return "NumberOfVertices"; … … 368 373 case ZEnum : return "Z"; 369 374 case SpcthicknessEnum : return "Spcthickness"; 370 case SpctemperatureEnum : return "Spctemperature";371 375 case PenaltyLockEnum : return "PenaltyLock"; 372 376 case SpcvxEnum : return "Spcvx"; -
issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp
r9628 r9632 42 42 parameters->AddObject(iomodel->CopyConstantObject(HydrostaticAdjustmentEnum)); 43 43 parameters->AddObject(iomodel->CopyConstantObject(PenaltyOffsetEnum)); 44 parameters->AddObject(iomodel->CopyConstantObject(ThermalPenaltyFactorEnum)); 44 45 parameters->AddObject(iomodel->CopyConstantObject(SettingsLowmemEnum)); 45 46 parameters->AddObject(iomodel->CopyConstantObject(ConnectivityEnum)); … … 51 52 parameters->AddObject(iomodel->CopyConstantObject(ArtificialDiffusivityEnum)); 52 53 parameters->AddObject(iomodel->CopyConstantObject(GroundinglineMeltingRateEnum)); 53 parameters->AddObject(iomodel->CopyConstantObject(MinThermalConstraintsEnum)); 54 parameters->AddObject(iomodel->CopyConstantObject(ThermalMaxiterEnum)); 55 parameters->AddObject(iomodel->CopyConstantObject(ThermalStabilizationEnum)); 56 parameters->AddObject(iomodel->CopyConstantObject(ThermalPenaltyThresholdEnum)); 57 parameters->AddObject(iomodel->CopyConstantObject(ThermalPenaltyLockEnum)); 54 58 parameters->AddObject(iomodel->CopyConstantObject(MinMechanicalConstraintsEnum)); 55 parameters->AddObject(iomodel->CopyConstantObject(StabilizeConstraintsEnum));56 59 parameters->AddObject(iomodel->CopyConstantObject(StokesreconditioningEnum)); 57 60 parameters->AddObject(iomodel->CopyConstantObject(ShelfDampeningEnum)); -
issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp
r9597 r9632 45 45 /*Fetch data: */ 46 46 double *spctemperature=NULL; 47 iomodel->FetchData(&spctemperature,NULL,NULL, SpctemperatureEnum);47 iomodel->FetchData(&spctemperature,NULL,NULL,ThermalSpctemperatureEnum); 48 48 49 49 /*Initialize counter*/ -
issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp
r9405 r9632 33 33 /*Only 3d mesh supported*/ 34 34 if (dim==3){ 35 IoModelToConstraintsx(constraints,iomodel, SpctemperatureEnum,ThermalAnalysisEnum);35 IoModelToConstraintsx(constraints,iomodel,ThermalSpctemperatureEnum,ThermalAnalysisEnum); 36 36 } 37 37 -
issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp
r9405 r9632 36 36 37 37 //create penalties for nodes: no node can have a temperature over the melting point 38 iomodel->FetchData(2, SpctemperatureEnum,ElementsEnum);38 iomodel->FetchData(2,ThermalSpctemperatureEnum,ElementsEnum); 39 39 CreateSingleNodeToElementConnectivity(iomodel); 40 40 … … 43 43 /*keep only this partition's nodes:*/ 44 44 if((iomodel->my_vertices[i]==1)){ 45 if (isnan(iomodel->Data( SpctemperatureEnum)[i])){ //No penalty applied on spc nodes!45 if (isnan(iomodel->Data(ThermalSpctemperatureEnum)[i])){ //No penalty applied on spc nodes! 46 46 loads->AddObject(new Pengrid(iomodel->loadcounter+i+1,i,iomodel,ThermalAnalysisEnum)); 47 47 } 48 48 } 49 49 } 50 iomodel->DeleteData(2, SpctemperatureEnum,ElementsEnum);50 iomodel->DeleteData(2,ThermalSpctemperatureEnum,ElementsEnum); 51 51 52 52 /*Assign output pointer: */ -
issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp
r9628 r9632 36 36 else if (strcmp(name,"SettingsLowmem")==0) return SettingsLowmemEnum; 37 37 else if (strcmp(name,"SettingsIoGather")==0) return SettingsIoGatherEnum; 38 else if (strcmp(name,"ThermalSpctemperature")==0) return ThermalSpctemperatureEnum; 39 else if (strcmp(name,"ThermalPenaltyThreshold")==0) return ThermalPenaltyThresholdEnum; 40 else if (strcmp(name,"ThermalPenaltyLock")==0) return ThermalPenaltyLockEnum; 41 else if (strcmp(name,"ThermalMaxiter")==0) return ThermalMaxiterEnum; 42 else if (strcmp(name,"ThermalStabilization")==0) return ThermalStabilizationEnum; 43 else if (strcmp(name,"ThermalPenaltyFactor")==0) return ThermalPenaltyFactorEnum; 44 else if (strcmp(name,"ThermalRequestedOutputs")==0) return ThermalRequestedOutputsEnum; 38 45 else if (strcmp(name,"MiscellaneousName")==0) return MiscellaneousNameEnum; 39 46 else if (strcmp(name,"TimesteppingTimeStep")==0) return TimesteppingTimeStepEnum; … … 199 206 else if (strcmp(name,"SegmentOnIceShelf")==0) return SegmentOnIceShelfEnum; 200 207 else if (strcmp(name,"ShelfDampening")==0) return ShelfDampeningEnum; 201 else if (strcmp(name,"StabilizeConstraints")==0) return StabilizeConstraintsEnum;202 208 else if (strcmp(name,"SurfaceArea")==0) return SurfaceAreaEnum; 203 209 else if (strcmp(name,"Surface")==0) return SurfaceEnum; … … 299 305 else if (strcmp(name,"MaxNonlinearIterations")==0) return MaxNonlinearIterationsEnum; 300 306 else if (strcmp(name,"MinMechanicalConstraints")==0) return MinMechanicalConstraintsEnum; 301 else if (strcmp(name,"MinThermalConstraints")==0) return MinThermalConstraintsEnum;302 307 else if (strcmp(name,"NumberOfElements")==0) return NumberOfElementsEnum; 303 308 else if (strcmp(name,"NumberOfVertices")==0) return NumberOfVerticesEnum; … … 366 371 else if (strcmp(name,"Z")==0) return ZEnum; 367 372 else if (strcmp(name,"Spcthickness")==0) return SpcthicknessEnum; 368 else if (strcmp(name,"Spctemperature")==0) return SpctemperatureEnum;369 373 else if (strcmp(name,"PenaltyLock")==0) return PenaltyLockEnum; 370 374 else if (strcmp(name,"Spcvx")==0) return SpcvxEnum; -
issm/trunk/src/c/objects/Elements/Penta.cpp
r9628 r9632 1838 1838 1839 1839 /*Intermediaries */ 1840 int artdiff;1840 int stabilization; 1841 1841 int i,j,ig,found=0; 1842 1842 double Jdet,u,v,w,um,vm,wm; … … 1852 1852 double B_conduct[3][numdof]; 1853 1853 double B_advec[3][numdof]; 1854 double B_ artdiff[2][numdof];1854 double B_stab[2][numdof]; 1855 1855 double Bprime_advec[3][numdof]; 1856 1856 double L[numdof]; 1857 1857 double dbasis[3][6]; 1858 1858 double D_scalar_conduct,D_scalar_advec; 1859 double D_scalar_trans,D_scalar_ artdiff;1859 double D_scalar_trans,D_scalar_stab; 1860 1860 double D[3][3]; 1861 1861 double K[2][2]={0.0}; … … 1875 1875 thermalconductivity=matpar->GetThermalConductivity(); 1876 1876 this->parameters->FindParam(&dt,TimesteppingTimeStepEnum); 1877 this->parameters->FindParam(& artdiff,ArtificialDiffusivityEnum);1877 this->parameters->FindParam(&stabilization,ThermalStabilizationEnum); 1878 1878 Input* pressure_input=inputs->GetInput(PressureEnum); _assert_(pressure_input); 1879 1879 Input* enthalpy_input=inputs->GetInput(EnthalpyEnum); _assert_(enthalpy_input); … … 1884 1884 Input* vym_input=inputs->GetInput(VyMeshEnum); _assert_(vym_input); 1885 1885 Input* vzm_input=inputs->GetInput(VzMeshEnum); _assert_(vzm_input); 1886 if ( artdiff==2) diameter=MinEdgeLength(xyz_list);1886 if (stabilization==2) diameter=MinEdgeLength(xyz_list); 1887 1887 1888 1888 /* Start looping on the number of gaussian points: */ … … 1953 1953 /*Artifficial diffusivity*/ 1954 1954 1955 if( artdiff==1){1955 if(stabilization==1){ 1956 1956 /*Build K: */ 1957 D_scalar_ artdiff=gauss->weight*Jdet/(pow(u-um,2)+pow(v-vm,2)+epsvel);1958 if(dt) D_scalar_ artdiff=D_scalar_artdiff*dt;1959 K[0][0]=D_scalar_ artdiff*pow(u,2); K[0][1]=D_scalar_artdiff*fabs(u)*fabs(v);1960 K[1][0]=D_scalar_ artdiff*fabs(u)*fabs(v);K[1][1]=D_scalar_artdiff*pow(v,2);1961 1962 GetBArtdiff(&B_ artdiff[0][0],&xyz_list[0][0],gauss);1963 1964 TripleMultiply(&B_ artdiff[0][0],2,numdof,1,1957 D_scalar_stab=gauss->weight*Jdet/(pow(u-um,2)+pow(v-vm,2)+epsvel); 1958 if(dt) D_scalar_stab=D_scalar_stab*dt; 1959 K[0][0]=D_scalar_stab*pow(u,2); K[0][1]=D_scalar_stab*fabs(u)*fabs(v); 1960 K[1][0]=D_scalar_stab*fabs(u)*fabs(v);K[1][1]=D_scalar_stab*pow(v,2); 1961 1962 GetBArtdiff(&B_stab[0][0],&xyz_list[0][0],gauss); 1963 1964 TripleMultiply(&B_stab[0][0],2,numdof,1, 1965 1965 &K[0][0],2,2,0, 1966 &B_ artdiff[0][0],2,numdof,0,1966 &B_stab[0][0],2,numdof,0, 1967 1967 &Ke->values[0],1); 1968 1968 } 1969 else if( artdiff==2){1969 else if(stabilization==2){ 1970 1970 1971 1971 GetNodalFunctionsP1Derivatives(&dbasis[0][0],&xyz_list[0][0], gauss); … … 2115 2115 2116 2116 /*Intermediaries */ 2117 int artdiff;2117 int stabilization; 2118 2118 int i,j,ig,found=0; 2119 2119 double Jdet,u,v,w,um,vm,wm; … … 2127 2127 double B_conduct[3][numdof]; 2128 2128 double B_advec[3][numdof]; 2129 double B_ artdiff[2][numdof];2129 double B_stab[2][numdof]; 2130 2130 double Bprime_advec[3][numdof]; 2131 2131 double L[numdof]; 2132 2132 double dbasis[3][6]; 2133 2133 double D_scalar_conduct,D_scalar_advec; 2134 double D_scalar_trans,D_scalar_ artdiff;2134 double D_scalar_trans,D_scalar_stab; 2135 2135 double D[3][3]; 2136 2136 double K[2][2]={0.0}; … … 2149 2149 thermalconductivity=matpar->GetThermalConductivity(); 2150 2150 this->parameters->FindParam(&dt,TimesteppingTimeStepEnum); 2151 this->parameters->FindParam(& artdiff,ArtificialDiffusivityEnum);2151 this->parameters->FindParam(&stabilization,ThermalStabilizationEnum); 2152 2152 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 2153 2153 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 2156 2156 Input* vym_input=inputs->GetInput(VyMeshEnum); _assert_(vym_input); 2157 2157 Input* vzm_input=inputs->GetInput(VzMeshEnum); _assert_(vzm_input); 2158 if ( artdiff==2) diameter=MinEdgeLength(xyz_list);2158 if (stabilization==2) diameter=MinEdgeLength(xyz_list); 2159 2159 2160 2160 /* Start looping on the number of gaussian points: */ … … 2221 2221 /*Artifficial diffusivity*/ 2222 2222 2223 if( artdiff==1){2223 if(stabilization==1){ 2224 2224 /*Build K: */ 2225 D_scalar_ artdiff=gauss->weight*Jdet/(pow(u-um,2)+pow(v-vm,2)+epsvel);2226 if(dt) D_scalar_ artdiff=D_scalar_artdiff*dt;2227 K[0][0]=D_scalar_ artdiff*pow(u,2); K[0][1]=D_scalar_artdiff*fabs(u)*fabs(v);2228 K[1][0]=D_scalar_ artdiff*fabs(u)*fabs(v);K[1][1]=D_scalar_artdiff*pow(v,2);2229 2230 GetBArtdiff(&B_ artdiff[0][0],&xyz_list[0][0],gauss);2231 2232 TripleMultiply(&B_ artdiff[0][0],2,numdof,1,2225 D_scalar_stab=gauss->weight*Jdet/(pow(u-um,2)+pow(v-vm,2)+epsvel); 2226 if(dt) D_scalar_stab=D_scalar_stab*dt; 2227 K[0][0]=D_scalar_stab*pow(u,2); K[0][1]=D_scalar_stab*fabs(u)*fabs(v); 2228 K[1][0]=D_scalar_stab*fabs(u)*fabs(v);K[1][1]=D_scalar_stab*pow(v,2); 2229 2230 GetBArtdiff(&B_stab[0][0],&xyz_list[0][0],gauss); 2231 2232 TripleMultiply(&B_stab[0][0],2,numdof,1, 2233 2233 &K[0][0],2,2,0, 2234 &B_ artdiff[0][0],2,numdof,0,2234 &B_stab[0][0],2,numdof,0, 2235 2235 &Ke->values[0],1); 2236 2236 } 2237 else if( artdiff==2){2237 else if(stabilization==2){ 2238 2238 2239 2239 GetNodalFunctionsP1Derivatives(&dbasis[0][0],&xyz_list[0][0], gauss); … … 3287 3287 /*Intermediaries*/ 3288 3288 int i,j,ig,found=0; 3289 int friction_type, artdiff;3289 int friction_type,stabilization; 3290 3290 double Jdet,phi,dt; 3291 3291 double rho_ice,heatcapacity; … … 3311 3311 thermalconductivity=matpar->GetThermalConductivity(); 3312 3312 this->parameters->FindParam(&dt,TimesteppingTimeStepEnum); 3313 this->parameters->FindParam(& artdiff,ArtificialDiffusivityEnum);3313 this->parameters->FindParam(&stabilization,ThermalStabilizationEnum); 3314 3314 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 3315 3315 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 3317 3317 Input* temperature_input=NULL; 3318 3318 if (dt) temperature_input=inputs->GetInput(TemperatureEnum); _assert_(inputs); 3319 if ( artdiff==2) diameter=MinEdgeLength(xyz_list);3319 if (stabilization==2) diameter=MinEdgeLength(xyz_list); 3320 3320 3321 3321 /* Start looping on the number of gaussian points: */ … … 3344 3344 } 3345 3345 3346 if( artdiff==2){3346 if(stabilization==2){ 3347 3347 GetNodalFunctionsP1Derivatives(&dbasis[0][0],&xyz_list[0][0], gauss); 3348 3348 … … 3554 3554 /*Intermediaries*/ 3555 3555 int i,j,ig,found=0; 3556 int friction_type, artdiff;3556 int friction_type,stabilization; 3557 3557 double Jdet,phi,dt; 3558 3558 double rho_ice,heatcapacity; … … 3578 3578 thermalconductivity=matpar->GetThermalConductivity(); 3579 3579 this->parameters->FindParam(&dt,TimesteppingTimeStepEnum); 3580 this->parameters->FindParam(& artdiff,ArtificialDiffusivityEnum);3580 this->parameters->FindParam(&stabilization,ThermalStabilizationEnum); 3581 3581 Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input); 3582 3582 Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input); … … 3584 3584 Input* temperature_input=NULL; 3585 3585 if (dt) temperature_input=inputs->GetInput(TemperatureEnum); _assert_(inputs); 3586 if ( artdiff==2) diameter=MinEdgeLength(xyz_list);3586 if (stabilization==2) diameter=MinEdgeLength(xyz_list); 3587 3587 3588 3588 /* Start looping on the number of gaussian points: */ … … 3611 3611 } 3612 3612 3613 if( artdiff==2){3613 if(stabilization==2){ 3614 3614 GetNodalFunctionsP1Derivatives(&dbasis[0][0],&xyz_list[0][0], gauss); 3615 3615 -
issm/trunk/src/c/objects/Loads/Pengrid.cpp
r9628 r9632 476 476 int unstable=0; 477 477 int reset_penalties=0; 478 int stabilize_constraints;478 int penalty_lock; 479 479 480 480 /*recover pointers: */ … … 493 493 494 494 //Recover our data: 495 parameters->FindParam(& stabilize_constraints,StabilizeConstraintsEnum);495 parameters->FindParam(&penalty_lock,ThermalPenaltyLockEnum); 496 496 497 497 //Compute pressure melting point … … 514 514 else{ 515 515 unstable=1; 516 if( stabilize_constraints)zigzag_counter++;516 if(penalty_lock)zigzag_counter++; 517 517 } 518 518 519 519 /*If penalty keeps zigzagging more than 5 times: */ 520 if( stabilize_constraints){521 if(zigzag_counter> stabilize_constraints){520 if(penalty_lock){ 521 if(zigzag_counter>penalty_lock){ 522 522 unstable=0; 523 523 active=1; … … 566 566 const int numdof=NUMVERTICES*NDOF1; 567 567 double pressure,temperature,t_pmp; 568 double penalty_ offset;568 double penalty_factor; 569 569 570 570 Penta* penta=(Penta*)element; … … 577 577 penta->GetParameterValue(&pressure,node,PressureEnum); 578 578 penta->GetParameterValue(&temperature,node,TemperatureEnum); 579 parameters->FindParam(&penalty_ offset,PenaltyOffsetEnum);579 parameters->FindParam(&penalty_factor,ThermalPenaltyFactorEnum); 580 580 581 581 /*Compute pressure melting point*/ … … 584 584 /*Add penalty load*/ 585 585 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 586 Ke->values[0]=kmax*pow((double)10,penalty_ offset);586 Ke->values[0]=kmax*pow((double)10,penalty_factor); 587 587 } 588 588 … … 595 595 596 596 const int numdof=NUMVERTICES*NDOF1; 597 double penalty_ offset;597 double penalty_factor; 598 598 599 599 /*Initialize Element matrix and return if necessary*/ … … 602 602 603 603 /*recover parameters: */ 604 parameters->FindParam(&penalty_ offset,PenaltyOffsetEnum);605 606 Ke->values[0]=kmax*pow((double)10,penalty_ offset);604 parameters->FindParam(&penalty_factor,ThermalPenaltyFactorEnum); 605 606 Ke->values[0]=kmax*pow((double)10,penalty_factor); 607 607 608 608 /*Clean up and return*/ … … 618 618 double melting_offset; 619 619 double t_pmp; 620 double dt,penalty_ offset;620 double dt,penalty_factor; 621 621 622 622 /*recover pointers: */ … … 632 632 inputs->GetParameterValue(&melting_offset,MeltingOffsetEnum); 633 633 parameters->FindParam(&dt,TimesteppingTimeStepEnum); 634 parameters->FindParam(&penalty_ offset,PenaltyOffsetEnum);634 parameters->FindParam(&penalty_factor,ThermalPenaltyFactorEnum); 635 635 636 636 /*Compute pressure melting point*/ … … 640 640 This time, the penalty must have the same value as the one used for the thermal computation 641 641 so that the corresponding melting can be computed correctly 642 In the thermal computation, we used kmax=melting_offset, and the same penalty_ offset*/642 In the thermal computation, we used kmax=melting_offset, and the same penalty_factor*/ 643 643 if (temperature<t_pmp){ //%no melting 644 644 pe->values[0]=0; 645 645 } 646 646 else{ 647 if (dt) pe->values[0]=melting_offset*pow((double)10,penalty_ offset)*(temperature-t_pmp)/dt;648 else pe->values[0]=melting_offset*pow((double)10,penalty_ offset)*(temperature-t_pmp);647 if (dt) pe->values[0]=melting_offset*pow((double)10,penalty_factor)*(temperature-t_pmp)/dt; 648 else pe->values[0]=melting_offset*pow((double)10,penalty_factor)*(temperature-t_pmp); 649 649 } 650 650 … … 659 659 double pressure; 660 660 double t_pmp; 661 double penalty_ offset;661 double penalty_factor; 662 662 663 663 Penta* penta=(Penta*)element; … … 669 669 /*Retrieve all inputs and parameters*/ 670 670 penta->GetParameterValue(&pressure,node,PressureEnum); 671 parameters->FindParam(&penalty_ offset,PenaltyOffsetEnum);671 parameters->FindParam(&penalty_factor,ThermalPenaltyFactorEnum); 672 672 673 673 /*Compute pressure melting point*/ 674 674 t_pmp=matpar->GetMeltingPoint()-matpar->GetBeta()*pressure; 675 675 676 pe->values[0]=kmax*pow((double)10,penalty_ offset)*t_pmp;676 pe->values[0]=kmax*pow((double)10,penalty_factor)*t_pmp; 677 677 678 678 /*Clean up and return*/ -
issm/trunk/src/c/solvers/solver_thermal_nonlinear.cpp
r9622 r9632 27 27 int num_unstable_constraints; 28 28 int count; 29 int min_thermal_constraints; 29 int thermal_penalty_threshold; 30 int thermal_maxiter; 30 31 bool reset_penalties; 31 32 … … 39 40 kflag=1; pflag=1; 40 41 femmodel->parameters->FindParam(&lowmem,SettingsLowmemEnum); 41 femmodel->parameters->FindParam(& min_thermal_constraints,MinThermalConstraintsEnum);42 femmodel->parameters->FindParam(&thermal_penalty_threshold,ThermalPenaltyThresholdEnum); 42 43 femmodel->parameters->FindParam(&configuration_type,ConfigurationTypeEnum); 44 femmodel->parameters->FindParam(&thermal_maxiter,ThermalMaxiterEnum); 43 45 44 46 count=1; … … 65 67 if (!converged){ 66 68 _printf_(VerboseConvergence(),"%s%i\n"," #unstable constraints = ",num_unstable_constraints); 67 if (num_unstable_constraints <= min_thermal_constraints)converged=true;69 if (num_unstable_constraints <= thermal_penalty_threshold)converged=true; 68 70 } 69 71 count++; … … 72 74 73 75 if(converged)break; 76 if(count>=thermal_maxiter){ 77 _printf_(true," maximum number of iterations (%i) exceeded\n",thermal_maxiter); 78 break; 79 } 74 80 } 75 81 -
issm/trunk/src/m/classes/model/model.m
r9630 r9632 23 23 settings = modelfield('default',0,'marshall',true); 24 24 radaroverlay = modelfield('default',0,'marshall',false); 25 thermal = modelfield('default',0,'marshall',true); 25 26 miscellaneous = modelfield('default',0,'marshall',true); 26 27 timestepping = modelfield('default',0,'marshall',true); … … 111 112 mixed_layer_capacity = modelfield('default',0,'marshall',true,'format','Double'); 112 113 thermal_exchange_velocity = modelfield('default',0,'marshall',true,'format','Double'); 113 min_thermal_constraints = modelfield('default',0,'marshall',true,'format','Integer');114 114 min_mechanical_constraints = modelfield('default',0,'marshall',true,'format','Integer'); 115 stabilize_constraints = modelfield('default',0,'marshall',true,'format','Integer');116 115 117 116 %Physical parameters … … 140 139 spcvy = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1); 141 140 spcvz = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1); 142 spctemperature = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);143 141 spcthickness = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1); 144 142 diagnostic_ref = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1); … … 409 407 if isfield(structmd,'hydro_CR'), md.hydrology.CR=structmd.hydro_CR; end 410 408 if isfield(structmd,'hydro_kn'), md.hydrology.kn=structmd.hydro_kn; end 409 if isfield(structmd,'spctemperature'), md.thermal.spctemperature=structmd.spctemperature; end 410 if isfield(structmd,'min_thermal_constraints'), md.thermal.penalty_threshold=structmd.min_thermal_constraints; end 411 if isfield(structmd,'artificial_diffusivity'), md.thermal.stabilization=structmd.artificial_diffusivity; end 412 if isfield(structmd,'max_nonlinear_iterations'), md.thermal.maxiter=structmd.max_nonlinear_iterations; end 413 if isfield(structmd,'stabilize_constraints'), md.thermal.penalty_lock=structmd.stabilize_constraints; end 414 if isfield(structmd,'penalty_offset'), md.thermal.penalty_factor=structmd.penalty_offset; end 411 415 if isfield(structmd,'name'), md.miscellaneous.name=structmd.name; end 412 416 if isfield(structmd,'notes'), md.miscellaneous.notes=structmd.notes; end … … 530 534 md.settings=settings; 531 535 md.radaroverlay=radaroverlay; 536 md.thermal=thermal; 532 537 md.miscellaneous=miscellaneous; 533 538 md.timestepping=timestepping; … … 621 626 %a few constraints remain unstable. For thermal computation, this 622 627 %parameter is often used. 623 md.min_thermal_constraints=0;624 628 md.min_mechanical_constraints=0; 625 629 … … 709 713 if(strcmp(index1.subs,'diagnostic')), displaydiagnostic(md);return; end 710 714 if(strcmp(index1.subs,'prognostic')), displayprognostic(md);return; end 711 if(strcmp(index1.subs,'thermal')), displaythermal(md);return; end712 715 if(strcmp(index1.subs,'transient')), displaytransient(md);return; end 713 716 if(strcmp(index1.subs,'control')), displaycontrol(md);return; end -
issm/trunk/src/m/model/collapse.m
r9612 r9632 60 60 md.spcvz=project2d(md,md.spcvz,md.numlayers); 61 61 md.spcthickness=project2d(md,md.spcthickness,md.numlayers); 62 md. spctemperature=project2d(md,md.spctemperature,md.numlayers);62 md.thermal.spctemperature=project2d(md,md.thermal.spctemperature,md.numlayers); 63 63 64 64 %Extrusion of Neumann BC -
issm/trunk/src/m/model/extrude.m
r9612 r9632 175 175 md.spcvy=project3d(md,'vector',md.spcvy,'type','node'); 176 176 md.spcvz=project3d(md,'vector',md.spcvz,'type','node'); 177 md. spctemperature=project3d(md,'vector',md.spctemperature,'type','node','layer',md.numlayers,'padding',NaN);177 md.thermal.spctemperature=project3d(md,'vector',md.thermal.spctemperature,'type','node','layer',md.numlayers,'padding',NaN); 178 178 md.spcthickness=project3d(md,'vector',md.spcthickness,'type','node'); 179 179 md.diagnostic_ref=project3d(md,'vector',md.diagnostic_ref,'type','node'); -
issm/trunk/src/m/model/ismodelselfconsistent.m
r9629 r9632 166 166 message('model not consistent: artificial_diffusivity should be a scalar (0 or 1 or 2)'); 167 167 end 168 if ~ismember(md.thermal.stabilization,[0 1 2]), 169 message('model not consistent: thermal.stabilization should be a scalar (0 or 1 or 2)'); 170 end 168 171 if ~ismember(md.prognostic_DG,[0 1]), 169 172 message('model not consistent: prognostic_DG should be a scalar (1 or 0)'); … … 488 491 489 492 %CHECK THAT SPCTEMPERATURE IS AN APPROPRIATE FORCING 490 fields={' spctemperature'};493 fields={'thermal.spctemperature'}; 491 494 checkforcing(md,fields); 492 495 493 496 %CHECK THAT WE ARE NOT FULLY CONSTRAINED 494 if ~any(~isnan(md. spctemperature))497 if ~any(~isnan(md.thermal.spctemperature)) 495 498 message(['model not consistent: model ' md.miscellaneous.name ' is totally constrained for temperature, no need to solve!']); 496 499 end … … 518 521 519 522 %CHECK SPCTEMPERATURE that are not NaN are >0. 520 if find(any(md. spctemperature(find(~isnan(md.spctemperature(1:md.numberofnodes,:))))<=0)),523 if find(any(md.thermal.spctemperature(find(~isnan(md.thermal.spctemperature(1:md.numberofnodes,:))))<=0)), 521 524 message(['model not consistent: model ' md.miscellaneous.name ' is constrained with negative or nil temperatures!']); 522 525 end -
issm/trunk/src/m/model/isresultconsistent.m
r9571 r9632 147 147 %check melting (<=0 via penalties) 148 148 if any(abs(md.results.ThermalAnalysis(iter).melting(md.numberofnodes2d+1:end))>tolerance) 149 disp(['''thermal'' result not consistent: increase penalty_offset(negative melting)']);149 disp(['''thermal'' result not consistent: increase thermal.penalty_factor (negative melting)']); 150 150 bool=0; return; 151 151 end … … 197 197 if (md.dim==3), 198 198 if any(abs(md.results.TransientAnalysis(iter).melting(md.numberofnodes2d+1:end))>tolerance) 199 disp(['''thermal'' result not consistent: increase penalty_offset(negative melting)']);199 disp(['''thermal'' result not consistent: increase therma.penalty_factor (negative melting)']); 200 200 bool=0; return; 201 201 end -
issm/trunk/src/m/model/modelextract.m
r9627 r9632 208 208 md2.spcvz(nodestoflag2)=0; 209 209 end 210 if ~isnan(md1. spctemperature),211 md2. spctemperature(nodestoflag2,1)=1;210 if ~isnan(md1.thermal.spctemperature), 211 md2.thermal.spctemperature(nodestoflag2,1)=1; 212 212 end 213 213 -
issm/trunk/src/m/solvers/solver_thermal_nonlinear.m
r9559 r9632 11 11 %Get parameters 12 12 configuration_type=femmodel.parameters.ConfigurationType; 13 thermal_maxiter=femmodel.parameters.ThermalMaxiter; 13 14 14 15 issmprintf(VerboseConvergence(),'\n%s',[' starting direct shooting method']); … … 36 37 if ~converged, 37 38 issmprintf(VerboseConvergence(),'%s%i',' #unstable constraints ',num_unstable_constraints); 38 if num_unstable_constraints<=femmodel.parameters. MinThermalConstraints,39 if num_unstable_constraints<=femmodel.parameters.ThermalPenaltyThreshold, 39 40 converged=1; 40 41 end 42 end 43 if(count>thermal_maxiter), 44 issmprintf(true,'%s%i%s',' maximum number of iterations ',thermal_maxiter,' exceeded'); 45 break; 41 46 end 42 47 [femmodel.elements loads]=InputUpdateFromConstant(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters,double(converged),ConvergedEnum); -
issm/trunk/src/m/utils/BC/SetIceSheetBC.m
r9612 r9632 58 58 59 59 if (length(md.temperature)==md.numberofnodes), 60 md. spctemperature=NaN*ones(md.numberofnodes,1);61 pos=find(md.nodeonsurface); md. spctemperature(pos)=md.temperature(pos); %impose observed temperature on surface60 md.thermal.spctemperature=NaN*ones(md.numberofnodes,1); 61 pos=find(md.nodeonsurface); md.thermal.spctemperature(pos)=md.temperature(pos); %impose observed temperature on surface 62 62 if (length(md.basalforcings.geothermalflux)~=md.numberofnodes), 63 63 md.basalforcings.geothermalflux=50*10^-3*ones(md.numberofnodes,1); %50 mW/m^2 -
issm/trunk/src/m/utils/BC/SetIceShelfBC.m
r9612 r9632 90 90 91 91 if (length(md.temperature)==md.numberofnodes), 92 md. spctemperature=NaN*ones(md.numberofnodes,1);93 pos=find(md.nodeonsurface); md. spctemperature(pos)=md.temperature(pos); %impose observed temperature on surface92 md.thermal.spctemperature=NaN*ones(md.numberofnodes,1); 93 pos=find(md.nodeonsurface); md.thermal.spctemperature(pos)=md.temperature(pos); %impose observed temperature on surface 94 94 if (length(md.basalforcings.geothermalflux)~=md.numberofnodes), 95 95 md.basalforcings.geothermalflux=zeros(md.numberofnodes,1); -
issm/trunk/src/m/utils/BC/SetMarineIceSheetBC.m
r9617 r9632 101 101 102 102 if (length(md.temperature)==md.numberofnodes), 103 md. spctemperature=NaN*ones(md.numberofnodes,1);104 pos=find(md.nodeonsurface); md. spctemperature(pos)=md.temperature(pos); %impose observed temperature on surface103 md.thermal.spctemperature=NaN*ones(md.numberofnodes,1); 104 pos=find(md.nodeonsurface); md.thermal.spctemperature(pos)=md.temperature(pos); %impose observed temperature on surface 105 105 if (length(md.basalforcings.geothermalflux)~=md.numberofnodes), 106 106 md.basalforcings.geothermalflux=zeros(md.numberofnodes,1); -
issm/trunk/test/Miscellaneous/GJM_test1/SquareShelf.par
r9625 r9632 27 27 md.viscosity_overshoot=0.3; 28 28 md.artificial_diffusivity=1; 29 md.thermal.stabilization=1; 29 30 md.waitonlock=30; 30 31 md.verbose=verbose(0); -
issm/trunk/test/Miscellaneous/connectivity/Square.par
r9597 r9632 5 5 md.ndt=md.dt*10; 6 6 md.artificial_diffusivity=1; 7 md.thermal.stabilization=1; 7 8 8 9 hmin=300; -
issm/trunk/test/NightlyRun/test1110.m
r9628 r9632 36 36 end 37 37 pos=find(~md.nodeonbed); 38 md. spctemperature(pos)=255;38 md.thermal.spctemperature(pos)=255; 39 39 40 40 %Create MPCs to have periodic boundary conditions -
issm/trunk/test/NightlyRun/test1208.m
r9628 r9632 23 23 md.timestepping.final_time=50000; 24 24 md.artificial_diffusivity=2; 25 md.thermal.stabilization=2; 25 26 26 27 %Now we can solve the problem -
issm/trunk/test/NightlyRun/test1301.m
r9611 r9632 16 16 md.temperature=273.15*ones(md.numberofnodes,1); 17 17 pos=find(md.nodeonsurface); 18 md. spctemperature(pos)=md.temperature(pos);18 md.thermal.spctemperature(pos)=md.temperature(pos); 19 19 md.rheology_B=paterson(md.temperature); 20 20 -
issm/trunk/test/NightlyRun/test1302.m
r9597 r9632 12 12 13 13 %Thermal boundary conditions 14 pos1=find(md.elementonbed); md. spctemperature(md.elements(pos1,1:3))=10;15 pos2=find(md.elementonsurface); md. spctemperature(md.elements(pos2,4:6))=0;14 pos1=find(md.elementonbed); md.thermal.spctemperature(md.elements(pos1,1:3))=10; 15 pos2=find(md.elementonsurface); md.thermal.spctemperature(md.elements(pos2,4:6))=0; 16 16 md.vz=0.1*ones(md.numberofnodes,1); 17 17 md.vel=sqrt( md.vx.^2+ md.vy.^2+ md.vz.^2); -
issm/trunk/test/NightlyRun/test1303.m
r9433 r9632 11 11 md=extrude(md,11,2); 12 12 md=setelementstype(md,'Pattyn','all'); 13 pos1=find(md.elementonbed); md. spctemperature(md.elements(pos1,1:3))=10;14 pos2=find(md.elementonsurface); md. spctemperature(md.elements(pos2,4:6))=0;13 pos1=find(md.elementonbed); md.thermal.spctemperature(md.elements(pos1,1:3))=10; 14 pos2=find(md.elementonsurface); md.thermal.spctemperature(md.elements(pos2,4:6))=0; 15 15 md.pressure=zeros(md.numberofnodes,1); 16 16 -
issm/trunk/test/NightlyRun/test1304.m
r9611 r9632 12 12 md=setelementstype(md,'Pattyn','all'); 13 13 14 pos2=find(md.elementonsurface); md. spctemperature(md.elements(pos2,4:6))=0;14 pos2=find(md.elementonsurface); md.thermal.spctemperature(md.elements(pos2,4:6))=0; 15 15 md.pressure=zeros(md.numberofnodes,1); 16 16 md.basalforcings.geothermalflux(:)=0.1; %100mW/m^2 -
issm/trunk/test/NightlyRun/test263.m
r9628 r9632 5 5 md=setelementstype(md,'macayeal','all'); 6 6 md.cluster=none; 7 md. spctemperature=[md.spctemperature, md.spctemperature+5, md.spctemperature+10, md.spctemperature+15; 1.5 2.5 3.5 4];7 md.thermal.spctemperature=[md.thermal.spctemperature, md.thermal.spctemperature+5, md.thermal.spctemperature+10, md.thermal.spctemperature+15; 1.5 2.5 3.5 4]; 8 8 md.timestepping.time_step=1; 9 9 md.timestepping.final_time=4; -
issm/trunk/test/NightlyRun/test264.m
r9628 r9632 5 5 md=setelementstype(md,'macayeal','all'); 6 6 md.cluster=generic('name',oshostname(),'np',3); 7 md. spctemperature=[md.spctemperature, md.spctemperature+5, md.spctemperature+10, md.spctemperature+15; 1.5 2.5 3.5 4];7 md.thermal.spctemperature=[md.thermal.spctemperature, md.thermal.spctemperature+5, md.thermal.spctemperature+10, md.thermal.spctemperature+15; 1.5 2.5 3.5 4]; 8 8 md.timestepping.time_step=1; 9 9 md.timestepping.final_time=4; -
issm/trunk/test/NightlyRun/test265.m
r9628 r9632 5 5 md=setelementstype(md,'pattyn','all'); 6 6 md.cluster=none; 7 md. spctemperature=[md.spctemperature, md.spctemperature+5; 1 2];7 md.thermal.spctemperature=[md.thermal.spctemperature, md.thermal.spctemperature+5; 1 2]; 8 8 md.timestepping.time_step=0.5; 9 9 md.timestepping.final_time=2; -
issm/trunk/test/NightlyRun/test266.m
r9628 r9632 5 5 md=setelementstype(md,'pattyn','all'); 6 6 md.cluster=generic('name',oshostname(),'np',3); 7 md. spctemperature=[md.spctemperature, md.spctemperature+5; 1 2];7 md.thermal.spctemperature=[md.thermal.spctemperature, md.thermal.spctemperature+5; 1 2]; 8 8 md.timestepping.time_step=0.5; 9 9 md.timestepping.final_time=2; -
issm/trunk/test/NightlyRun/test529.m
r9611 r9632 4 4 md=extrude(md,3,1); 5 5 md=setelementstype(md,'pattyn','all'); 6 md. artificial_diffusivity=2;6 md.thermal.stabilization=2; 7 7 md=solve(md,ThermalSolutionEnum); 8 8 -
issm/trunk/test/NightlyRun/test530.m
r9611 r9632 4 4 md=extrude(md,3,1); 5 5 md=setelementstype(md,'pattyn','all'); 6 md. artificial_diffusivity=2;6 md.thermal.stabilization=2; 7 7 md.cluster=generic('name',oshostname(),'np',3); 8 8 md=solve(md,ThermalSolutionEnum); -
issm/trunk/test/NightlyRun/test531.m
r9628 r9632 4 4 md=extrude(md,3,1); 5 5 md=setelementstype(md,'pattyn','all'); 6 md. artificial_diffusivity=2;6 md.thermal.stabilization=2; 7 7 md.timestepping.time_step=0; 8 md. min_thermal_constraints=40;8 md.thermal.penalty_threshold=40; 9 9 md=solve(md,ThermalSolutionEnum); 10 10 -
issm/trunk/test/NightlyRun/test532.m
r9628 r9632 4 4 md=extrude(md,3,1); 5 5 md=setelementstype(md,'pattyn','all'); 6 md. artificial_diffusivity=2;6 md.thermal.stabilization=2; 7 7 md.cluster=generic('name',oshostname(),'np',3); 8 8 md.timestepping.time_step=0; 9 md. min_thermal_constraints=40;9 md.thermal.penalty_threshold=40; 10 10 md=solve(md,ThermalSolutionEnum); 11 11 -
issm/trunk/test/Par/79North.par
r9628 r9632 32 32 md.viscosity_overshoot=0.3; 33 33 md.artificial_diffusivity=1; 34 md.thermal.stabilization=1; 34 35 md.verbose=verbose(0); 35 36 md.waitonlock=30; -
issm/trunk/test/Par/ISMIPF.par
r9628 r9632 31 31 md.spcthickness=NaN*ones(md.numberofnodes,1); 32 32 md.spcthickness(pos)=md.thickness(pos); 33 md. spctemperature=255*ones(md.numberofnodes,1);33 md.thermal.spctemperature=255*ones(md.numberofnodes,1); 34 34 md.basalforcings.geothermalflux=0.4*ones(md.numberofnodes,1); 35 35 … … 41 41 md.timestepping.final_time=10; 42 42 md.artificial_diffusivity=1; 43 md.min_thermal_constraints=10^5; 43 md.thermal.stabilization=1; 44 md.thermal.penalty_threshold=10^5; -
issm/trunk/test/Par/RoundSheetShelf.par
r9629 r9632 59 59 md.viscosity_overshoot=0.0; 60 60 md.artificial_diffusivity=1; 61 md.thermal.stabilisation=1; 61 62 md.verbose=verbose(0); 62 63 md.waitonlock=30; -
issm/trunk/test/Par/SquareEISMINT.par
r9628 r9632 34 34 md.spcthickness=NaN*ones(md.numberofnodes,1); 35 35 md.spcthickness(pos)=500; 36 md.artificial_diffusivity=0; %Better result with no artificial diffusivity 37 md.thermal.statbilization=0; 36 38 md.timestepping.final_time=500; 37 39 md.timestepping.time_step=1; 38 md.artificial_diffusivity=0; %Better result with no artificial diffusivity -
issm/trunk/test/Par/SquareSheetConstrained.par
r9628 r9632 33 33 md.viscosity_overshoot=0.0; 34 34 md.artificial_diffusivity=1; 35 md.thermal.stabilization=1; 35 36 md.verbose=verbose(0); 36 37 md.waitonlock=30; -
issm/trunk/test/Par/SquareSheetShelf.par
r9628 r9632 40 40 md.viscosity_overshoot=0.0; 41 41 md.artificial_diffusivity=1; 42 md.thermal.stabilization=1; 42 43 md.verbose=verbose(0); 43 44 md.waitonlock=30; -
issm/trunk/test/Par/SquareShelf.par
r9628 r9632 33 33 md.viscosity_overshoot=0.3; 34 34 md.artificial_diffusivity=1; 35 md.thermal.stabilization=1; 35 36 md.waitonlock=30; 36 37 md.verbose=verbose(0); -
issm/trunk/test/Par/SquareShelfConstrained.par
r9628 r9632 37 37 md.viscosity_overshoot=0.0; 38 38 md.artificial_diffusivity=1; 39 md.thermal.stabilization=1; 39 40 md.verbose=verbose(0); 40 41 md.waitonlock=30; -
issm/trunk/test/Par/SquareThermal.par
r9628 r9632 39 39 40 40 disp(' boundary conditions for thermal model'); 41 md. spctemperature(:)=md.temperature;41 md.thermal.spctemperature(:)=md.temperature; 42 42 md.basalforcings.geothermalflux=zeros(md.numberofnodes,1); 43 43 pos=find(md.elementonicesheet);md.basalforcings.geothermalflux(md.elements(pos,:))=1*10^-3; %1 mW/m^2
Note:
See TracChangeset
for help on using the changeset viewer.