[17802] | 1 | Index: ../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp (revision 17706)
|
---|
| 4 | +++ ../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp (revision 17707)
|
---|
| 5 | @@ -94,7 +94,7 @@
|
---|
| 6 | phi[i]=-1.;
|
---|
| 7 | }
|
---|
| 8 | else{
|
---|
| 9 | - _error_("not supported (vertexfloating="<<serial_vertexfloating[i]<<" vertexgrounded="<<serial_vertexgrounded[i]<<")");
|
---|
| 10 | + phi[i]=9999.;
|
---|
| 11 | }
|
---|
| 12 | }
|
---|
| 13 |
|
---|
| 14 | Index: ../trunk-jpl/src/c/cores/transient_core.cpp
|
---|
| 15 | ===================================================================
|
---|
| 16 | --- ../trunk-jpl/src/c/cores/transient_core.cpp (revision 17706)
|
---|
| 17 | +++ ../trunk-jpl/src/c/cores/transient_core.cpp (revision 17707)
|
---|
| 18 | @@ -166,6 +166,11 @@
|
---|
| 19 | if(isgroundingline){
|
---|
| 20 | if(VerboseSolution()) _printf0_(" computing new grounding line position\n");
|
---|
| 21 | GroundinglineMigrationx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
|
---|
| 22 | +
|
---|
| 23 | + if(groundingline_migration==ContactEnum){
|
---|
| 24 | + femmodel->parameters->SetParam(MaskGroundediceLevelsetEnum,InputToExtrudeEnum);
|
---|
| 25 | + extrudefrombase_core(femmodel);
|
---|
| 26 | + }
|
---|
| 27 | if(save_results){
|
---|
| 28 | int outputs[3] = {SurfaceEnum,BaseEnum,MaskGroundediceLevelsetEnum};
|
---|
| 29 | femmodel->RequestedOutputsx(&femmodel->results,&outputs[0],3);
|
---|
| 30 | Index: ../trunk-jpl/src/c/classes/Elements/Tria.cpp
|
---|
| 31 | ===================================================================
|
---|
| 32 | --- ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 17706)
|
---|
| 33 | +++ ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 17707)
|
---|
| 34 | @@ -4367,9 +4367,34 @@
|
---|
| 35 | density = rho_ice/rho_water;
|
---|
| 36 | oldfloating = this->IsFloating(); //figure out if element is floating before we start to change everything
|
---|
| 37 |
|
---|
| 38 | - if(migration_style==ContactEnum){
|
---|
| 39 | - for(i=0;i<NUMVERTICES;i++) phi[i]=phi_ungrounding[vertices[i]->Pid()];
|
---|
| 40 | + if(migration_style == ContactEnum){
|
---|
| 41 | + for(i = 0;i < NUMVERTICES;i++) phi[i] = phi_ungrounding[vertices[i]->Pid()];
|
---|
| 42 | this->inputs->AddInput(new TriaInput(MaskGroundediceLevelsetEnum,&phi[0],P1Enum));
|
---|
| 43 | +
|
---|
| 44 | + /*go through vertices, and update inputs, considering them to be TriaVertex type: */
|
---|
| 45 | + for(i = 0;i < NUMVERTICES;i++){
|
---|
| 46 | + /*Ice shelf: if bed below bathymetry, impose it at the bathymetry and update surface, elso do nothing */
|
---|
| 47 | + if(phi[i] >= 0.){
|
---|
| 48 | + if(b[i] < r[i]){
|
---|
| 49 | + b[i] = r[i];
|
---|
| 50 | + }
|
---|
| 51 | + }
|
---|
| 52 | + }
|
---|
| 53 | +
|
---|
| 54 | + /*Add basal melting rate if element just ungrounded*/
|
---|
| 55 | + for(i=0;i<NUMVERTICES;i++){
|
---|
| 56 | + if(phi[i]<0.){
|
---|
| 57 | + floatingelement=true;
|
---|
| 58 | + break;
|
---|
| 59 | + }
|
---|
| 60 | + }
|
---|
| 61 | + if(!oldfloating && floatingelement==true){
|
---|
| 62 | + for(i=0;i<NUMVERTICES;i++) melting[i]=gl_melting_rate/yts;
|
---|
| 63 | + this->inputs->AddInput(new TriaInput(BasalforcingsMeltingRateEnum,&melting[0],P1Enum));
|
---|
| 64 | + }
|
---|
| 65 | +
|
---|
| 66 | + /*Update inputs*/
|
---|
| 67 | + this->inputs->AddInput(new TriaInput(BaseEnum,&b[0],P1Enum));
|
---|
| 68 | return;
|
---|
| 69 | }
|
---|
| 70 |
|
---|
| 71 | @@ -4437,7 +4462,7 @@
|
---|
| 72 | }
|
---|
| 73 | }
|
---|
| 74 |
|
---|
| 75 | - /*Add basal melting rate if element just ungrounded*/
|
---|
| 76 | + /*Add basal melting rate if element just ungrounded*/
|
---|
| 77 | if(!oldfloating && floatingelement==true){
|
---|
| 78 | for(i=0;i<NUMVERTICES;i++)melting[i]=gl_melting_rate/yts;
|
---|
| 79 | this->inputs->AddInput(new TriaInput(BasalforcingsMeltingRateEnum,&melting[0],P1Enum));
|
---|