Changeset 1717
- Timestamp:
- 08/17/09 10:53:04 (16 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Icefront.cpp
r1628 r1717 366 366 /*Recover material and fill parameters: */ 367 367 matpar=(Matpar*)element->GetMatPar(); 368 fill=element->GetShelf(); 368 if (element->GetShelf())fill=WaterEnum(); 369 else fill=AirEnum(); 369 370 370 371 //check that the element is onbed (collapsed formulation) otherwise:pe=0 … … 493 494 /*Recover material and fill parameters: */ 494 495 matpar=(Matpar*)element->GetMatPar(); 495 fill=element->GetShelf(); 496 if (element->GetShelf())fill=WaterEnum(); 497 else fill=AirEnum(); 496 498 497 499 /* Set pe_g to 0: */ … … 655 657 /*Recover material and fill parameters: */ 656 658 matpar=(Matpar*)element->GetMatPar(); 657 fill=element->GetShelf(); 659 if (element->GetShelf())fill=WaterEnum(); 660 else fill=AirEnum(); 658 661 659 662 /* Set pe_g to 0: */ … … 865 868 bed=b1*(1+segment_gauss_coord[ig])/2+b2*(1-segment_gauss_coord[ig])/2; 866 869 867 if (fill== 1){870 if (fill==WaterEnum()){ 868 871 //icefront ends in water: 869 872 ice_pressure=1.0/2.0*gravity*rho_ice*pow(thickness,2); … … 875 878 water_pressure=1.0/2.0*gravity*rho_water*(pow(surface_under_water,2) - pow(base_under_water,2)); 876 879 } 877 else if (fill== 0){880 else if (fill==AirEnum()){ 878 881 ice_pressure=1.0/2.0*gravity*rho_ice*pow(thickness,2); 879 882 air_pressure=0; … … 1129 1132 1130 1133 //Now deal with water pressure: 1131 if(fill== 1){ //icefront ends in water1134 if(fill==WaterEnum()){ //icefront ends in water 1132 1135 water_level_above_g_tria=min(0,z_g[i]);//0 if the gaussian point is above water level 1133 1136 water_pressure_tria=rho_water*gravity*water_level_above_g_tria; 1134 1137 } 1135 else if(fill== 0){1138 else if(fill==AirEnum()){ 1136 1139 water_pressure_tria=0; 1137 1140 } … … 1378 1381 1379 1382 //Now deal with water pressure: 1380 if(fill== 1){ //icefront ends in water1383 if(fill==WaterEnum()){ //icefront ends in water 1381 1384 water_level_above_g_tria=min(0,z_g[i]);//0 if the gaussian point is above water level 1382 1385 water_pressure_tria=rho_water*gravity*water_level_above_g_tria; 1383 1386 } 1384 else if(fill== 0){1387 else if(fill==AirEnum()){ 1385 1388 water_pressure_tria=0; 1386 1389 } -
issm/trunk/src/c/objects/Riftfront.cpp
r1628 r1717 23 23 } 24 24 25 Riftfront::Riftfront(char riftfront_type[RIFTFRONTSTRING],int riftfront_id, int riftfront_node_ids[MAX_RIFTFRONT_GRIDS], int riftfront_mparid, double riftfront_h[MAX_RIFTFRONT_GRIDS],double riftfront_b[MAX_RIFTFRONT_GRIDS],double riftfront_s[MAX_RIFTFRONT_GRIDS],double riftfront_normal[2],double riftfront_length,int riftfront_fill,double riftfront_friction, double riftfront_penalty_offset, boolriftfront_penalty_lock, bool riftfront_active,int riftfront_counter,bool riftfront_prestable,bool riftfront_shelf){25 Riftfront::Riftfront(char riftfront_type[RIFTFRONTSTRING],int riftfront_id, int riftfront_node_ids[MAX_RIFTFRONT_GRIDS], int riftfront_mparid, double riftfront_h[MAX_RIFTFRONT_GRIDS],double riftfront_b[MAX_RIFTFRONT_GRIDS],double riftfront_s[MAX_RIFTFRONT_GRIDS],double riftfront_normal[2],double riftfront_length,int riftfront_fill,double riftfront_friction, double riftfront_penalty_offset, int riftfront_penalty_lock, bool riftfront_active,int riftfront_counter,bool riftfront_prestable,bool riftfront_shelf){ 26 26 27 27 int i; … … 445 445 446 446 /*Ok, now compute the pressure (in norm) that is being applied to the flanks, depending on the type of fill: */ 447 if(fill==W ATERFILL){447 if(fill==WaterEnum()){ 448 448 if(shelf){ 449 449 /*We are on an ice shelf, hydrostatic equilibrium is used to determine the pressure for water fill: */ … … 455 455 } 456 456 } 457 else if(fill==A IRFILL){457 else if(fill==AirEnum()){ 458 458 pressure=rho_ice*gravity*pow(thickness,(double)2)/(double)2; //icefront on an ice sheet, pressure imbalance ice vs air. 459 459 } 460 else if(fill==I CEFILL){ //icefront finding itself against another icefront (pressure imbalance is fully compensated, ice vs ice)460 else if(fill==IceEnum()){ //icefront finding itself against another icefront (pressure imbalance is fully compensated, ice vs ice) 461 461 pressure=0; 462 462 } … … 590 590 /*Activate or deactivate penalties: */ 591 591 if(penetration<0){ 592 printf("riftfront %i is penetrating\n",this->GetId()); 592 593 /*There is penetration, we need to active the penalty so this penetration will be NULL: */ 593 594 activate=1; -
issm/trunk/src/c/objects/Riftfront.h
r1628 r1717 14 14 #define MAX_RIFTFRONT_GRIDS 2 //max number of grids on a rift flank, only 2 because 2d for now. 15 15 #define RIFTFRONTSTRING 20 //max string length 16 17 /*Types of rift filling: */18 #define WATERFILL 119 #define AIRFILL 220 #define ICEFILL 321 16 22 17 class Element; … … 49 44 50 45 double penalty_offset; 51 boolpenalty_lock;46 int penalty_lock; 52 47 53 48 /*computational: */ … … 60 55 61 56 Riftfront(); 62 Riftfront(char type[RIFTFRONTSTRING],int id, int node_ids[MAX_RIFTFRONT_GRIDS], int mparid, double h[MAX_RIFTFRONT_GRIDS],double b[MAX_RIFTFRONT_GRIDS],double s[MAX_RIFTFRONT_GRIDS],double normal[2],double length,int fill,double friction, double penalty_offset, boolpenalty_lock,bool active,int counter,bool prestable,bool shelf);57 Riftfront(char type[RIFTFRONTSTRING],int id, int node_ids[MAX_RIFTFRONT_GRIDS], int mparid, double h[MAX_RIFTFRONT_GRIDS],double b[MAX_RIFTFRONT_GRIDS],double s[MAX_RIFTFRONT_GRIDS],double normal[2],double length,int fill,double friction, double penalty_offset, int penalty_lock,bool active,int counter,bool prestable,bool shelf); 63 58 ~Riftfront(); 64 59 -
issm/trunk/src/m/classes/public/presolve.m
r1631 r1717 6 6 7 7 %first, deal with rifts. 8 if is nan(md.rifts),8 if isempty(md.rifts) | isnans(md.rifts), 9 9 md.numrifts=0; 10 10 else -
issm/trunk/src/mex/TriMeshProcessRifts/TriMeshProcessRifts.cpp
r1 r1717 285 285 /*Friction and fill: set to 0 both */ 286 286 mxSetField(pmxa_array,i,"friction",mxCreateDoubleScalar(0)); 287 mxSetField(pmxa_array,i,"fill",mxCreateDoubleScalar( 1)); //default is water287 mxSetField(pmxa_array,i,"fill",mxCreateDoubleScalar(WaterEnum())); //default is water 288 288 289 289
Note:
See TracChangeset
for help on using the changeset viewer.