Changeset 10373
- Timestamp:
- 10/31/11 11:26:22 (13 years ago)
- Location:
- issm/trunk/src/c/objects/Elements
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Element.h
r10372 r10373 68 68 virtual void ShelfSync()=0; 69 69 virtual void PotentialSheetUngrounding(Vec potential_sheet_ungrounding)=0; 70 virtual void MigrateGroundingline()=0;71 70 virtual int UpdatePotentialSheetUngrounding(double* potential_sheet_ungrounding,Vec vec_nodes_on_iceshelf,double* nodes_on_iceshelf)=0; 72 71 -
issm/trunk/src/c/objects/Elements/Penta.cpp
r10372 r10373 2046 2046 2047 2047 }/*}}}*/ 2048 /*FUNCTION Penta::MigrateGroundingline{{{1*/2049 void Penta::MigrateGroundingline(void){2050 _error_("not supported yet!");2051 }2052 /*}}}*/2053 2048 /*FUNCTION Penta::MinEdgeLength{{{1*/ 2054 2049 double Penta::MinEdgeLength(double xyz_list[6][3]){ -
issm/trunk/src/c/objects/Elements/Penta.h
r10372 r10373 108 108 void RequestedOutput(int output_enum,int step,double time); 109 109 void ListResultsEnums(int** results_enums,int* num_results); 110 void MigrateGroundingline();111 110 void PatchFill(int* pcount, Patch* patch); 112 111 void PatchSize(int* pnumrows, int* pnumvertices,int* pnumnodes); -
issm/trunk/src/c/objects/Elements/Tria.cpp
r10372 r10373 1971 1971 this->inputs->AddInput(new TriaVertexInput(SurfaceEnum,&s[0])); 1972 1972 this->inputs->AddInput(new TriaVertexInput(BedEnum,&b[0])); 1973 }1974 /*}}}*/1975 /*FUNCTION Tria::MigrateGroundingline{{{1*/1976 void Tria::MigrateGroundingline(void){1977 1978 double *values = NULL;1979 double h[3],s[3],b[3],ba[3];1980 double bed_hydro;1981 double rho_water,rho_ice,density;1982 int isonshelf[3];1983 int i;1984 bool elementonshelf = false;1985 1986 /*Recover info at the vertices: */1987 GetInputListOnVertices(&h[0],ThicknessEnum);1988 GetInputListOnVertices(&s[0],SurfaceEnum);1989 GetInputListOnVertices(&b[0],BedEnum);1990 GetInputListOnVertices(&ba[0],BathymetryEnum);1991 for(i=0;i<3;i++){1992 isonshelf[i]=nodes[i]->IsFloating();1993 if((nodes[i]->Sid()+1)==36)printf("MigrateGroundingline: El %i Node %i shelf status %i\n",this->Id(),nodes[i]->Sid()+1,isonshelf[i]);1994 }1995 1996 /*material parameters: */1997 rho_water=matpar->GetRhoWater();1998 rho_ice=matpar->GetRhoIce();1999 density=rho_ice/rho_water;2000 2001 /*go through vertices, and update inputs, considering them to be TriaVertex type: */2002 for(i=0;i<3;i++){2003 if (isonshelf[i]){2004 /*This node is on the shelf. See if its bed is going under the bathymetry: */2005 if(b[i]<=ba[i]){ //<= because Neff being 0 when b=ba, drag will be 0 anyway.2006 /*The ice shelf is getting grounded, the thickness is the same, so just update the bed to stick to the bathymetry and elevate the surface accordingly: */2007 b[i]=ba[i];2008 s[i]=b[i]+h[i];2009 }2010 else{2011 /*do nothing, we are still floating.*/2012 }2013 }2014 else{2015 /*This node is on the sheet, near the grounding line. See if wants to unground. To2016 * do so, we compute the hydrostatic bed, and if it is > bathymetry, then we unground: */2017 bed_hydro=-density*h[i];2018 if (bed_hydro>ba[i]){2019 /*We are now floating, bed and surface are determined from hydrostatic equilibrium: */2020 s[i]=(1-density)*h[i];2021 b[i]=-density*h[i];2022 }2023 else{2024 /*do nothing, we are still grounded.*/2025 }2026 }2027 }2028 2029 /*Surface and bed are updated. Update inputs:*/2030 this->inputs->AddInput(new TriaVertexInput(SurfaceEnum,&s[0]));2031 this->inputs->AddInput(new TriaVertexInput(BedEnum,&b[0]));2032 2033 for(i=0;i<3;i++) isonshelf[i]=nodes[i]->IsFloating();2034 1973 } 2035 1974 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Tria.h
r10372 r10373 105 105 void ShelfSync(); 106 106 void PotentialSheetUngrounding(Vec potential_sheet_ungrounding); 107 void MigrateGroundingline();108 107 void RequestedOutput(int output_enum,int step,double time); 109 108 void ListResultsEnums(int** results_enums,int* num_results);
Note:
See TracChangeset
for help on using the changeset viewer.