Changeset 7640
- Timestamp:
- 03/15/11 09:01:44 (14 years ago)
- Location:
- issm/trunk/src/c
- Files:
-
- 9 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Makefile.am
r7447 r7640 395 395 ./modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp\ 396 396 ./modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp\ 397 ./modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp\ 398 ./modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp\ 399 ./modules/ModelProcessorx/Hydrology/CreateConstraintsHydrology.cpp\ 400 ./modules/ModelProcessorx/Hydrology/CreateLoadsHydrology.cpp\ 397 401 ./modules/ModelProcessorx/Melting/UpdateElementsMelting.cpp\ 398 402 ./modules/ModelProcessorx/Melting/CreateNodesMelting.cpp\ … … 420 424 ./modules/OutputResultsx/OutputResultsx.h\ 421 425 ./modules/OutputResultsx/OutputResultsx.cpp\ 426 ./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsx.h\ 427 ./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsx.cpp\ 428 ./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp\ 422 429 ./modules/MinVelx/MinVelx.h\ 423 430 ./modules/MinVelx/MinVelx.cpp\ … … 970 977 ./modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp\ 971 978 ./modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp\ 979 ./modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp\ 980 ./modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp\ 981 ./modules/ModelProcessorx/Hydrology/CreateConstraintsHydrology.cpp\ 982 ./modules/ModelProcessorx/Hydrology/CreateLoadsHydrology.cpp\ 972 983 ./modules/ModelProcessorx/Melting/UpdateElementsMelting.cpp\ 973 984 ./modules/ModelProcessorx/Melting/CreateNodesMelting.cpp\ … … 1171 1182 ./solutions/surfaceslope_core.cpp\ 1172 1183 ./solutions/bedslope_core.cpp\ 1184 ./solutions/hydrology_core.cpp\ 1185 ./solutions/hydrology_core_step.cpp\ 1173 1186 ./solutions/transient2d_core.cpp\ 1174 1187 ./solutions/transient3d_core.cpp\ … … 1182 1195 ./solvers/solver_linear.cpp\ 1183 1196 ./solvers/solver_adjoint_linear.cpp\ 1184 ./solvers/solver_ diagnostic_nonlinear.cpp\1197 ./solvers/solver_nonlinear.cpp\ 1185 1198 ./solvers/solver_stokescoupling_nonlinear.cpp\ 1186 1199 ./solvers/solver_thermal_nonlinear.cpp\ -
issm/trunk/src/c/modules/ModelProcessorx/CreateDataSets.cpp
r6412 r7640 72 72 UpdateElementsThermal(elements,iomodel,iomodel_handle,analysis_counter,analysis_type); 73 73 break; 74 75 case HydrologyAnalysisEnum: 76 CreateNodesHydrology(pnodes, iomodel,iomodel_handle); 77 CreateConstraintsHydrology(pconstraints,iomodel,iomodel_handle); 78 CreateLoadsHydrology(ploads,iomodel,iomodel_handle); 79 UpdateElementsHydrology(elements,iomodel,iomodel_handle,analysis_counter,analysis_type); 80 break; 74 81 75 82 case MeltingAnalysisEnum: -
issm/trunk/src/c/modules/ModelProcessorx/DistributeNumDofs.cpp
r6412 r7640 75 75 numdofs=1; 76 76 } 77 else if (analysis_type==HydrologyAnalysisEnum){ 78 numdofs=1; 79 } 77 80 else if (analysis_type==MeltingAnalysisEnum){ 78 81 numdofs=1; -
issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.h
r7159 r7640 61 61 void UpdateElementsThermal(Elements* elements,IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type); 62 62 63 /*hydrology:*/ 64 void CreateNodesHydrology(Nodes** pnodes,IoModel* iomodel,ConstDataHandle iomodel_handle); 65 void CreateConstraintsHydrology(Constraints** pconstraints,IoModel* iomodel,ConstDataHandle iomodel_handle); 66 void CreateLoadsHydrology(Loads** ploads, IoModel* iomodel, ConstDataHandle iomodel_handle); 67 void UpdateElementsHydrology(Elements* elements,IoModel* iomodel,ConstDataHandle iomodel_handle,int analysis_counter,int analysis_type); 68 69 63 70 /*melting:*/ 64 71 void CreateNodesMelting(Nodes** pnodes,IoModel* iomodel,ConstDataHandle iomodel_handle); -
issm/trunk/src/c/modules/modules.h
r7079 r7640 74 74 #include "./OutputRiftsx/OutputRiftsx.h" 75 75 #include "./PenaltyConstraintsx/PenaltyConstraintsx.h" 76 #include "./PointCloudFindNeighborsx/PointCloudFindNeighborsx.h" 76 77 #include "./PropagateFlagsFromConnectivityx/PropagateFlagsFromConnectivityx.h" 77 78 #include "./Qmux/Qmux.h" -
issm/trunk/src/c/objects/Bamg/Geometry.cpp
r6412 r7640 527 527 /*if there is a vertex found that is to close to vertices[i] -> error*/ 528 528 if( v && Norme1(v->r - vertices[i].r) < eps ){ 529 _error_("two points of the geometry are very closed to each other"); 529 //_error_("two points of the geometry are very closed to each other"); 530 printf("%g %g\n",v->ReferenceNumber,vertices[i].ReferenceNumber); 530 531 } 531 532 -
issm/trunk/src/c/objects/Elements/Tria.cpp
r7391 r7640 405 405 Ke=CreateKMatrixPrognostic(); 406 406 break; 407 case HydrologyAnalysisEnum: 408 Ke=CreateKMatrixHydrology(); 409 break; 407 410 case BalancedthicknessAnalysisEnum: 408 411 Ke=CreateKMatrixBalancedthickness(); … … 1182 1185 } 1183 1186 /*}}}*/ 1187 /*FUNCTION Tria::CreateKMatrixHydrology {{{1*/ 1188 ElementMatrix* Tria::CreateKMatrixHydrology(void){ 1189 1190 /*Constants*/ 1191 const int numdof=NDOF1*NUMVERTICES; 1192 1193 /*Intermediaries */ 1194 int i,j,ig; 1195 double Jdettria,dt; 1196 double xyz_list[NUMVERTICES][3]; 1197 double L[NUMVERTICES]; 1198 double dL[2][NUMVERTICES]; 1199 double dLx[NUMVERTICES]; 1200 double dLy[NUMVERTICES]; 1201 double K[2]; 1202 double Ke_gg_gaussian1[numdof][numdof] ={0.0}; 1203 double Ke_gg_gaussian2[numdof][numdof] ={0.0}; 1204 double Ke_gg_gaussian3[numdof][numdof] ={0.0}; 1205 double gamma; 1206 double DL_scalar1; 1207 double DL_scalar2; 1208 double DL_scalar3; 1209 GaussTria *gauss=NULL; 1210 1211 /*Initialize Element matrix*/ 1212 ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum); 1213 1214 /*Retrieve all inputs and parameters*/ 1215 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 1216 this->parameters->FindParam(&dt,DtEnum); 1217 1218 /*retrieve material parameters: */ 1219 gamma=matpar->GetGamma(); 1220 1221 /* Start looping on the number of gaussian points: */ 1222 gauss=new GaussTria(2); 1223 for (ig=gauss->begin();ig<gauss->end();ig++){ 1224 1225 gauss->GaussPoint(ig); 1226 1227 GetJacobianDeterminant2d(&Jdettria, &xyz_list[0][0],gauss); 1228 GetNodalFunctions(&L[0],gauss); 1229 GetNodalFunctionsDerivatives(&dL[0][0],&xyz_list[0][0],gauss); 1230 1231 for(i=0;i<NUMVERTICES;i++)dLx[i]=dL[0][i]; 1232 for(i=0;i<NUMVERTICES;i++)dLy[i]=dL[1][i]; 1233 1234 /*Get K parameter: */ 1235 GetHydrologyK(&K[0],&xyz_list[0][0],gauss); 1236 1237 if(dt){ 1238 DL_scalar1=gauss->weight*Jdettria; 1239 TripleMultiply( &L[0],1,numdof,1, 1240 &DL_scalar1,1,1,0, 1241 &L[0],1,numdof,0, 1242 &Ke_gg_gaussian1[0][0],0); 1243 } 1244 1245 if(dt){ 1246 DL_scalar2=-gauss->weight*Jdettria*gamma*K[0]*dt; //don't forget the - 1247 DL_scalar3=-gauss->weight*Jdettria*gamma*K[1]*dt; //don't forget the - 1248 1249 } 1250 else{ 1251 DL_scalar2=-gauss->weight*Jdettria*gamma*K[0]; //don't forget the - 1252 DL_scalar3=-gauss->weight*Jdettria*gamma*K[1]; //don't forget the - 1253 } 1254 1255 TripleMultiply( &dLx[0],1,numdof,1, &DL_scalar2,1,1,0, &L[0],1,numdof,0, &Ke_gg_gaussian2[0][0],0); 1256 TripleMultiply( &dLy[0],1,numdof,1, &DL_scalar3,1,1,0, &L[0],1,numdof,0, &Ke_gg_gaussian3[0][0],0); 1257 1258 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_gg_gaussian1[i][j]; 1259 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_gg_gaussian2[i][j]; 1260 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_gg_gaussian3[i][j]; 1261 } 1262 1263 /*Clean up and return*/ 1264 delete gauss; 1265 return Ke; 1266 } 1267 /*}}}*/ 1184 1268 /*FUNCTION Tria::CreateKMatrixPrognostic {{{1*/ 1185 1269 ElementMatrix* Tria::CreateKMatrixPrognostic(void){ … … 1530 1614 case PrognosticAnalysisEnum: 1531 1615 pe=CreatePVectorPrognostic(); 1616 break; 1617 case HydrologyAnalysisEnum: 1618 pe=CreatePVectorHydrology(); 1532 1619 break; 1533 1620 case BalancedthicknessAnalysisEnum: … … 2293 2380 } 2294 2381 /*}}}*/ 2382 /*FUNCTION Tria::CreatePVectorHydrology {{{1*/ 2383 ElementVector* Tria::CreatePVectorHydrology(void){ 2384 2385 /*Constants*/ 2386 const int numdof=NDOF1*NUMVERTICES; 2387 2388 /*Intermediaries */ 2389 int i,j,ig; 2390 double Jdettria,dt; 2391 double melting_g; 2392 double old_watercolumn_g; 2393 double xyz_list[NUMVERTICES][3]; 2394 double L[NUMVERTICES]; 2395 GaussTria* gauss=NULL; 2396 2397 /*Initialize Element vector*/ 2398 ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters); 2399 2400 /*Retrieve all inputs and parameters*/ 2401 GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES); 2402 this->parameters->FindParam(&dt,DtEnum); 2403 Input* melting_input=inputs->GetInput(MeltingRateEnum); _assert_(melting_input); 2404 Input* old_watercolumn_input=inputs->GetInput(OldWaterColumnEnum); _assert_(old_watercolumn_input); 2405 2406 /*Initialize melting_correction_g to 0, do not forget!:*/ 2407 /* Start looping on the number of gaussian points: */ 2408 gauss=new GaussTria(2); 2409 for(ig=gauss->begin();ig<gauss->end();ig++){ 2410 2411 gauss->GaussPoint(ig); 2412 2413 GetJacobianDeterminant2d(&Jdettria, &xyz_list[0][0],gauss); 2414 GetL(&L[0], &xyz_list[0][0], gauss,NDOF1); 2415 2416 melting_input->GetParameterValue(&melting_g,gauss); 2417 old_watercolumn_input->GetParameterValue(&old_watercolumn_g,gauss); 2418 2419 2420 2421 if(dt)for(i=0;i<numdof;i++) pe->values[i]+=Jdettria*gauss->weight*(old_watercolumn_g+dt*melting_g)*L[i]; 2422 else for(i=0;i<numdof;i++) pe->values[i]+=Jdettria*gauss->weight*melting_g*L[i]; 2423 2424 } 2425 2426 /*Clean up and return*/ 2427 delete gauss; 2428 return pe; 2429 } 2430 /*}}}*/ 2295 2431 /*FUNCTION Tria::CreatePVectorPrognostic_CG {{{1*/ 2296 2432 ElementVector* Tria::CreatePVectorPrognostic_CG(void){ … … 2895 3031 else if (analysis_type==DiagnosticHutterAnalysisEnum) 2896 3032 GetSolutionFromInputsDiagnosticHutter(solution); 3033 else if (analysis_type==HydrologyAnalysisEnum) 3034 GetSolutionFromInputsHydrology(solution); 2897 3035 else 2898 3036 _error_("analysis: %s not supported yet",EnumToString(analysis_type)); … … 2969 3107 values[i*NDOF2+0]=vx; 2970 3108 values[i*NDOF2+1]=vy; 3109 } 3110 3111 VecSetValues(solution,numdof,doflist,(const double*)values,INSERT_VALUES); 3112 3113 /*Free ressources:*/ 3114 delete gauss; 3115 xfree((void**)&doflist); 3116 } 3117 /*}}}*/ 3118 /*FUNCTION Tria::GetSolutionFromInputsHydrology{{{1*/ 3119 void Tria::GetSolutionFromInputsHydrology(Vec solution){ 3120 3121 const int numdof=NDOF1*NUMVERTICES; 3122 3123 int i,dummy; 3124 int* doflist=NULL; 3125 double watercolumn; 3126 double values[numdof]; 3127 GaussTria* gauss=NULL; 3128 3129 /*Get dof list: */ 3130 GetDofList(&doflist,NoneApproximationEnum,GsetEnum); 3131 3132 /*Get inputs*/ 3133 Input* watercolumn_input=inputs->GetInput(WaterColumnEnum); _assert_(watercolumn_input); 3134 3135 /*Ok, we have watercolumn values, fill in watercolumn array: */ 3136 /*P1 element only for now*/ 3137 gauss=new GaussTria(); 3138 for(i=0;i<NUMVERTICES;i++){ 3139 3140 gauss->GaussVertex(i); 3141 3142 /*Recover watercolumn*/ 3143 watercolumn_input->GetParameterValue(&watercolumn,gauss); 3144 values[i]=watercolumn; 3145 if((values[i])<0)values[i]=0; 2971 3146 } 2972 3147 … … 3015 3190 } 3016 3191 } 3192 } 3193 /*}}}*/ 3194 /*FUNCTION Tria::GetHydrologyK {{{1*/ 3195 void Tria::GetHydrologyK(double* K,double* xyz_list,GaussTria* gauss){ 3196 3197 3198 /*material parameters: */ 3199 double rho_ice; 3200 double rho_water; 3201 double g; 3202 double dsdx, dsdy; 3203 double dbdx, dbdy; 3204 double surface_slope; 3205 double kn; 3206 double w; 3207 3208 Input* surfaceslopex_input=NULL; 3209 Input* surfaceslopey_input=NULL; 3210 Input* bedslopex_input=NULL; 3211 Input* bedslopey_input=NULL; 3212 Input* watercolumn_input=NULL; 3213 3214 3215 /*recover parameters and inputs: */ 3216 rho_ice=matpar->GetRhoIce(); 3217 rho_water=matpar->GetRhoWater(); 3218 g=matpar->GetG(); 3219 kn=matpar->GetKn(); 3220 3221 surfaceslopex_input=inputs->GetInput(SurfaceSlopeXEnum); _assert_(surfaceslopex_input); 3222 surfaceslopey_input=inputs->GetInput(SurfaceSlopeYEnum); _assert_(surfaceslopey_input); 3223 bedslopex_input=inputs->GetInput(BedSlopeXEnum); _assert_(bedslopex_input); 3224 bedslopey_input=inputs->GetInput(BedSlopeYEnum); _assert_(bedslopey_input); 3225 watercolumn_input=inputs->GetInput(WaterColumnEnum); _assert_(watercolumn_input); 3226 3227 /*recover slopes: */ 3228 surfaceslopex_input->GetParameterValue(&dsdx,gauss); 3229 surfaceslopey_input->GetParameterValue(&dsdy,gauss); 3230 bedslopex_input->GetParameterValue(&dbdx,gauss); 3231 bedslopey_input->GetParameterValue(&dbdy,gauss); 3232 3233 /*magnitude of surface slope: */ 3234 surface_slope=sqrt( pow(dsdx,2) + pow(dsdy,2)); 3235 3236 /*recover water column: */ 3237 watercolumn_input->GetParameterValue(&w,gauss); 3238 3239 K[0]=pow(w,2)*(rho_ice*g*dsdx+(rho_water/rho_ice-1)*rho_ice*g*dbdx) - rho_ice * g * kn* w * (dsdx - dbdx ) * surface_slope; 3240 K[1]=pow(w,2)*(rho_ice*g*dsdy+(rho_water/rho_ice-1)*rho_ice*g*dbdy) - rho_ice * g * kn *w * (dsdy - dbdy ) * surface_slope; 3241 3017 3242 } 3018 3243 /*}}}*/ … … 3662 3887 this->inputs->AddInput(new TriaVertexInput(MeltingRateCorrectionEnum,nodeinputs)); 3663 3888 } 3889 if (iomodel->watercolumn){ 3890 for(i=0;i<3;i++)nodeinputs[i]=iomodel->watercolumn[tria_vertex_ids[i]-1]; 3891 this->inputs->AddInput(new TriaVertexInput(WaterColumnEnum,nodeinputs)); 3892 this->inputs->AddInput(new TriaVertexInput(OldWaterColumnEnum,nodeinputs)); 3893 } 3894 3664 3895 if (iomodel->accumulation_rate) { 3665 3896 for(i=0;i<3;i++)nodeinputs[i]=iomodel->accumulation_rate[tria_vertex_ids[i]-1]/iomodel->yts; … … 3792 4023 InputUpdateFromSolutionPrognostic(solution); 3793 4024 break; 4025 case HydrologyAnalysisEnum: 4026 InputUpdateFromSolutionHydrology(solution); 4027 break; 3794 4028 case BalancedthicknessAnalysisEnum: 3795 4029 InputUpdateFromSolutionOneDof(solution,ThicknessEnum); … … 4100 4334 } 4101 4335 /*}}}*/ 4336 /*FUNCTION Tria::InputUpdateFromSolutionHydrology{{{1*/ 4337 void Tria::InputUpdateFromSolutionHydrology(double* solution){ 4338 4339 /*Intermediaries*/ 4340 const int numdof = NDOF1*NUMVERTICES; 4341 4342 int i; 4343 int* doflist=NULL; 4344 double values[numdof]; 4345 4346 /*Get dof list: */ 4347 GetDofList(&doflist,NoneApproximationEnum,GsetEnum); 4348 4349 /*Use the dof list to index into the solution vector: */ 4350 for(i=0;i<numdof;i++){ 4351 values[i]=solution[doflist[i]]; 4352 if(isnan(values[i])) _error_("NaN found in solution vector"); 4353 //if (values[i]<pow(10,-10))values[i]=pow(10,-10); 4354 } 4355 4356 /*Now, we have to move the previous WaterColumn input to Picard 4357 * status, otherwise, we'll wipe them off: */ 4358 this->inputs->ChangeEnum(WaterColumnEnum,PicardWaterColumnEnum); 4359 4360 /*Add input to the element: */ 4361 this->inputs->AddInput(new TriaVertexInput(WaterColumnEnum,values)); 4362 4363 /*Free ressources:*/ 4364 xfree((void**)&doflist); 4365 } 4366 /*}}}*/ 4102 4367 /*FUNCTION Tria::InputUpdateFromVector(double* vector, int name, int type);{{{1*/ 4103 4368 void Tria::InputUpdateFromVector(double* vector, int name, int type){ … … 4233 4498 name==SurfaceSlopeYEnum || 4234 4499 name==MeltingRateEnum || 4500 name==WaterColumnEnum || 4235 4501 name==AccumulationRateEnum || 4236 4502 name==SurfaceAreaEnum|| -
issm/trunk/src/c/objects/Elements/Tria.h
r7391 r7640 154 154 ElementMatrix* CreateKMatrixDiagnosticVertSurface(void); 155 155 ElementMatrix* CreateKMatrixMelting(void); 156 ElementMatrix* CreateKMatrixHydrology(void); 156 157 ElementMatrix* CreateKMatrixPrognostic(void); 157 158 ElementMatrix* CreateKMatrixPrognostic_CG(void); … … 169 170 ElementVector* CreatePVectorAdjointBalancedthickness(void); 170 171 ElementVector* CreatePVectorDiagnosticHutter(void); 172 ElementVector* CreatePVectorHydrology(void); 171 173 ElementVector* CreatePVectorPrognostic(void); 172 174 ElementVector* CreatePVectorPrognostic_CG(void); … … 185 187 void GetSolutionFromInputsDiagnosticHoriz(Vec solution); 186 188 void GetSolutionFromInputsDiagnosticHutter(Vec solution); 189 void GetSolutionFromInputsHydrology(Vec solution); 187 190 void GetStrainRate2d(double* epsilon,double* xyz_list, GaussTria* gauss, Input* vx_input, Input* vy_input); 188 191 void GradjDragStokes(Vec gradient); … … 193 196 void InputUpdateFromSolutionOneDof(double* solution,int enum_type); 194 197 void InputUpdateFromSolutionPrognostic(double* solution); 198 void InputUpdateFromSolutionHydrology(double* solution); 195 199 bool IsInput(int name); 196 200 void SetClone(int* minranks); 197 201 void SurfaceNormal(double* surface_normal, double xyz_list[3][3]); 202 void GetHydrologyK(double* K,double* xyz_list,GaussTria* gauss); 198 203 /*}}}*/ 199 204 -
issm/trunk/src/c/objects/IoModel.cpp
r7444 r7640 80 80 xfree((void**)&this->spcvelocity); 81 81 xfree((void**)&this->spcthickness); 82 xfree((void**)&this->spcwatercolumn); 82 83 xfree((void**)&this->spctemperature); 83 84 xfree((void**)&this->edges); 84 85 xfree((void**)&this->geothermalflux); 85 86 xfree((void**)&this->melting_rate); 87 xfree((void**)&this->watercolumn); 86 88 xfree((void**)&this->melting_rate_correction); 87 89 xfree((void**)&this->accumulation_rate); … … 199 201 /*!Get thermal parameters: */ 200 202 IoModelFetchData(&this->beta,iomodel_handle,"beta"); 203 IoModelFetchData(&this->gamma,iomodel_handle,"gamma"); 204 IoModelFetchData(&this->kn,iomodel_handle,"kn"); 201 205 IoModelFetchData(&this->meltingpoint,iomodel_handle,"meltingpoint"); 202 206 IoModelFetchData(&this->latentheat,iomodel_handle,"latentheat"); … … 274 278 this->gl_melting_rate=0; 275 279 this->melting_rate=NULL; 280 this->watercolumn=NULL; 276 281 this->melting_rate_correction=NULL; 277 282 this->melting_rate_correction_apply=0; … … 306 311 this-> spctemperature=NULL; 307 312 this-> spcthickness=NULL; 313 this-> spcwatercolumn=NULL; 308 314 this->numberofedges=0; 309 315 this->edges=NULL; -
issm/trunk/src/c/objects/IoModel.h
r7444 r7640 103 103 double* spctemperature; 104 104 double* spcthickness; 105 double* spcwatercolumn; 105 106 double* geothermalflux; 106 107 int numberofedges; … … 163 164 /*thermal parameters: */ 164 165 double beta; 166 double gamma; 167 double kn; 165 168 double meltingpoint; 166 169 double latentheat; … … 182 185 /*basal: */ 183 186 double* melting_rate; 187 double* watercolumn; 184 188 double gl_melting_rate; 185 189 double* melting_rate_correction; -
issm/trunk/src/c/objects/Materials/Matpar.cpp
r5320 r7640 35 35 double matpar_thermal_exchange_velocity; 36 36 double matpar_g; 37 double matpar_gamma; 38 double matpar_kn; 37 39 38 40 matpar_g=iomodel->g; … … 46 48 matpar_mixed_layer_capacity=iomodel->mixed_layer_capacity; 47 49 matpar_thermal_exchange_velocity=iomodel->thermal_exchange_velocity; 50 matpar_gamma=iomodel->gamma; 51 matpar_kn=iomodel->kn; 48 52 49 53 this->mid=matpar_mid; … … 58 62 this->thermal_exchange_velocity=matpar_thermal_exchange_velocity; 59 63 this->g=matpar_g; 64 this->gamma=matpar_gamma; 65 this->kn=matpar_kn; 60 66 61 67 } … … 83 89 printf(" thermal_exchange_velocity: %g\n",thermal_exchange_velocity); 84 90 printf(" g: %g\n",g); 91 printf(" gamma: %g\n",gamma); 92 printf(" kn: %g\n",kn); 85 93 return; 86 94 } … … 101 109 printf(" thermal_exchange_velocity: %g\n",thermal_exchange_velocity); 102 110 printf(" g: %g\n",g); 111 printf(" gamma: %g\n",gamma); 112 printf(" kn: %g\n",kn); 103 113 return; 104 114 } … … 140 150 memcpy(marshalled_dataset,&thermal_exchange_velocity,sizeof(thermal_exchange_velocity));marshalled_dataset+=sizeof(thermal_exchange_velocity); 141 151 memcpy(marshalled_dataset,&g,sizeof(g));marshalled_dataset+=sizeof(g); 152 memcpy(marshalled_dataset,&gamma,sizeof(gamma));marshalled_dataset+=sizeof(gamma); 153 memcpy(marshalled_dataset,&kn,sizeof(kn));marshalled_dataset+=sizeof(kn); 142 154 143 155 *pmarshalled_dataset=marshalled_dataset; … … 159 171 sizeof(thermal_exchange_velocity)+ 160 172 sizeof(g)+ 173 sizeof(gamma)+ 174 sizeof(kn)+ 161 175 sizeof(int); //sizeof(int) for enum type 162 176 } … … 184 198 memcpy(&thermal_exchange_velocity,marshalled_dataset,sizeof(thermal_exchange_velocity));marshalled_dataset+=sizeof(thermal_exchange_velocity); 185 199 memcpy(&g,marshalled_dataset,sizeof(g));marshalled_dataset+=sizeof(g); 200 memcpy(&gamma,marshalled_dataset,sizeof(gamma));marshalled_dataset+=sizeof(gamma); 201 memcpy(&kn,marshalled_dataset,sizeof(kn));marshalled_dataset+=sizeof(kn); 186 202 187 203 /*return: */ … … 359 375 } 360 376 /*}}}1*/ 361 362 377 /*FUNCTION Matpar::GetGamma {{{1*/ 378 double Matpar::GetGamma(){ 379 return gamma; 380 } 381 /*}}}1*/ 382 /*FUNCTION Matpar::GetKn {{{1*/ 383 double Matpar::GetKn(){ 384 return kn; 385 } 386 /*}}}1*/ -
issm/trunk/src/c/objects/Materials/Matpar.h
r6412 r7640 26 26 double thermal_exchange_velocity; 27 27 double g; 28 /*hydrology: */ 29 double kn; 30 double gamma; 28 31 29 32 public: … … 73 76 double GetBeta(); 74 77 double GetMeltingPoint(); 78 double GetGamma(); 79 double GetKn(); 75 80 /*}}}*/ 76 81 -
issm/trunk/src/c/solutions/CorePointerFromSolutionEnum.cpp
r7307 r7640 58 58 solutioncore=&groundinglinemigration2d_core; 59 59 break; 60 60 case HydrologySolutionEnum: 61 solutioncore=&hydrology_core; 62 break; 61 63 default: 62 64 _error_("%s%s%s"," solution type: ",EnumToString(solutiontype)," not supported yet!"); -
issm/trunk/src/c/solutions/SolutionConfiguration.cpp
r7307 r7640 59 59 analyses[0]=ThermalAnalysisEnum; 60 60 analyses[1]=MeltingAnalysisEnum; 61 break; 62 63 case HydrologySolutionEnum: 64 numanalyses=3; 65 analyses=(int*)xmalloc(numanalyses*sizeof(int)); 66 analyses[0]=HydrologyAnalysisEnum; 67 analyses[1]=SurfaceSlopeAnalysisEnum; 68 analyses[2]=BedSlopeAnalysisEnum; 61 69 break; 62 70 -
issm/trunk/src/c/solutions/solutions.h
r7307 r7640 17 17 void gradient_core(FemModel* femmodel,int step=0, double search_scalar=0); 18 18 void diagnostic_core(FemModel* femmodel); 19 void hydrology_core(FemModel* femmodel); 20 void hydrology_core_step(FemModel* femmodel,int step, double time); 19 21 void thermal_core(FemModel* femmodel); 20 22 void thermal_core_step(FemModel* femmodel,int step, double time);
Note:
See TracChangeset
for help on using the changeset viewer.