source: issm/oecreview/Archive/24684-25833/ISSM-25464-25465.diff

Last change on this file was 25834, checked in by Mathieu Morlighem, 4 years ago

CHG: added 24684-25833

File size: 7.3 KB
  • ../trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp

     
    99
    1010void GroundinglineMigrationx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters){
    1111
    12         int                 migration_style,analysis_type;
    13         IssmDouble         *vertices_potentially_ungrounding = NULL;
    14         IssmDouble         *phi_ungrounding                  = NULL;
    15         Element            *element                          = NULL;
     12   int         migration_style;
     13        IssmDouble *vertices_potentially_ungrounding = NULL;
     14        IssmDouble *phi_ungrounding                  = NULL;
    1615
    1716        /*retrieve parameters: */
    1817        parameters->FindParam(&migration_style,GroundinglineMigrationEnum);
    19         parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    20 
    2118        if(migration_style==NoneEnum) return;
    2219
    23         if(VerboseModule()) _printf0_("   Migrating grounding line\n");
     20        if(VerboseModule()) _printf0_("   Migrating grounding line based on "<<EnumToStringx(migration_style)<<"\n");
    2421
    2522        /*Set toolkit to default*/
    2623        ToolkitsOptionsFromAnalysis(parameters,DefaultAnalysisEnum);
     
    4643
    4744        /*Migrate grounding line : */
    4845        for(int i=0;i<elements->Size();i++){
    49                 element=xDynamicCast<Element*>(elements->GetObjectByOffset(i));
     46                Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i));
    5047                element->MigrateGroundingLine(phi_ungrounding);
    5148        }
    5249
  • ../trunk-jpl/src/c/Makefile.am

     
    311311        ./cores/damage_core.cpp \
    312312        ./cores/levelsetfunctionslope_core.cpp \
    313313        ./cores/movingfront_core.cpp \
     314        ./cores/groundingline_core.cpp \
    314315        ./modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp \
    315316        ./classes/Loads/Riftfront.cpp \
    316317        ./modules/ConstraintsStatex/RiftConstraintsState.cpp \
  • ../trunk-jpl/src/c/cores/groundingline_core.cpp

     
     1/*!\file: groundingline_core.cpp
     2 * \brief: core of the groundingline solution
     3 */
     4
     5#include "./cores.h"
     6#include "../toolkits/toolkits.h"
     7#include "../classes/classes.h"
     8#include "../shared/shared.h"
     9#include "../modules/modules.h"
     10#include "../solutionsequences/solutionsequences.h"
     11
     12void groundingline_core(FemModel* femmodel){
     13
     14        /*Start profiler*/
     15        femmodel->profiler->Start(GROUNDINGLINECORE);
     16
     17        /* intermediaries */
     18        bool save_results;
     19
     20        /* recover parameters */
     21        femmodel->parameters->FindParam(&save_results,SaveResultsEnum);
     22
     23        /*Move grounding line*/
     24        GroundinglineMigrationx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
     25
     26        /*Update geometry and mask accordingly*/
     27        femmodel->parameters->SetParam(MaskOceanLevelsetEnum,InputToExtrudeEnum);
     28        extrudefrombase_core(femmodel);
     29        femmodel->parameters->SetParam(BaseEnum,InputToExtrudeEnum);
     30        extrudefrombase_core(femmodel);
     31        femmodel->parameters->SetParam(SurfaceEnum,InputToExtrudeEnum);
     32        extrudefrombase_core(femmodel);
     33
     34        if(save_results){
     35                if(VerboseSolution()) _printf0_("   saving groundingline results\n");
     36                int outputs[3] = {SurfaceEnum,BaseEnum,MaskOceanLevelsetEnum};
     37                femmodel->RequestedOutputsx(&femmodel->results,&outputs[0],3);
     38        }
     39
     40        /*Stop profiler*/
     41        femmodel->profiler->Stop(GROUNDINGLINECORE);
     42}
  • ../trunk-jpl/src/c/cores/transient_core.cpp

     
    220220                }
    221221                thermal_core(femmodel);
    222222        }
     223
    223224        /* Using Hydrology dc  coupled we need to compute smb in the hydrology inner time loop*/
    224225        if(issmb) {
    225226                if(VerboseSolution()) _printf0_("   computing smb\n");
     
    231232                int hydrology_model;
    232233                hydrology_core(femmodel);
    233234                femmodel->parameters->FindParam(&hydrology_model,HydrologyModelEnum);
    234                 if(hydrology_model!=HydrologydcEnum && issmb)smb_core(femmodel);
     235                if(hydrology_model!=HydrologydcEnum && issmb) smb_core(femmodel);
    235236        }
    236237
    237238        if(isstressbalance && (step%sb_coupling_frequency==0 || step==1) ) {
     
    259260        }
    260261
    261262        if(isgroundingline){
    262 
    263                 /*Start profiler*/
    264                 femmodel->profiler->Start(GROUNDINGLINECORE);
    265 
    266263                if(VerboseSolution()) _printf0_("   computing new grounding line position\n");
    267                 GroundinglineMigrationx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters);
    268 
    269                 femmodel->parameters->SetParam(MaskOceanLevelsetEnum,InputToExtrudeEnum);
    270                 extrudefrombase_core(femmodel);
    271                 femmodel->parameters->SetParam(BaseEnum,InputToExtrudeEnum);
    272                 extrudefrombase_core(femmodel);
    273                 femmodel->parameters->SetParam(SurfaceEnum,InputToExtrudeEnum);
    274                 extrudefrombase_core(femmodel);
    275 
    276                 /*Stop profiler*/
    277                 femmodel->profiler->Stop(GROUNDINGLINECORE);
    278 
    279                 if(save_results){
    280                         int outputs[3] = {SurfaceEnum,BaseEnum,MaskOceanLevelsetEnum};
    281                         femmodel->RequestedOutputsx(&femmodel->results,&outputs[0],3);
    282                 }
     264                groundingline_core(femmodel);
    283265        }
    284266
    285267        if(isgia){
     
    295277        if(isesa) esa_core(femmodel);
    296278
    297279        /*Sea level rise: */
    298         if(isslr) sealevelchange_core(femmodel);
     280        if(isslr){
     281                if(VerboseSolution()) _printf0_("   computing sea level rise\n");
     282                sealevelchange_core(femmodel);
     283        }
    299284
    300285}/*}}}*/
  • ../trunk-jpl/src/c/cores/esa_core.cpp

     
    6363        }
    6464
    6565        /*early return: */
    66         if( !iscoupler & !isesa) return;  //we are not interested in being here :)
     66        if(!iscoupler & !isesa) return;  //we are not interested in being here :)
    6767
    6868        /*In what follows we assume we are all running esa, either in coupled, or uncoupled mode:*/
    6969        if(VerboseSolution()) _printf0_("   computing elastic adjustment\n");
  • ../trunk-jpl/src/c/cores/cores.h

     
    2525void surfaceslope_core(FemModel* femmodel);
    2626void levelsetfunctionslope_core(FemModel* femmodel);
    2727void movingfront_core(FemModel* femmodel);
     28void groundingline_core(FemModel* femmodel);
    2829void bedslope_core(FemModel* femmodel);
    2930void meshdeformation_core(FemModel* femmodel);
    3031void control_core(FemModel* femmodel);
  • ../trunk-jpl/src/c/cores/sealevelchange_core.cpp

     
    3939        /*Should we be here?:*/
    4040        if(!isslr)return;
    4141
    42         /*Verbose: */
    43         if(VerboseSolution()) _printf0_("   computing sea level rise\n");
    44 
    4542        /*Run gia core: */
    4643        if(isgia){
    4744                #ifdef _HAVE_GIA_
Note: See TracBrowser for help on using the repository browser.