Changeset 14378
- Timestamp:
- 02/23/13 11:37:39 (12 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/objects/Elements/Element.h
r14159 r14378 73 73 virtual IssmDouble TimeAdapt()=0; 74 74 virtual void MigrateGroundingLine(IssmDouble* old_floating_ice,IssmDouble* sheet_ungrounding)=0; 75 virtual void Potential SheetUngrounding(Vector<IssmDouble>* potential_sheet_ungrounding)=0;75 virtual void PotentialUngrounding(Vector<IssmDouble>* potential_sheet_ungrounding)=0; 76 76 virtual void PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm)=0; 77 77 virtual void Delta18oParameterization(void)=0; 78 78 virtual void SmbGradients()=0; 79 virtual int UpdatePotential SheetUngrounding(IssmDouble* potential_sheet_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf)=0;79 virtual int UpdatePotentialUngrounding(IssmDouble* potential_sheet_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf)=0; 80 80 virtual void ResetCoordinateSystem()=0; 81 81 virtual void SmearFunction(Vector<IssmDouble>* smearedvector,IssmDouble (*WeightFunction)(IssmDouble distance,IssmDouble radius),IssmDouble radius)=0; -
issm/trunk-jpl/src/c/classes/objects/Elements/Penta.cpp
r14175 r14378 2159 2159 2160 2160 int i,migration_style,unground; 2161 bool elementonshelf= false;2161 bool floatingelement = false; 2162 2162 IssmDouble bed_hydro,yts,gl_melting_rate; 2163 2163 IssmDouble rho_water,rho_ice,density; … … 2215 2215 for(i=0;i<NUMVERTICES;i++){ 2216 2216 if(nodes[i]->IsFloating()){ 2217 elementonshelf=true;2217 floatingelement=true; 2218 2218 break; 2219 2219 } … … 2221 2221 2222 2222 /*Add basal melting rate if element just ungrounded*/ 2223 if(!this->IsFloating() && elementonshelf==true){2223 if(!this->IsFloating() && floatingelement==true){ 2224 2224 for(i=0;i<NUMVERTICES;i++)melting[i]=gl_melting_rate/yts; 2225 2225 this->inputs->AddInput(new PentaP1Input(BasalforcingsMeltingRateEnum,&melting[0])); … … 2229 2229 this->inputs->AddInput(new PentaP1Input(SurfaceEnum,&s[0])); 2230 2230 this->inputs->AddInput(new PentaP1Input(BedEnum,&b[0])); 2231 this->inputs->AddInput(new BoolInput(MaskElementonfloatingiceEnum, elementonshelf));2231 this->inputs->AddInput(new BoolInput(MaskElementonfloatingiceEnum,floatingelement)); 2232 2232 2233 2233 /*Extrude inputs*/ … … 2391 2391 } 2392 2392 /*}}}*/ 2393 /*FUNCTION Penta::Potential SheetUngrounding{{{*/2394 void Penta::Potential SheetUngrounding(Vector<IssmDouble>* potential_sheet_ungrounding){2393 /*FUNCTION Penta::PotentialUngrounding{{{*/ 2394 void Penta::PotentialUngrounding(Vector<IssmDouble>* potential_ungrounding){ 2395 2395 2396 2396 int i; … … 2398 2398 IssmDouble bed_hydro; 2399 2399 IssmDouble rho_water,rho_ice,density; 2400 bool elementonshelf = false;2401 2400 2402 2401 /*material parameters: */ … … 2414 2413 if (bed_hydro>ba[i]){ 2415 2414 /*Vertex that could potentially unground, flag it*/ 2416 potential_ sheet_ungrounding->SetValue(nodes[i]->Sid(),1,INS_VAL);2415 potential_ungrounding->SetValue(nodes[i]->Sid(),1,INS_VAL); 2417 2416 } 2418 2417 } … … 3013 3012 } 3014 3013 /*}}}*/ 3015 /*FUNCTION Penta::UpdatePotential SheetUngrounding{{{*/3016 int Penta::UpdatePotential SheetUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf){3014 /*FUNCTION Penta::UpdatePotentialUngrounding{{{*/ 3015 int Penta::UpdatePotentialUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf){ 3017 3016 3018 3017 int i; 3019 3018 int nflipped=0; 3020 3019 3021 /*Go through nodes, and whoever is on the potential_ sheet_ungrounding, ends up in nodes_on_iceshelf: */3020 /*Go through nodes, and whoever is on the potential_ungrounding, ends up in nodes_on_iceshelf: */ 3022 3021 for(i=0;i<NUMVERTICES;i++){ 3023 3022 if (reCast<bool,IssmDouble>(vertices_potentially_ungrounding[nodes[i]->Sid()])){ -
issm/trunk-jpl/src/c/classes/objects/Elements/Penta.h
r14159 r14378 105 105 void InputToResult(int enum_type,int step,IssmDouble time); 106 106 void MigrateGroundingLine(IssmDouble* old_floating_ice,IssmDouble* sheet_ungrounding); 107 void Potential SheetUngrounding(Vector<IssmDouble>* potential_sheet_ungrounding);107 void PotentialUngrounding(Vector<IssmDouble>* potential_sheet_ungrounding); 108 108 void RequestedOutput(int output_enum,int step,IssmDouble time); 109 109 void ListResultsInfo(int** results_enums,int** results_size,IssmDouble** results_times,int** results_steps,int* num_results); … … 116 116 IssmDouble SurfaceArea(void); 117 117 void Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type); 118 int UpdatePotential SheetUngrounding(IssmDouble* potential_sheet_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf);118 int UpdatePotentialUngrounding(IssmDouble* potential_sheet_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf); 119 119 int NodalValue(IssmDouble* pvalue, int index, int natureofdataenum,bool process_units); 120 120 IssmDouble TimeAdapt(); -
issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp
r14373 r14378 2139 2139 2140 2140 int i,migration_style; 2141 bool elementonshelf= false;2142 bool elementonsheet = false;2141 bool floatingelement = false; 2142 bool groundedelement = false; 2143 2143 IssmDouble bed_hydro,yts,gl_melting_rate; 2144 2144 IssmDouble rho_water,rho_ice,density; … … 2199 2199 for(i=0;i<NUMVERTICES;i++){ 2200 2200 if(nodes[i]->IsGrounded()){ 2201 elementonsheet=true;2201 groundedelement=true; 2202 2202 break; 2203 2203 } 2204 2204 } 2205 elementonshelf=!elementonsheet;2205 floatingelement=!groundedelement; 2206 2206 } 2207 2207 else{ … … 2209 2209 for(i=0;i<NUMVERTICES;i++){ 2210 2210 if(nodes[i]->IsFloating()){ 2211 elementonshelf=true;2211 floatingelement=true; 2212 2212 break; 2213 2213 } … … 2216 2216 2217 2217 /*Add basal melting rate if element just ungrounded*/ 2218 if(!this->IsFloating() && elementonshelf==true){2218 if(!this->IsFloating() && floatingelement==true){ 2219 2219 for(i=0;i<NUMVERTICES;i++)melting[i]=gl_melting_rate/yts; 2220 2220 this->inputs->AddInput(new TriaP1Input(BasalforcingsMeltingRateEnum,&melting[0])); … … 2222 2222 2223 2223 /*Update inputs*/ 2224 this->inputs->AddInput(new BoolInput(MaskElementonfloatingiceEnum, elementonshelf));2224 this->inputs->AddInput(new BoolInput(MaskElementonfloatingiceEnum,floatingelement)); 2225 2225 this->inputs->AddInput(new TriaP1Input(SurfaceEnum,&s[0])); 2226 2226 this->inputs->AddInput(new TriaP1Input(BedEnum,&b[0])); … … 2317 2317 } 2318 2318 /*}}}*/ 2319 /*FUNCTION Tria::Potential SheetUngrounding{{{*/2320 void Tria::Potential SheetUngrounding(Vector<IssmDouble>* potential_sheet_ungrounding){2319 /*FUNCTION Tria::PotentialUngrounding{{{*/ 2320 void Tria::PotentialUngrounding(Vector<IssmDouble>* potential_ungrounding){ 2321 2321 2322 2322 int i; … … 2324 2324 IssmDouble bed_hydro; 2325 2325 IssmDouble rho_water,rho_ice,density; 2326 bool elementonshelf = false;2327 2326 2328 2327 /*material parameters: */ … … 2333 2332 GetInputListOnVertices(&ba[0],BathymetryEnum); 2334 2333 2335 /*go through vertices, and figure out which ones are on the ice sheet,and want to unground: */2334 /*go through vertices, and figure out which ones are grounded and want to unground: */ 2336 2335 for(i=0;i<NUMVERTICES;i++){ 2337 2336 /*Find if grounded vertices want to start floating*/ … … 2340 2339 if (bed_hydro>ba[i]){ 2341 2340 /*Vertex that could potentially unground, flag it*/ 2342 potential_ sheet_ungrounding->SetValue(nodes[i]->Sid(),1,INS_VAL);2341 potential_ungrounding->SetValue(nodes[i]->Sid(),1,INS_VAL); 2343 2342 } 2344 2343 } … … 2702 2701 } 2703 2702 /*}}}*/ 2704 /*FUNCTION Tria::UpdatePotential SheetUngrounding{{{*/2705 int Tria::UpdatePotential SheetUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf){2703 /*FUNCTION Tria::UpdatePotentialUngrounding{{{*/ 2704 int Tria::UpdatePotentialUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf){ 2706 2705 2707 2706 int i; 2708 2707 int nflipped=0; 2709 2708 2710 /*Go through nodes, and whoever is on the potential_ sheet_ungrounding, ends up in nodes_on_iceshelf: */2709 /*Go through nodes, and whoever is on the potential_ungrounding, ends up in nodes_on_iceshelf: */ 2711 2710 for(i=0;i<3;i++){ 2712 2711 if (reCast<bool>(vertices_potentially_ungrounding[nodes[i]->Sid()])){ -
issm/trunk-jpl/src/c/classes/objects/Elements/Tria.h
r14359 r14378 105 105 void MigrateGroundingLine(IssmDouble* oldfloating,IssmDouble* sheet_ungrounding); 106 106 int NodalValue(IssmDouble* pvalue, int index, int natureofdataenum,bool process_units); 107 void Potential SheetUngrounding(Vector<IssmDouble>* potential_sheet_ungrounding);107 void PotentialUngrounding(Vector<IssmDouble>* potential_sheet_ungrounding); 108 108 void PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm); 109 109 void RequestedOutput(int output_enum,int step,IssmDouble time); … … 116 116 IssmDouble SurfaceArea(void); 117 117 void Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type); 118 int UpdatePotential SheetUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf);118 int UpdatePotentialUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf); 119 119 IssmDouble TimeAdapt(); 120 120 int* GetHorizontalNeighboorSids(void); -
issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp
r14357 r14378 31 31 if(migration_style==SoftMigrationEnum){ 32 32 /*Create flag for grounded vertices above the hydrostatic equilibrium: */ 33 vertices_potentially_ungrounding=Potential SheetUngrounding(elements,vertices,parameters);33 vertices_potentially_ungrounding=PotentialUngrounding(elements,vertices,parameters); 34 34 35 35 /*propagate ice shelf into connex areas of the ice sheet that potentially want to unground: */ … … 81 81 } 82 82 /*%}}}*/ 83 /*FUNCTION Potential SheetUngrounding {{{*/84 IssmDouble* Potential SheetUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters){83 /*FUNCTION PotentialUngrounding {{{*/ 84 IssmDouble* PotentialUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters){ 85 85 86 86 int i,numberofvertices; … … 96 96 for(i=0;i<elements->Size();i++){ 97 97 element=dynamic_cast<Element*>(elements->GetObjectByOffset(i)); 98 element->Potential SheetUngrounding(vec_vertices_potentially_ungrounding);98 element->PotentialUngrounding(vec_vertices_potentially_ungrounding); 99 99 } 100 100 … … 150 150 element=dynamic_cast<Element*>(elements->GetObjectByOffset(i)); 151 151 if(reCast<int,IssmDouble>(elements_neighboring_floatingce[element->Sid()])){ 152 local_nflipped+=element->UpdatePotential SheetUngrounding(vertices_potentially_ungrounding,vec_nodes_on_floatingice,nodes_on_floatingice);152 local_nflipped+=element->UpdatePotentialUngrounding(vertices_potentially_ungrounding,vec_nodes_on_floatingice,nodes_on_floatingice); 153 153 } 154 154 } -
issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.h
r13216 r14378 14 14 void GroundinglineMigrationx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters); 15 15 16 Vector<IssmDouble>* 17 IssmDouble* Potential SheetUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters);16 Vector<IssmDouble>* CreateNodesOnFloatingIce(Nodes* nodes,int configuration_type); 17 IssmDouble* PotentialUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters); 18 18 IssmDouble* PropagateFloatingiceToGroundedNeighbors(Elements* elements,Nodes* nodes,Vertices* vertices,Parameters* parameters,IssmDouble* vertices_potentially_ungrounding); 19 19 #endif /* _GROUNDINGLINEMIGRATIONX_H */
Note:
See TracChangeset
for help on using the changeset viewer.