[25834] | 1 | Index: ../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp (revision 25464)
|
---|
| 4 | +++ ../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp (revision 25465)
|
---|
| 5 | @@ -9,18 +9,15 @@
|
---|
| 6 |
|
---|
| 7 | void GroundinglineMigrationx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters){
|
---|
| 8 |
|
---|
| 9 | - int migration_style,analysis_type;
|
---|
| 10 | - IssmDouble *vertices_potentially_ungrounding = NULL;
|
---|
| 11 | - IssmDouble *phi_ungrounding = NULL;
|
---|
| 12 | - Element *element = NULL;
|
---|
| 13 | + int migration_style;
|
---|
| 14 | + IssmDouble *vertices_potentially_ungrounding = NULL;
|
---|
| 15 | + IssmDouble *phi_ungrounding = NULL;
|
---|
| 16 |
|
---|
| 17 | /*retrieve parameters: */
|
---|
| 18 | parameters->FindParam(&migration_style,GroundinglineMigrationEnum);
|
---|
| 19 | - parameters->FindParam(&analysis_type,AnalysisTypeEnum);
|
---|
| 20 | -
|
---|
| 21 | if(migration_style==NoneEnum) return;
|
---|
| 22 |
|
---|
| 23 | - if(VerboseModule()) _printf0_(" Migrating grounding line\n");
|
---|
| 24 | + if(VerboseModule()) _printf0_(" Migrating grounding line based on "<<EnumToStringx(migration_style)<<"\n");
|
---|
| 25 |
|
---|
| 26 | /*Set toolkit to default*/
|
---|
| 27 | ToolkitsOptionsFromAnalysis(parameters,DefaultAnalysisEnum);
|
---|
| 28 | @@ -46,7 +43,7 @@
|
---|
| 29 |
|
---|
| 30 | /*Migrate grounding line : */
|
---|
| 31 | for(int i=0;i<elements->Size();i++){
|
---|
| 32 | - element=xDynamicCast<Element*>(elements->GetObjectByOffset(i));
|
---|
| 33 | + Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i));
|
---|
| 34 | element->MigrateGroundingLine(phi_ungrounding);
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | Index: ../trunk-jpl/src/c/Makefile.am
|
---|
| 38 | ===================================================================
|
---|
| 39 | --- ../trunk-jpl/src/c/Makefile.am (revision 25464)
|
---|
| 40 | +++ ../trunk-jpl/src/c/Makefile.am (revision 25465)
|
---|
| 41 | @@ -311,6 +311,7 @@
|
---|
| 42 | ./cores/damage_core.cpp \
|
---|
| 43 | ./cores/levelsetfunctionslope_core.cpp \
|
---|
| 44 | ./cores/movingfront_core.cpp \
|
---|
| 45 | + ./cores/groundingline_core.cpp \
|
---|
| 46 | ./modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp \
|
---|
| 47 | ./classes/Loads/Riftfront.cpp \
|
---|
| 48 | ./modules/ConstraintsStatex/RiftConstraintsState.cpp \
|
---|
| 49 | Index: ../trunk-jpl/src/c/cores/groundingline_core.cpp
|
---|
| 50 | ===================================================================
|
---|
| 51 | --- ../trunk-jpl/src/c/cores/groundingline_core.cpp (nonexistent)
|
---|
| 52 | +++ ../trunk-jpl/src/c/cores/groundingline_core.cpp (revision 25465)
|
---|
| 53 | @@ -0,0 +1,42 @@
|
---|
| 54 | +/*!\file: groundingline_core.cpp
|
---|
| 55 | + * \brief: core of the groundingline solution
|
---|
| 56 | + */
|
---|
| 57 | +
|
---|
| 58 | +#include "./cores.h"
|
---|
| 59 | +#include "../toolkits/toolkits.h"
|
---|
| 60 | +#include "../classes/classes.h"
|
---|
| 61 | +#include "../shared/shared.h"
|
---|
| 62 | +#include "../modules/modules.h"
|
---|
| 63 | +#include "../solutionsequences/solutionsequences.h"
|
---|
| 64 | +
|
---|
| 65 | +void groundingline_core(FemModel* femmodel){
|
---|
| 66 | +
|
---|
| 67 | + /*Start profiler*/
|
---|
| 68 | + femmodel->profiler->Start(GROUNDINGLINECORE);
|
---|
| 69 | +
|
---|
| 70 | + /* intermediaries */
|
---|
| 71 | + bool save_results;
|
---|
| 72 | +
|
---|
| 73 | + /* recover parameters */
|
---|
| 74 | + femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
|
---|
| 75 | +
|
---|
| 76 | + /*Move grounding line*/
|
---|
| 77 | + GroundinglineMigrationx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
|
---|
| 78 | +
|
---|
| 79 | + /*Update geometry and mask accordingly*/
|
---|
| 80 | + femmodel->parameters->SetParam(MaskOceanLevelsetEnum,InputToExtrudeEnum);
|
---|
| 81 | + extrudefrombase_core(femmodel);
|
---|
| 82 | + femmodel->parameters->SetParam(BaseEnum,InputToExtrudeEnum);
|
---|
| 83 | + extrudefrombase_core(femmodel);
|
---|
| 84 | + femmodel->parameters->SetParam(SurfaceEnum,InputToExtrudeEnum);
|
---|
| 85 | + extrudefrombase_core(femmodel);
|
---|
| 86 | +
|
---|
| 87 | + if(save_results){
|
---|
| 88 | + if(VerboseSolution()) _printf0_(" saving groundingline results\n");
|
---|
| 89 | + int outputs[3] = {SurfaceEnum,BaseEnum,MaskOceanLevelsetEnum};
|
---|
| 90 | + femmodel->RequestedOutputsx(&femmodel->results,&outputs[0],3);
|
---|
| 91 | + }
|
---|
| 92 | +
|
---|
| 93 | + /*Stop profiler*/
|
---|
| 94 | + femmodel->profiler->Stop(GROUNDINGLINECORE);
|
---|
| 95 | +}
|
---|
| 96 | Index: ../trunk-jpl/src/c/cores/transient_core.cpp
|
---|
| 97 | ===================================================================
|
---|
| 98 | --- ../trunk-jpl/src/c/cores/transient_core.cpp (revision 25464)
|
---|
| 99 | +++ ../trunk-jpl/src/c/cores/transient_core.cpp (revision 25465)
|
---|
| 100 | @@ -220,6 +220,7 @@
|
---|
| 101 | }
|
---|
| 102 | thermal_core(femmodel);
|
---|
| 103 | }
|
---|
| 104 | +
|
---|
| 105 | /* Using Hydrology dc coupled we need to compute smb in the hydrology inner time loop*/
|
---|
| 106 | if(issmb) {
|
---|
| 107 | if(VerboseSolution()) _printf0_(" computing smb\n");
|
---|
| 108 | @@ -231,7 +232,7 @@
|
---|
| 109 | int hydrology_model;
|
---|
| 110 | hydrology_core(femmodel);
|
---|
| 111 | femmodel->parameters->FindParam(&hydrology_model,HydrologyModelEnum);
|
---|
| 112 | - if(hydrology_model!=HydrologydcEnum && issmb)smb_core(femmodel);
|
---|
| 113 | + if(hydrology_model!=HydrologydcEnum && issmb) smb_core(femmodel);
|
---|
| 114 | }
|
---|
| 115 |
|
---|
| 116 | if(isstressbalance && (step%sb_coupling_frequency==0 || step==1) ) {
|
---|
| 117 | @@ -259,27 +260,8 @@
|
---|
| 118 | }
|
---|
| 119 |
|
---|
| 120 | if(isgroundingline){
|
---|
| 121 | -
|
---|
| 122 | - /*Start profiler*/
|
---|
| 123 | - femmodel->profiler->Start(GROUNDINGLINECORE);
|
---|
| 124 | -
|
---|
| 125 | if(VerboseSolution()) _printf0_(" computing new grounding line position\n");
|
---|
| 126 | - GroundinglineMigrationx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
|
---|
| 127 | -
|
---|
| 128 | - femmodel->parameters->SetParam(MaskOceanLevelsetEnum,InputToExtrudeEnum);
|
---|
| 129 | - extrudefrombase_core(femmodel);
|
---|
| 130 | - femmodel->parameters->SetParam(BaseEnum,InputToExtrudeEnum);
|
---|
| 131 | - extrudefrombase_core(femmodel);
|
---|
| 132 | - femmodel->parameters->SetParam(SurfaceEnum,InputToExtrudeEnum);
|
---|
| 133 | - extrudefrombase_core(femmodel);
|
---|
| 134 | -
|
---|
| 135 | - /*Stop profiler*/
|
---|
| 136 | - femmodel->profiler->Stop(GROUNDINGLINECORE);
|
---|
| 137 | -
|
---|
| 138 | - if(save_results){
|
---|
| 139 | - int outputs[3] = {SurfaceEnum,BaseEnum,MaskOceanLevelsetEnum};
|
---|
| 140 | - femmodel->RequestedOutputsx(&femmodel->results,&outputs[0],3);
|
---|
| 141 | - }
|
---|
| 142 | + groundingline_core(femmodel);
|
---|
| 143 | }
|
---|
| 144 |
|
---|
| 145 | if(isgia){
|
---|
| 146 | @@ -295,6 +277,9 @@
|
---|
| 147 | if(isesa) esa_core(femmodel);
|
---|
| 148 |
|
---|
| 149 | /*Sea level rise: */
|
---|
| 150 | - if(isslr) sealevelchange_core(femmodel);
|
---|
| 151 | + if(isslr){
|
---|
| 152 | + if(VerboseSolution()) _printf0_(" computing sea level rise\n");
|
---|
| 153 | + sealevelchange_core(femmodel);
|
---|
| 154 | + }
|
---|
| 155 |
|
---|
| 156 | }/*}}}*/
|
---|
| 157 | Index: ../trunk-jpl/src/c/cores/esa_core.cpp
|
---|
| 158 | ===================================================================
|
---|
| 159 | --- ../trunk-jpl/src/c/cores/esa_core.cpp (revision 25464)
|
---|
| 160 | +++ ../trunk-jpl/src/c/cores/esa_core.cpp (revision 25465)
|
---|
| 161 | @@ -63,7 +63,7 @@
|
---|
| 162 | }
|
---|
| 163 |
|
---|
| 164 | /*early return: */
|
---|
| 165 | - if( !iscoupler & !isesa) return; //we are not interested in being here :)
|
---|
| 166 | + if(!iscoupler & !isesa) return; //we are not interested in being here :)
|
---|
| 167 |
|
---|
| 168 | /*In what follows we assume we are all running esa, either in coupled, or uncoupled mode:*/
|
---|
| 169 | if(VerboseSolution()) _printf0_(" computing elastic adjustment\n");
|
---|
| 170 | Index: ../trunk-jpl/src/c/cores/cores.h
|
---|
| 171 | ===================================================================
|
---|
| 172 | --- ../trunk-jpl/src/c/cores/cores.h (revision 25464)
|
---|
| 173 | +++ ../trunk-jpl/src/c/cores/cores.h (revision 25465)
|
---|
| 174 | @@ -25,6 +25,7 @@
|
---|
| 175 | void surfaceslope_core(FemModel* femmodel);
|
---|
| 176 | void levelsetfunctionslope_core(FemModel* femmodel);
|
---|
| 177 | void movingfront_core(FemModel* femmodel);
|
---|
| 178 | +void groundingline_core(FemModel* femmodel);
|
---|
| 179 | void bedslope_core(FemModel* femmodel);
|
---|
| 180 | void meshdeformation_core(FemModel* femmodel);
|
---|
| 181 | void control_core(FemModel* femmodel);
|
---|
| 182 | Index: ../trunk-jpl/src/c/cores/sealevelchange_core.cpp
|
---|
| 183 | ===================================================================
|
---|
| 184 | --- ../trunk-jpl/src/c/cores/sealevelchange_core.cpp (revision 25464)
|
---|
| 185 | +++ ../trunk-jpl/src/c/cores/sealevelchange_core.cpp (revision 25465)
|
---|
| 186 | @@ -39,9 +39,6 @@
|
---|
| 187 | /*Should we be here?:*/
|
---|
| 188 | if(!isslr)return;
|
---|
| 189 |
|
---|
| 190 | - /*Verbose: */
|
---|
| 191 | - if(VerboseSolution()) _printf0_(" computing sea level rise\n");
|
---|
| 192 | -
|
---|
| 193 | /*Run gia core: */
|
---|
| 194 | if(isgia){
|
---|
| 195 | #ifdef _HAVE_GIA_
|
---|