Changeset 6946
- Timestamp:
- 01/05/11 11:28:39 (14 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
r6891 r6946 199 199 FrictionEnum, 200 200 GeothermalFluxEnum, 201 HydrostaticAdjustmentEnum, 201 202 InternalEnum, 202 203 KflagEnum, … … 310 311 ResidualEnum, 311 312 AbsoluteEnum, 313 IncrementalEnum, 312 314 /*}}}*/ 313 315 /*Material{{{1*/ -
issm/trunk/src/c/EnumDefinitions/EnumToString.cpp
r6891 r6946 171 171 case FrictionEnum : return "Friction"; 172 172 case GeothermalFluxEnum : return "GeothermalFlux"; 173 case HydrostaticAdjustmentEnum : return "HydrostaticAdjustment"; 173 174 case InternalEnum : return "Internal"; 174 175 case KflagEnum : return "Kflag"; … … 272 273 case ResidualEnum : return "Residual"; 273 274 case AbsoluteEnum : return "Absolute"; 275 case IncrementalEnum : return "Incremental"; 274 276 case RhoIceEnum : return "RhoIce"; 275 277 case RhoWaterEnum : return "RhoWater"; -
issm/trunk/src/c/EnumDefinitions/StringToEnum.cpp
r6891 r6946 169 169 else if (strcmp(name,"Friction")==0) return FrictionEnum; 170 170 else if (strcmp(name,"GeothermalFlux")==0) return GeothermalFluxEnum; 171 else if (strcmp(name,"HydrostaticAdjustment")==0) return HydrostaticAdjustmentEnum; 171 172 else if (strcmp(name,"Internal")==0) return InternalEnum; 172 173 else if (strcmp(name,"Kflag")==0) return KflagEnum; … … 270 271 else if (strcmp(name,"Residual")==0) return ResidualEnum; 271 272 else if (strcmp(name,"Absolute")==0) return AbsoluteEnum; 273 else if (strcmp(name,"Incremental")==0) return IncrementalEnum; 272 274 else if (strcmp(name,"RhoIce")==0) return RhoIceEnum; 273 275 else if (strcmp(name,"RhoWater")==0) return RhoWaterEnum; -
issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp
r6379 r6946 55 55 parameters->AddObject(new BoolParam(TimeAdaptEnum,iomodel->time_adapt)); 56 56 parameters->AddObject(new DoubleParam(CflCoefficientEnum,iomodel->cfl_coefficient)); 57 parameters->AddObject(new IntParam(HydrostaticAdjustmentEnum,iomodel->hydrostatic_adjustment)); 57 58 parameters->AddObject(new DoubleParam(PenaltyOffsetEnum,iomodel->penalty_offset)); 58 59 parameters->AddObject(new DoubleParam(SparsityEnum,iomodel->sparsity)); -
issm/trunk/src/c/objects/Elements/Penta.cpp
r6940 r6946 5805 5805 5806 5806 /*Intermediaries*/ 5807 int i;5807 int hydroadjustment; 5808 5808 double rho_ice,rho_water; 5809 5809 … … 5813 5813 /*If shelf: hydrostatic equilibrium*/ 5814 5814 if (this->IsOnShelf()){ 5815 5816 /*Fing HydrostaticAdjustment to figure out how to update the geometry:*/ 5817 this->parameters->FindParam(&hydroadjustment,HydrostaticAdjustmentEnum); 5815 5818 5816 5819 /*recover material parameters: */ … … 5818 5821 rho_water=matpar->GetRhoWater(); 5819 5822 5820 /*Create New Surface: s = (1-rho_ice/rho_water) h*/ 5821 this->inputs->DuplicateInput(ThicknessEnum,SurfaceEnum); //1: copy thickness into surface 5822 InputScale(SurfaceEnum,(1-rho_ice/rho_water)); //2: surface = surface * (1-di) 5823 5824 /*Create New Bed b = -rho_ice/rho_water h*/ 5825 this->inputs->DuplicateInput(ThicknessEnum,BedEnum); //1: copy thickness into bed 5826 InputScale(BedEnum, -rho_ice/rho_water); //2: bed = bed * (-di) 5823 if(hydroadjustment==AbsoluteEnum){ 5824 /*Create New Surface: s = (1-rho_ice/rho_water) h*/ 5825 this->inputs->DuplicateInput(ThicknessEnum,SurfaceEnum); //1: copy thickness into surface 5826 InputScale(SurfaceEnum,(1-rho_ice/rho_water)); //2: surface = surface * (1-di) 5827 5828 /*Create New Bed b = -rho_ice/rho_water h*/ 5829 this->inputs->DuplicateInput(ThicknessEnum,BedEnum); //1: copy thickness into bed 5830 InputScale(BedEnum, -rho_ice/rho_water); //2: bed = bed * (-di) 5831 } 5832 else if(hydroadjustment==IncrementalEnum){ 5833 /*The bed is update with di*Thickness*/ 5834 this->inputs->AXPY(SurfaceEnum,1.0-rho_ice/rho_water,ThicknessEnum); //surface = surface + (1-di) * thickness 5835 5836 /*The surface is update with (1-di)*Thickness*/ 5837 this->inputs->AXPY(BedEnum,rho_ice/rho_water,ThicknessEnum); //bed = bde + di * thickness 5838 } 5839 else _error_("Hydrostatic adjustment %i (%s) not supported yet",hydroadjustment,EnumToString(hydroadjustment)); 5827 5840 } 5828 5841 -
issm/trunk/src/c/objects/Elements/Tria.cpp
r6934 r6946 5129 5129 5130 5130 /*Intermediaries*/ 5131 int hydroadjustment; 5131 5132 double rho_ice,rho_water; 5132 5133 … … 5136 5137 /*If shelf: hydrostatic equilibrium*/ 5137 5138 if (this->IsOnShelf()){ 5139 5140 /*Fing HydrostaticAdjustment to figure out how to update the geometry:*/ 5141 this->parameters->FindParam(&hydroadjustment,HydrostaticAdjustmentEnum); 5138 5142 5139 5143 /*recover material parameters: */ … … 5141 5145 rho_water=matpar->GetRhoWater(); 5142 5146 5143 /*Create New Surface: s = (1-rho_ice/rho_water) h*/ 5144 this->inputs->DuplicateInput(ThicknessEnum,SurfaceEnum); //1: copy thickness into surface 5145 InputScale(SurfaceEnum,(1.0-rho_ice/rho_water)); //2: surface = surface * (1-di) 5146 5147 /*Create New Bed b = -rho_ice/rho_water h*/ 5148 this->inputs->DuplicateInput(ThicknessEnum,BedEnum); //1: copy thickness into bed 5149 InputScale(BedEnum, -rho_ice/rho_water); //2: bed = bed * (-di) 5147 if(hydroadjustment==AbsoluteEnum){ 5148 /*Create New Surface: s = (1-rho_ice/rho_water) h*/ 5149 this->inputs->DuplicateInput(ThicknessEnum,SurfaceEnum); //1: copy thickness into surface 5150 InputScale(SurfaceEnum,(1.0-rho_ice/rho_water)); //2: surface = surface * (1-di) 5151 5152 /*Create New Bed b = -rho_ice/rho_water h*/ 5153 this->inputs->DuplicateInput(ThicknessEnum,BedEnum); //1: copy thickness into bed 5154 InputScale(BedEnum, -rho_ice/rho_water); //2: bed = bed * (-di) 5155 } 5156 else if(hydroadjustment==IncrementalEnum){ 5157 /*The bed is update with di*Thickness*/ 5158 this->inputs->AXPY(SurfaceEnum,1.0-rho_ice/rho_water,ThicknessEnum); //surface = surface + (1-di) * thickness 5159 5160 /*The surface is update with (1-di)*Thickness*/ 5161 this->inputs->AXPY(BedEnum,rho_ice/rho_water,ThicknessEnum); //bed = bde + di * thickness 5162 } 5163 else _error_("Hydrostatic adjustment %i (%s) not supported yet",hydroadjustment,EnumToString(hydroadjustment)); 5150 5164 } 5151 5165 -
issm/trunk/src/c/objects/IoModel.cpp
r6892 r6946 178 178 IoModelFetchData(&this->time_adapt,iomodel_handle,"time_adapt"); 179 179 IoModelFetchData(&this->cfl_coefficient,iomodel_handle,"cfl_coefficient"); 180 IoModelFetchData(&this->hydrostatic_adjustment,iomodel_handle,"hydrostatic_adjustment"); 180 181 IoModelFetchData(&this->penalty_offset,iomodel_handle,"penalty_offset"); 181 182 IoModelFetchData(&this->penalty_melting,iomodel_handle,"penalty_melting"); … … 326 327 this->time_adapt=0; 327 328 this->cfl_coefficient=0; 329 this->hydrostatic_adjustment=0; 328 330 this->penalty_offset=0; 329 331 this->penalty_melting=0; -
issm/trunk/src/c/objects/IoModel.h
r6892 r6946 146 146 int time_adapt; 147 147 double cfl_coefficient; 148 int hydrostatic_adjustment; 148 149 double penalty_offset; 149 150 double penalty_melting;
Note:
See TracChangeset
for help on using the changeset viewer.