[15393] | 1 | Index: ../trunk-jpl/src/c/analyses/hydrology_core.cpp
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/c/analyses/hydrology_core.cpp (revision 15005)
|
---|
| 4 | +++ ../trunk-jpl/src/c/analyses/hydrology_core.cpp (revision 15006)
|
---|
| 5 | @@ -62,6 +62,7 @@
|
---|
| 6 | solutionsequence_nonlinear(femmodel,modify_loads);
|
---|
| 7 |
|
---|
| 8 | /*transfer water column thickness to old water column thickness: */
|
---|
| 9 | +
|
---|
| 10 | InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,WatercolumnEnum,WaterColumnOldEnum);
|
---|
| 11 |
|
---|
| 12 | if(save_results && ((i+1)%output_frequency==0 || (i+1)==nsteps)){
|
---|
| 13 | @@ -77,7 +78,9 @@
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | else if (hydrology_model==HydrologydcEnum){
|
---|
| 17 | + InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SedimentHeadEnum,SedimentHeadOldEnum);
|
---|
| 18 | femmodel->parameters->FindParam(&isefficientlayer,HydrologydcIsefficientlayerEnum);
|
---|
| 19 | +
|
---|
| 20 | if(VerboseSolution()) _pprintLine_(" computing water head");
|
---|
| 21 | solutionsequence_hydro_nonlinear(femmodel);
|
---|
| 22 | if(save_results && ((i+1)%output_frequency==0 || (i+1)==nsteps)){
|
---|
| 23 | Index: ../trunk-jpl/src/c/modules/ModelProcessorx/HydrologyDCInefficient/UpdateElementsHydrologyDCInefficient.cpp
|
---|
| 24 | ===================================================================
|
---|
| 25 | --- ../trunk-jpl/src/c/modules/ModelProcessorx/HydrologyDCInefficient/UpdateElementsHydrologyDCInefficient.cpp (revision 15005)
|
---|
| 26 | +++ ../trunk-jpl/src/c/modules/ModelProcessorx/HydrologyDCInefficient/UpdateElementsHydrologyDCInefficient.cpp (revision 15006)
|
---|
| 27 | @@ -42,6 +42,7 @@
|
---|
| 28 | iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);
|
---|
| 29 | iomodel->FetchDataToInput(elements,BasalforcingsMeltingRateEnum);
|
---|
| 30 | iomodel->FetchDataToInput(elements,SedimentHeadEnum);
|
---|
| 31 | + /* iomodel->FetchDataToInput(elements,SedimentHeadOldEnum);*/
|
---|
| 32 |
|
---|
| 33 | /*Free data: */
|
---|
| 34 | iomodel->DeleteData(1,MeshElementsEnum);
|
---|
| 35 | Index: ../trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp
|
---|
| 36 | ===================================================================
|
---|
| 37 | --- ../trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp (revision 15005)
|
---|
| 38 | +++ ../trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp (revision 15006)
|
---|
| 39 | @@ -14,7 +14,7 @@
|
---|
| 40 | Vector<IssmDouble>* uf=NULL;
|
---|
| 41 | Vector<IssmDouble>* uf_old=NULL;
|
---|
| 42 | Vector<IssmDouble>* ys=NULL;
|
---|
| 43 | - IssmDouble sediment_kmax;
|
---|
| 44 | + IssmDouble sediment_kmax,time;
|
---|
| 45 |
|
---|
| 46 | /*intermediary: */
|
---|
| 47 | Matrix<IssmDouble>* Kff=NULL;
|
---|
| 48 | @@ -36,15 +36,8 @@
|
---|
| 49 | count=1;
|
---|
| 50 | converged=false;
|
---|
| 51 |
|
---|
| 52 | + femmodel->parameters->FindParam(&time,TimeEnum);
|
---|
| 53 | for(;;){
|
---|
| 54 | -
|
---|
| 55 | - /*Computing the transfer term
|
---|
| 56 | -
|
---|
| 57 | -
|
---|
| 58 | - */
|
---|
| 59 | -
|
---|
| 60 | -
|
---|
| 61 | -
|
---|
| 62 | /*First layer*/
|
---|
| 63 | femmodel->SetCurrentConfiguration(HydrologyDCInefficientAnalysisEnum);
|
---|
| 64 | InputUpdateFromConstantx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,true,ResetPenaltiesEnum);
|
---|
| 65 | @@ -52,6 +45,7 @@
|
---|
| 66 | femmodel->UpdateConstraintsx();
|
---|
| 67 | femmodel->parameters->SetParam(HydrologySedimentEnum,HydrologyLayerEnum);
|
---|
| 68 | for(;;){
|
---|
| 69 | +
|
---|
| 70 | femmodel->SystemMatricesx(&Kff, &Kfs, &pf,&df, &sediment_kmax);
|
---|
| 71 | CreateNodalConstraintsx(&ys,femmodel->nodes,HydrologyDCInefficientAnalysisEnum);
|
---|
| 72 | Reduceloadx(pf,Kfs,ys); delete Kfs; delete uf;
|
---|
| 73 | @@ -74,7 +68,6 @@
|
---|
| 74 |
|
---|
| 75 | if(converged){
|
---|
| 76 | femmodel->parameters->SetParam(sediment_kmax,HydrologySedimentKmaxEnum);
|
---|
| 77 | -
|
---|
| 78 | InputUpdateFromConstantx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,converged,ConvergedEnum);
|
---|
| 79 | InputUpdateFromSolutionx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,ug);
|
---|
| 80 | InputUpdateFromConstantx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,sediment_kmax,HydrologySedimentKmaxEnum);
|
---|
| 81 | Index: ../trunk-jpl/src/c/classes/objects/Elements/Tria.cpp
|
---|
| 82 | ===================================================================
|
---|
| 83 | --- ../trunk-jpl/src/c/classes/objects/Elements/Tria.cpp (revision 15005)
|
---|
| 84 | +++ ../trunk-jpl/src/c/classes/objects/Elements/Tria.cpp (revision 15006)
|
---|
| 85 | @@ -2074,7 +2074,9 @@
|
---|
| 86 | name==MaterialsRheologyZbarEnum ||
|
---|
| 87 | name==GradientEnum ||
|
---|
| 88 | name==OldGradientEnum ||
|
---|
| 89 | - name==ConvergedEnum ||
|
---|
| 90 | + name==ConvergedEnum ||
|
---|
| 91 | + name==SedimentHeadOldEnum ||
|
---|
| 92 | + name==SedimentHeadEnum ||
|
---|
| 93 | name==BasisIntegralEnum ||
|
---|
| 94 | name==QmuVxEnum ||
|
---|
| 95 | name==QmuVyEnum ||
|
---|
| 96 | @@ -6022,7 +6024,6 @@
|
---|
| 97 | &Ke->values[0],1);
|
---|
| 98 | }
|
---|
| 99 | }
|
---|
| 100 | -
|
---|
| 101 | /*Clean up and return*/
|
---|
| 102 | delete gauss;
|
---|
| 103 | return Ke;
|
---|
| 104 | @@ -6164,11 +6165,12 @@
|
---|
| 105 | Input* old_wh_input=NULL;
|
---|
| 106 |
|
---|
| 107 | if(reCast<bool,IssmDouble>(dt)){
|
---|
| 108 | - old_wh_input=inputs->GetInput(SedimentHeadEnum); _assert_(old_wh_input);
|
---|
| 109 | + old_wh_input=inputs->GetInput(SedimentHeadOldEnum); _assert_(old_wh_input);
|
---|
| 110 | }
|
---|
| 111 |
|
---|
| 112 | /* Start looping on the number of gaussian points: */
|
---|
| 113 | gauss=new GaussTria(2);
|
---|
| 114 | +
|
---|
| 115 | for(int ig=gauss->begin();ig<gauss->end();ig++){
|
---|
| 116 |
|
---|
| 117 | gauss->GaussPoint(ig);
|
---|
| 118 | @@ -6189,7 +6191,6 @@
|
---|
| 119 | for(int i=0;i<numdof;i++) pe->values[i]+=scalar*basis[i];
|
---|
| 120 | }
|
---|
| 121 | }
|
---|
| 122 | -
|
---|
| 123 | /*Clean up and return*/
|
---|
| 124 | delete gauss;
|
---|
| 125 | return pe;
|
---|
| 126 | @@ -6339,7 +6340,7 @@
|
---|
| 127 | /*If converged keep the residual in mind*/
|
---|
| 128 | this->inputs->GetInputValue(&converged,ConvergedEnum);
|
---|
| 129 | GetInputListOnVertices(&intbasis[0],BasisIntegralEnum);
|
---|
| 130 | -
|
---|
| 131 | +
|
---|
| 132 | if(converged){
|
---|
| 133 | this->parameters->FindParam(&dt,TimesteppingTimeStepEnum);
|
---|
| 134 | this->parameters->FindParam(&kmax,HydrologySedimentKmaxEnum);
|
---|
| 135 | @@ -6356,8 +6357,10 @@
|
---|
| 136 | }
|
---|
| 137 |
|
---|
| 138 | /*Add input to the element: */
|
---|
| 139 | +
|
---|
| 140 | this->inputs->AddInput(new TriaP1Input(SedimentHeadEnum,values));
|
---|
| 141 | this->inputs->AddInput(new TriaP1Input(SedimentHeadResidualEnum,residual));
|
---|
| 142 | + if(converged)this->inputs->AddInput(new TriaP1Input(SedimentHeadOldEnum,values));
|
---|
| 143 |
|
---|
| 144 | /*Free ressources:*/
|
---|
| 145 | xDelete<int>(doflist);
|
---|