Changeset 387


Ignore:
Timestamp:
05/13/09 10:20:31 (16 years ago)
Author:
Eric.Larour
Message:

Finished ModelProcessor for stokes.
Renamed reconditioning_number to stokes_reconditioning everywhere.

Location:
issm/trunk/src
Files:
2 added
18 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/EnumDefinitions/EnumDefinitions.cpp

    r358 r387  
    5252int IcefrontEnum(void){                 return         201; }
    5353int PenpairEnum(void){                  return         202; }
     54int PengridEnum(void){                  return         203; }
    5455
    5556/*Materials: */
  • issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h

    r358 r387  
    1818int SpcEnum(void);
    1919int PenpairEnum(void);
     20int PengridEnum(void);
    2021int IcefrontEnum(void);
    2122int ParamEnum(void);
  • issm/trunk/src/c/Makefile.am

    r358 r387  
    5656                                        ./objects/Penpair.cpp\
    5757                                        ./objects/Penpair.h\
     58                                        ./objects/Pengrid.cpp\
     59                                        ./objects/Pengrid.h\
    5860                                        ./objects/Icefront.cpp\
    5961                                        ./objects/Icefront.h\
     
    297299                                        ./objects/Penpair.cpp\
    298300                                        ./objects/Penpair.h\
     301                                        ./objects/Pengrid.cpp\
     302                                        ./objects/Pengrid.h\
    299303                                        ./objects/Icefront.cpp\
    300304                                        ./objects/Icefront.h\
  • issm/trunk/src/c/ModelProcessorx/CreateElementsNodesAndMaterials.cpp

    r358 r387  
    6060                throw ErrorException(__FUNCT__,exprintf("%s%s%s"," analysis_type: ",model->analysis_type," not supported yet!"));
    6161        }
     62
    6263}
  • issm/trunk/src/c/ModelProcessorx/CreateParameters.cpp

    r377 r387  
    156156        parameters->AddObject(param);
    157157
    158         /*reconditioning_number: */
    159         count++;
    160         param= new Param(count,"reconditioning_number",DOUBLE);
    161         param->SetDouble(model->reconditioning_number);
     158        /*stokesreconditioning: */
     159        count++;
     160        param= new Param(count,"stokesreconditioning",DOUBLE);
     161        param->SetDouble(model->stokesreconditioning);
    162162        parameters->AddObject(param);
    163163
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateElementsNodesAndMaterialsDiagnosticHoriz.cpp

    r377 r387  
    9999        int penta_thermal_steadystate;
    100100        double penta_viscosity_overshoot;
    101         double penta_reconditioning_number;
     101        double penta_stokesreconditioning;
    102102
    103103        /*matpar constructor input: */
     
    414414                                        penta_p,penta_q,penta_shelf,penta_onbed,penta_onsurface,penta_meanvel,penta_epsvel,
    415415                                        penta_collapse,penta_melting,penta_accumulation,penta_geothermalflux,penta_artdiff,
    416                                         penta_thermal_steadystate,penta_viscosity_overshoot,penta_reconditioning_number);
     416                                        penta_thermal_steadystate,penta_viscosity_overshoot,penta_stokesreconditioning);
    417417
    418418                        /*Add penta element to elements dataset: */
  • issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateElementsNodesAndMaterialsDiagnosticStokes.cpp

    r377 r387  
    8080        int penta_thermal_steadystate;
    8181        double penta_viscosity_overshoot;
    82         double penta_reconditioning_number;
     82        double penta_stokesreconditioning;
    8383
    8484        /*matpar constructor input: */
     
    255255                        penta_viscosity_overshoot=model->viscosity_overshoot;
    256256
    257                         /*reconditioning_number: */
    258                         penta_reconditioning_number=model->reconditioning_number;
     257                        /*stokesreconditioning: */
     258                        penta_stokesreconditioning=model->stokesreconditioning;
    259259
    260260                       
     
    265265                                                penta_p,penta_q,penta_shelf,penta_onbed,penta_onsurface,penta_meanvel,penta_epsvel,
    266266                                                penta_collapse,penta_melting,penta_accumulation,penta_geothermalflux,penta_artdiff,
    267                                                 penta_thermal_steadystate,penta_viscosity_overshoot,penta_reconditioning_number);
     267                                                penta_thermal_steadystate,penta_viscosity_overshoot,penta_stokesreconditioning);
    268268
    269269                                /*Add penta element to elements dataset: */
  • issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp

    r377 r387  
    2424        DataSet*    loads    = NULL;
    2525        Icefront*   icefront = NULL;
    26         Penpair*    penpair  = NULL;
     26        Pengrid*    pengrid  = NULL;
    2727
    2828        int segment_width;
    29         int element_type;
    3029        int i1,i2,i3,i4;
    3130        int i0,range;
    3231        int grid1,grid2;
    3332
    34         /*rift penpair: */
    35         double  normal[2];
    36         double  length;
    37         double  friction;
    38         int     fill;
    39                
    4033        /*icefront intermediary data: */
    4134        char icefront_type[ICEFRONTSTRING];
     
    4841        double  icefront_b[MAX_ICEFRONT_GRIDS];
    4942
    50         /*penpair intermediary data: */
    51         int penpair_id;
    52         int penpair_node_ids[2];
    53         double penpair_penalty_offset;
    54         int penpair_numdofs;
    55         int penpair_dof;
    56         int penpair_penalty_lock;
    57         int penpair_element_ids[2];
    58         double penpair_friction;
    59         int penpair_fill;
    60         double penpair_normal[2];
    61         double penpair_length;
     43        /*pengrid intermediary data: */
     44        int pengrid_id;
     45        int pengrid_node_id;
     46        int pengrid_dof;
     47        double pengrid_penalty_offset;
     48        int pengrid_active=0;
     49        int pengrid_thermal_steadystate=1;
    6250
    63         /*Rifts:*/
    64         int* riftsnumpenaltypairs=NULL;
    65         double** riftspenaltypairs=NULL;
    66         int* riftsfill=NULL;
    67         int* riftsfriction=NULL;
    68         double* riftpenaltypairs=NULL;
    69         int el1,el2;
    70        
     51        int numberofsegs_diag_stokes;
     52        int count;
     53
    7154        /*Create loads: */
    7255        loads   = new DataSet(LoadsEnum());
     
    7760        /*Create pressure loads as boundary conditions. Pay attention to the partitioning if we are running in parallel (the grids
    7861         * referenced by a certain load must belong to the cluster node): */
    79         ModelFetchData((void**)&model->segmentonneumann_diag,&model->numberofsegs_diag,NULL,model_handle,"segmentonneumann_diag","Matrix","Mat");
     62        ModelFetchData((void**)&model->segmentonneumann_diag_stokes,&numberofsegs_diag_stokes,NULL,model_handle,"segmentonneumann_diag_stokes","Matrix","Mat");
    8063        ModelFetchData((void**)&model->elements_type,NULL,NULL,model_handle,"elements_type","Matrix","Mat");
    8164        ModelFetchData((void**)&model->thickness,NULL,NULL,model_handle,"thickness","Matrix","Mat");
    8265        ModelFetchData((void**)&model->bed,NULL,NULL,model_handle,"bed","Matrix","Mat");
    8366
     67        count=0;
     68
    8469        /*First load data:*/
    85         for (i=0;i<model->numberofsegs_diag;i++){
     70        for (i=0;i<numberofsegs_diag_stokes;i++){
    8671               
    87                 if (strcmp(model->meshtype,"2d")==0){
    88                         segment_width=3;
    89                         element_type=TriaEnum();
    90                 }
    91                 else{
    92                         segment_width=5;
    93                         element_type=PentaEnum();
    94                 }
     72                segment_width=5;
    9573
    96 
    97                 element=(int)(*(model->segmentonneumann_diag+segment_width*i+segment_width-1)-1); //element is in the last column
     74                element=(int)(*(model->segmentonneumann_diag_stokes+segment_width*i+segment_width-1)-1); //element is in the last column
    9875
    9976                #ifdef _PARALLEL_
     
    10683       
    10784                icefront_mparid=model->numberofelements+1; //matlab indexing
    108                 icefront_sid=i+1; //matlab indexing
    109                 icefront_eid=(int)*(model->segmentonneumann_diag+segment_width*i+segment_width-1); //matlab indexing
    110                 icefront_element_type=element_type;
     85                icefront_sid=count+1; //matlab indexing
     86                icefront_eid=(int)*(model->segmentonneumann_diag_stokes+segment_width*i+segment_width-1); //matlab indexing
     87                icefront_element_type=PentaEnum();
    11188
    112                 i1=(int)*(model->segmentonneumann_diag+segment_width*i+0);
    113                 i2=(int)*(model->segmentonneumann_diag+segment_width*i+1);
    114                        
     89                i1=(int)*(model->segmentonneumann_diag_stokes+segment_width*i+0);
     90                i2=(int)*(model->segmentonneumann_diag_stokes+segment_width*i+1);
     91                i3=(int)*(model->segmentonneumann_diag_stokes+segment_width*i+2);
     92                i4=(int)*(model->segmentonneumann_diag_stokes+segment_width*i+3);
     93       
    11594                icefront_node_ids[0]=i1;
    11695                icefront_node_ids[1]=i2;
    117                
     96                icefront_node_ids[2]=i3;
     97                icefront_node_ids[3]=i4;
     98       
    11899                icefront_h[0]=model->thickness[i1-1];
    119100                icefront_h[1]=model->thickness[i2-1];
     101                icefront_h[2]=model->thickness[i3-1];
     102                icefront_h[3]=model->thickness[i4-1];
    120103
    121104                icefront_b[0]=model->bed[i1-1];
    122105                icefront_b[1]=model->bed[i2-1];
    123                
    124                 if ((int)*(model->elements_type+2*element+0)==MacAyealEnum()){ //this is a collapsed 3d element, icefront will be 2d
    125                         strcpy(icefront_type,"segment");
    126                 }
    127                 else if ((int)*(model->elements_type+2*element+0)==PattynEnum()){ //this is a real 3d element, icefront will be 3d.
    128                         strcpy(icefront_type,"quad");
    129                         i3=(int)*(model->segmentonneumann_diag+segment_width*i+2);
    130                         i4=(int)*(model->segmentonneumann_diag+segment_width*i+3);
    131                         icefront_node_ids[2]=i3;
    132                         icefront_node_ids[3]=i4;
    133                        
    134                         icefront_h[2]=model->thickness[i3-1];
    135                         icefront_h[3]=model->thickness[i4-1];
    136 
    137                         icefront_b[2]=model->bed[i3-1];
    138                         icefront_b[3]=model->bed[i4-1];
    139                 }
    140                 else{
    141                         throw ErrorException(__FUNCT__," element type not supported yet");
    142                 }
    143 
     106                icefront_b[2]=model->bed[i3-1];
     107                icefront_b[3]=model->bed[i4-1];
     108       
    144109                icefront = new Icefront(icefront_type,icefront_sid,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b);
    145110               
    146111                loads->AddObject(icefront);
     112                count++;
    147113
    148114        }
    149115        /*Free data: */
    150         xfree((void**)&model->segmentonneumann_diag);
     116        xfree((void**)&model->segmentonneumann_diag_stokes);
    151117        xfree((void**)&model->elements_type);
    152118        xfree((void**)&model->thickness);
    153119        xfree((void**)&model->bed);
    154120
     121
     122
     123
     124        //create penalties for grids on the base of icesheet. We must have wb=ub*db/dx+vb*db/dy
     125
     126        ModelFetchData((void**)&model->gridonbed,NULL,NULL,model_handle,"gridonbed","Matrix","Mat");
     127        ModelFetchData((void**)&model->gridonicesheet,NULL,NULL,model_handle,"gridonicesheet","Matrix","Mat");
     128        ModelFetchData((void**)&model->gridonstokes,NULL,NULL,model_handle,"gridonstokes","Matrix","Mat");
     129       
     130        for (i=0;i<model->numberofnodes;i++){
     131        #ifdef _PARALLEL_
     132        /*keep only this partition's nodes:*/
     133        if((model->my_grids[i]==1)){
     134        #endif
     135
     136                if ((model->gridonbed[i]) && (model->gridonicesheet[i]) && (model->gridonstokes[i]))
     137
     138                pengrid_id=count+1; //matlab indexing
     139                pengrid_node_id=i+1;
     140                pengrid_dof=1;
     141                pengrid_penalty_offset=model->penalty_offset;
     142
     143                pengrid= new Pengrid(pengrid_id, pengrid_node_id,pengrid_dof, pengrid_active, pengrid_penalty_offset,pengrid_thermal_steadystate);
    155144               
    156         /*Create penalties loads for linking of collapsed formulation grids with non collapsed grids: */
    157 
    158         /*First fetch penalties: */
    159         if (strcmp(model->meshtype,"3d")==0){
    160                 ModelFetchData((void**)&model->penalties,&model->numpenalties,NULL,model_handle,"penalties","Matrix","Mat");
     145                loads->AddObject(icefront);
     146                count++;
     147        #ifdef _PARALLEL_
     148        } //if((model->my_grids[i]==1))
     149        #endif
    161150        }
    162151
    163         counter=0;
    164         if(model->numpenalties){
    165 
    166                 /*First deal with internal grids: */
    167                 for (i=0;i<model->numpenalties;i++){
    168                         if (model->penaltypartitioning[i]>=0){ //this penalty belongs to at least this CPU
    169 
    170                                 for(j=0;j<model->numlayers-1;j++){
    171 
    172                                         /*We are pairing grids along a vertical profile.*/
    173                                         grid1=(int)*(model->penalties+model->numlayers*i+j);
    174                                         grid2=(int)*(model->penalties+model->numlayers*i+j+1);
    175 
    176                                         penpair_id=counter+1; //matlab indexing
    177                                         penpair_dof=1;
    178                                         penpair_node_ids[0]=grid1;
    179                                         penpair_node_ids[1]=grid2;
    180                                         penpair_penalty_offset=model->penalty_offset;
    181                                         penpair_numdofs=1;
    182 
    183                                         penpair= new Penpair(penpair_id,penpair_penalty_offset,penpair_penalty_lock,penpair_numdofs,penpair_node_ids,penpair_dof,
    184                                                                 penpair_element_ids,penpair_friction,penpair_fill,penpair_normal,penpair_length);
    185                                         loads->AddObject(penpair);
    186152
    187153
    188                                         counter++;
    189 
    190                                         penpair_id=counter+1; //matlab indexing
    191                                         penpair_dof=2;
    192                                         penpair_node_ids[0]=grid1;
    193                                         penpair_node_ids[1]=grid2;
    194                                         penpair_penalty_offset=model->penalty_offset;
    195                                         penpair_numdofs=1;
    196 
    197                                         penpair= new Penpair(penpair_id,penpair_penalty_offset,penpair_penalty_lock,penpair_numdofs,penpair_node_ids,penpair_dof,
    198                                                                 penpair_element_ids,penpair_friction,penpair_fill,penpair_normal,penpair_length);
    199                                         loads->AddObject(penpair);
    200 
    201 
    202                                         counter++;
    203 
    204                                 } //for ( i=0; i<numpenalties; i++)
    205                         }
    206                 }
    207         }
    208 
    209         /*Free data: */
    210         xfree((void**)&model->penalties);
    211        
    212         /*Create penpair loads also for rift grids, so that they don't penetrate one another, if needed: */
    213         /*First fetch rifts: */
    214         if(model->numrifts){
    215 
    216                 for(i=0;i<model->numrifts;i++){
    217                         riftpenaltypairs=model->riftspenaltypairs[i];
    218                         for(j=0;j<model->riftsnumpenaltypairs[i];j++){
    219 
    220                                 el1=(int)*(riftpenaltypairs+7*j+2);
    221                                 #ifdef _PARALLEL_
    222                                 if (model->epart[el1-1]!=my_rank){
    223                                         /*This load does not belong to this cluster node, as it references an element
    224                                          *that does not belong to this node's partition. Drop this 'j':*/
    225                                         continue;
    226                                 }
    227                                 #endif
    228 
    229                                 /*Ok, retrieve all the data needed to add a penalty between the two grids: */
    230                                 el2=(int)*(riftpenaltypairs+7*j+3);
    231                                 grid1=(int)*(riftpenaltypairs+7*j+0);
    232                                 grid2=(int)*(riftpenaltypairs+7*j+1);
    233                                 normal[0]=*(riftpenaltypairs+7*j+4);
    234                                 normal[1]=*(riftpenaltypairs+7*j+5);
    235                                 length=*(riftpenaltypairs+7*j+6);
    236                                 friction=model->riftsfriction[i];
    237                                 fill=model->riftsfill[i];
    238 
    239                                 penpair_id=counter+1; //matlab indexing
    240                                 penpair_node_ids[0]=grid1;
    241                                 penpair_node_ids[1]=grid2;
    242                                 penpair_element_ids[0]=el1;
    243                                 penpair_element_ids[1]=el2;
    244                                 penpair_penalty_offset=model->penalty_offset;
    245                                 penpair_penalty_lock=model->penalty_lock;
    246                                 penpair_numdofs=2;
    247                                 penpair_normal[0]=normal[0];
    248                                 penpair_normal[1]=normal[1];
    249                                 penpair_length=length;
    250                                 penpair_friction=friction;
    251                                 penpair_fill=fill;
    252 
    253                                 penpair= new Penpair(penpair_id,penpair_penalty_offset,penpair_penalty_lock,penpair_numdofs,penpair_node_ids,penpair_dof,
    254                                                 penpair_element_ids,penpair_friction,penpair_fill,penpair_normal,penpair_length);
    255                                
    256                                 loads->AddObject(penpair);
    257 
    258                                 counter++;
    259                         }
    260                 }
    261         }
     154        xfree((void**)&model->gridonbed);
     155        xfree((void**)&model->gridonstokes);
     156        xfree((void**)&model->gridonicesheet);
    262157
    263158        /*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these
     
    267162        cleanup_and_return:
    268163
    269         /*Free ressources:*/
    270         xfree((void**)&riftsnumpenaltypairs);
    271         for(i=0;i<model->numrifts;i++){
    272                 double* temp=riftspenaltypairs[i];
    273                 xfree((void**)&temp);
    274         }
    275         xfree((void**)&riftspenaltypairs);
    276         xfree((void**)&riftsfill);
    277         xfree((void**)&riftsfriction);
    278 
    279 
    280164        /*Assign output pointer: */
    281165        *ploads=loads;
  • issm/trunk/src/c/ModelProcessorx/DiagnosticVert/CreateElementsNodesAndMaterialsDiagnosticVert.cpp

    r377 r387  
    7979        int penta_thermal_steadystate;
    8080        double penta_viscosity_overshoot;
    81         double penta_reconditioning_number;
     81        double penta_stokesreconditioning;
    8282
    8383        /*matpar constructor input: */
     
    239239                                penta_p,penta_q,penta_shelf,penta_onbed,penta_onsurface,penta_meanvel,penta_epsvel,
    240240                                penta_collapse,penta_melting,penta_accumulation,penta_geothermalflux,penta_artdiff,
    241                                 penta_thermal_steadystate,penta_viscosity_overshoot,penta_reconditioning_number);
     241                                penta_thermal_steadystate,penta_viscosity_overshoot,penta_stokesreconditioning);
    242242
    243243                /*Add penta element to elements dataset: */
  • issm/trunk/src/c/ModelProcessorx/Model.cpp

    r380 r387  
    6767        model->bed=NULL;
    6868        model->elementoniceshelf=NULL;
     69        model->gridonicesheet=NULL;
    6970
    7071        model->drag_type=0;
     
    7576        model->numberofsegs_diag=0;
    7677        model->segmentonneumann_diag=NULL;
     78        model->segmentonneumann_diag_stokes=NULL;
    7779        model-> neumannvalues_diag=NULL;
    7880        model-> gridondirichlet_diag=NULL;
     
    126128        model->yts=0;
    127129        model->viscosity_overshoot=0;
    128         model->reconditioning_number=0;
     130        model->stokesreconditioning=0;
    129131        model->waitonlock=0;
    130132
     
    213215        xfree((void**)&model->q);
    214216        xfree((void**)&model->elementoniceshelf);
     217        xfree((void**)&model->gridonicesheet);
    215218        xfree((void**)&model->segmentonneumann_diag);
     219        xfree((void**)&model->segmentonneumann_diag_stokes);
    216220        xfree((void**)&model->neumannvalues_diag);
    217221        xfree((void**)&model->gridondirichlet_diag);
     
    255259       
    256260        xfree((void**)&model->control_type);
     261       
     262        xfree((void**)&model->epart);
     263        xfree((void**)&model->npart);
     264        xfree((void**)&model->my_grids);
     265        xfree((void**)&model->my_bordergrids);
    257266       
    258267        /*!Delete entire structure: */
     
    333342        ModelFetchData((void**)&model->solverstring,NULL,NULL,model_handle,"solverstring","String",NULL);
    334343        ModelFetchData((void**)&model->viscosity_overshoot,NULL,NULL,model_handle,"viscosity_overshoot","Scalar",NULL);
     344        ModelFetchData((void**)&model->stokesreconditioning,NULL,NULL,model_handle,"stokesreconditioning","Scalar",NULL);
    335345        ModelFetchData((void**)&model->reconditioning_number,NULL,NULL,model_handle,"reconditioning_number","Scalar",NULL);
    336346        ModelFetchData((void**)&model->waitonlock,NULL,NULL,model_handle,"waitonlock","Integer",NULL);
  • issm/trunk/src/c/ModelProcessorx/Model.h

    r377 r387  
    6262        double* bed;
    6363        double* elementoniceshelf;
     64        double* gridonicesheet;
    6465
    6566        /*friction: */
     
    7677        double* gridondirichlet_diag;
    7778        double* dirichletvalues_diag;
     79        double* segmentonneumann_diag_stokes;
     80
    7881        //prognostic
    7982        double* segmentonneumann_prog;
     
    121124        double  yts;
    122125        double  viscosity_overshoot;
    123         double  reconditioning_number;
     126        double  stokesreconditioning;
    124127        int     waitonlock;
    125128
  • issm/trunk/src/c/ModelProcessorx/SlopeCompute/CreateElementsNodesAndMaterialsSlopeCompute.cpp

    r377 r387  
    9090        int penta_thermal_steadystate;
    9191        double penta_viscosity_overshoot;
    92         double penta_reconditioning_number;
     92        double penta_stokesreconditioning;
    9393
    9494        /* node constructor input: */
     
    287287                                        penta_p,penta_q,penta_shelf,penta_onbed,penta_onsurface,penta_meanvel,penta_epsvel,
    288288                                        penta_collapse,penta_melting,penta_accumulation,penta_geothermalflux,penta_artdiff,
    289                                         penta_thermal_steadystate,penta_viscosity_overshoot,penta_reconditioning_number);
     289                                        penta_thermal_steadystate,penta_viscosity_overshoot,penta_stokesreconditioning);
    290290
    291291                        /*Add penta element to elements dataset: */
  • issm/trunk/src/c/objects/Penta.cpp

    r377 r387  
    2222                                double penta_p, double penta_q, int penta_shelf, int penta_onbed, int penta_onsurface, double penta_meanvel,double penta_epsvel,
    2323                                int penta_collapse, double penta_melting[6], double penta_accumulation[6], double penta_geothermalflux[6],
    24                                 int penta_artdiff, int penta_thermal_steadystate,double penta_viscosity_overshoot,double penta_reconditioning_number){
     24                                int penta_artdiff, int penta_thermal_steadystate,double penta_viscosity_overshoot,double penta_stokesreconditioning){
    2525       
    2626        int i;
     
    5959        thermal_steadystate = penta_thermal_steadystate;
    6060        viscosity_overshoot = penta_viscosity_overshoot;
    61         reconditioning_number = penta_reconditioning_number;
     61        stokesreconditioning = penta_stokesreconditioning;
    6262
    6363        return;
     
    100100        printf("   thermal_steadystate: %i\n",thermal_steadystate);
    101101        printf("   viscosity_overshoot: %i\n",viscosity_overshoot);
    102         printf("   reconditioning_number: %i\n",reconditioning_number);
     102        printf("   stokesreconditioning: %i\n",stokesreconditioning);
    103103        return;
    104104}
     
    148148        memcpy(marshalled_dataset,&thermal_steadystate,sizeof(thermal_steadystate));marshalled_dataset+=sizeof(thermal_steadystate);
    149149        memcpy(marshalled_dataset,&viscosity_overshoot,sizeof(viscosity_overshoot));marshalled_dataset+=sizeof(viscosity_overshoot);
    150         memcpy(marshalled_dataset,&reconditioning_number,sizeof(reconditioning_number));marshalled_dataset+=sizeof(reconditioning_number);
     150        memcpy(marshalled_dataset,&stokesreconditioning,sizeof(stokesreconditioning));marshalled_dataset+=sizeof(stokesreconditioning);
    151151       
    152152        *pmarshalled_dataset=marshalled_dataset;
     
    185185                sizeof(thermal_steadystate) +
    186186                sizeof(viscosity_overshoot) +
    187                 sizeof(reconditioning_number) +
     187                sizeof(stokesreconditioning) +
    188188                sizeof(int); //sizeof(int) for enum type
    189189}
     
    233233        memcpy(&thermal_steadystate,marshalled_dataset,sizeof(thermal_steadystate));marshalled_dataset+=sizeof(thermal_steadystate);
    234234        memcpy(&viscosity_overshoot,marshalled_dataset,sizeof(viscosity_overshoot));marshalled_dataset+=sizeof(viscosity_overshoot);
    235         memcpy(&reconditioning_number,marshalled_dataset,sizeof(reconditioning_number));marshalled_dataset+=sizeof(reconditioning_number);
     235        memcpy(&stokesreconditioning,marshalled_dataset,sizeof(stokesreconditioning));marshalled_dataset+=sizeof(stokesreconditioning);
    236236
    237237        /*nodes and materials are not pointing to correct objects anymore:*/
  • issm/trunk/src/c/objects/Penta.h

    r377 r387  
    5353                int    thermal_steadystate;
    5454                double viscosity_overshoot;
    55                 double reconditioning_number;
     55                double stokesreconditioning;
    5656       
    5757        public:
     
    6161                                double p, double q, int    shelf, int    onbed, int    onsurface, double meanvel,double epsvel,
    6262                                int    collapse, double melting[6], double accumulation[6], double geothermalflux[6],
    63                                 int    artdiff, int    thermal_steadystate,double viscosity_overshoot,double reconditioning_number);
     63                                int    artdiff, int    thermal_steadystate,double viscosity_overshoot,double stokesreconditioning);
    6464                ~Penta();
    6565
  • issm/trunk/src/c/objects/objects.h

    r308 r387  
    2222#include "./Icefront.h"
    2323#include "./Penpair.h"
     24#include "./Pengrid.h"
    2425#include "./Param.h"
    2526#include "./Element.h"
  • issm/trunk/src/m/classes/@model/model.m

    r377 r387  
    131131        md.gridondirichlet_diag=NaN;
    132132        md.dirichletvalues_diag=NaN;
     133       
     134        %Diagnostic stokes
     135        md.segmentonneumann_diag_stokes=NaN;
    133136
    134137        %Thermal
  • issm/trunk/src/m/classes/public/setelementstype.m

    r377 r387  
    126126md.borderstokes=borderflags-md.gridonstokes; %remove stokes grids from this list
    127127
     128%icefront for stokes
     129md.segmentonneumann_diag_stokes=md.segmentonneumann_diag(find(md.elements_type(md.segmentonneumann_diag(:,end),2)),:);
     130
    128131%figure out solution types
    129132md.ishutter=double(any(md.elements_type(:,1)==hutterenum()));
  • issm/trunk/src/m/solutions/cielo/diagnostic_core.m

    r377 r387  
    7272
    7373                %"recondition" pressure
    74                 p_g=p_g/m_ds.parameters.reconditioning_number;
     74                p_g=p_g/m_ds.parameters.stokesreconditioning;
    7575
    7676                displaystring(debug,'\n%s',['computing bed slope (x and y derivatives)...']);
     
    9595       
    9696                %"decondition" pressure
    97                 p_g=u_g(4:4:end)*m_dh.parameters.reconditioning_number;
     97                p_g=u_g(4:4:end)*m_dh.parameters.stokesreconditioning;
    9898        end
    9999end
Note: See TracChangeset for help on using the changeset viewer.