Changeset 10376


Ignore:
Timestamp:
10/31/11 13:15:50 (13 years ago)
Author:
seroussi
Message:

improved names grounding line

Location:
issm/trunk/src/c
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp

    r10369 r10376  
    3030
    3131                /*propagate ice shelf into connex areas of the ice sheet that potentially want to unground: */
    32                 vertices_ungrounding=PropagateShelfIntoConnexIceSheet(elements,nodes,vertices,parameters,vertices_potentially_ungrounding);
     32                vertices_ungrounding=PropagateFloatingiceToGrounded(elements,nodes,vertices,parameters,vertices_potentially_ungrounding);
    3333        }
    3434
     
    3636        for(i=0;i<elements->Size();i++){
    3737                element=(Element*)elements->GetObjectByOffset(i);
    38                 element->Migration(vertices_ungrounding);
     38                element->MigrateGroundingLine(vertices_ungrounding);
    3939        }
    4040
     
    7979}
    8080/*}}}*/
    81 /*FUNCTION PropagateShelfIntoConnexIceSheet {{{1*/
    82 double*    PropagateShelfIntoConnexIceSheet(Elements* elements,Nodes* nodes,Vertices* vertices,Parameters* parameters,double* vertices_potentially_ungrounding){
     81/*FUNCTION PropagateFloatingiceToGrounded {{{1*/
     82double*    PropagateFloatingiceToGrounded(Elements* elements,Nodes* nodes,Vertices* vertices,Parameters* parameters,double* vertices_potentially_ungrounding){
    8383
    8484        int      i,analysis_type;
    8585        int      numberofvertices;
    8686        int      nflipped,local_nflipped;
    87         double*  nodes_on_iceshelf             = NULL;
    88         double*  elements_touching_iceshelf    = NULL;
    89         Vec      vec_element_touching_iceshelf = NULL;
    90         Vec      vec_nodes_on_iceshelf         = NULL;
    91         Node*    node                          = NULL;
    92         Element* element                       = NULL;
     87        double*  nodes_on_floatingice                  = NULL;
     88        double*  elements_neighbouring_floatingce      = NULL;
     89        Vec      vec_elements_neighbouring_floatingice = NULL;
     90        Vec      vec_nodes_on_floatingice              = NULL;
     91        Node*    node                                  = NULL;
     92        Element* element                               = NULL;
    9393
    9494
     
    9797        numberofvertices=vertices->NumberOfVertices();
    9898
    99         /*recover vec_nodes_on_iceshelf*/
    100         vec_nodes_on_iceshelf=NewVec(numberofvertices);
     99        /*recover vec_nodes_on_floatingice*/
     100        vec_nodes_on_floatingice=NewVec(numberofvertices);
    101101
    102         /*Loop through nodes, and fill nodes_on_iceshelf: */
     102        /*Loop through nodes, and fill nodes_on_floatingice: */
    103103        for(i=0;i<nodes->Size();i++){
    104104                node=(Node*)nodes->GetObjectByOffset(i);
    105105                if(node->InAnalysis(analysis_type)){
    106106                        if(node->IsFloating()){
    107                                 VecSetValue(vec_nodes_on_iceshelf,node->Sid(),1.0,INSERT_VALUES);
     107                                VecSetValue(vec_nodes_on_floatingice,node->Sid(),1.0,INSERT_VALUES);
    108108                        }
    109109                }
     
    111111
    112112        /*Assemble vector and serialize: */
    113         VecAssemblyBegin(vec_nodes_on_iceshelf);
    114         VecAssemblyEnd(vec_nodes_on_iceshelf);
    115         VecToMPISerial(&nodes_on_iceshelf,vec_nodes_on_iceshelf);
     113        VecAssemblyBegin(vec_nodes_on_floatingice);
     114        VecAssemblyEnd(vec_nodes_on_floatingice);
     115        VecToMPISerial(&nodes_on_floatingice,vec_nodes_on_floatingice);
    116116
    117117        nflipped=1; //bootstrap
     
    119119               
    120120                /*Vector of size number of elements*/
    121                 vec_element_touching_iceshelf=NewVec(elements->NumberOfElements(),true);
     121                vec_elements_neighbouring_floatingice=NewVec(elements->NumberOfElements(),true);
    122122
    123123                /*Figure out if any of the nodes of the element will be floating -> elements neighbouting the floating ice*/
    124124                for(i=0;i<elements->Size();i++){
    125125                        element=(Element*)elements->GetObjectByOffset(i);
    126                         VecSetValue(vec_element_touching_iceshelf,element->Sid(),element->IsNodeOnShelfFromFlags(nodes_on_iceshelf)?1.0:0.0,INSERT_VALUES);
     126                        VecSetValue(vec_elements_neighbouring_floatingice,element->Sid(),element->IsNodeOnShelfFromFlags(nodes_on_floatingice)?1.0:0.0,INSERT_VALUES);
    127127                }
    128128
    129129                /*Assemble vector and serialize: */
    130                 VecAssemblyBegin(vec_element_touching_iceshelf);
    131                 VecAssemblyEnd(vec_element_touching_iceshelf);
    132                 VecToMPISerial(&elements_touching_iceshelf,vec_element_touching_iceshelf);
     130                VecAssemblyBegin(vec_elements_neighbouring_floatingice);
     131                VecAssemblyEnd(vec_elements_neighbouring_floatingice);
     132                VecToMPISerial(&elements_neighbouring_floatingce,vec_elements_neighbouring_floatingice);
    133133
    134                 /*Go through elements_touching_iceshelf, and flag their nodes that can unground inside potential_sheet_ungrounding*/
     134                /*Go through elements_neighbouring_floatingce, and update vector of the nodes that will start floating*/
    135135                local_nflipped=0;
    136136                for(i=0;i<elements->Size();i++){
    137137                        element=(Element*)elements->GetObjectByOffset(i);
    138                         if(elements_touching_iceshelf[element->Sid()]){
    139                                 local_nflipped+=element->UpdatePotentialSheetUngrounding(vertices_potentially_ungrounding,vec_nodes_on_iceshelf,nodes_on_iceshelf);
     138                        if(elements_neighbouring_floatingce[element->Sid()]){
     139                                local_nflipped+=element->UpdatePotentialSheetUngrounding(vertices_potentially_ungrounding,vec_nodes_on_floatingice,nodes_on_floatingice);
    140140                        }
    141141                }
     142                VecAssemblyBegin(vec_nodes_on_floatingice);
     143                VecAssemblyEnd(vec_nodes_on_floatingice);
    142144               
    143145                MPI_Allreduce(&local_nflipped,&nflipped,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
     
    145147
    146148                /*Avoid leaks: */
    147                 xfree((void**)&elements_touching_iceshelf);
    148                 xfree((void**)&nodes_on_iceshelf);
     149                xfree((void**)&elements_neighbouring_floatingce);
     150                xfree((void**)&nodes_on_floatingice);
    149151
    150152                /*Assemble and serialize:*/
    151                 VecFree(&vec_element_touching_iceshelf);
    152                 VecAssemblyBegin(vec_nodes_on_iceshelf);
    153                 VecAssemblyEnd(vec_nodes_on_iceshelf);
    154                 VecToMPISerial(&nodes_on_iceshelf,vec_nodes_on_iceshelf);
     153                VecFree(&vec_elements_neighbouring_floatingice);
     154                VecToMPISerial(&nodes_on_floatingice,vec_nodes_on_floatingice);
    155155        }
    156156
    157157        /*Free ressources:*/
    158         VecFree(&vec_nodes_on_iceshelf);
    159         xfree((void**)&elements_touching_iceshelf);
     158        VecFree(&vec_nodes_on_floatingice);
     159        xfree((void**)&elements_neighbouring_floatingce);
    160160
    161         return nodes_on_iceshelf;
     161        return nodes_on_floatingice;
    162162}
    163163/*}}}*/
  • issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.h

    r10369 r10376  
    1414void       GroundinglineMigrationx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters);
    1515double*    PotentialSheetUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters);
    16 double*    PropagateShelfIntoConnexIceSheet(Elements* elements,Nodes* nodes,Vertices* vertices,Parameters* parameters,double* vertices_potentially_ungrounding);
     16double*    PropagateFloatingiceToGrounded(Elements* elements,Nodes* nodes,Vertices* vertices,Parameters* parameters,double* vertices_potentially_ungrounding);
    1717#endif  /* _GROUNDINGLINEMIGRATIONX_H */
  • issm/trunk/src/c/objects/Elements/Element.h

    r10373 r10376  
    6565                virtual int*   GetHorizontalNeighboorSids(void)=0;
    6666                virtual double TimeAdapt()=0;
    67                 virtual void   Migration(double* sheet_ungrounding)=0;
     67                virtual void   MigrateGroundingLine(double* sheet_ungrounding)=0;
    6868                virtual void   ShelfSync()=0;
    6969                virtual void   PotentialSheetUngrounding(Vec potential_sheet_ungrounding)=0;
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r10375 r10376  
    304304void  Penta::AverageOntoPartition(Vec partition_contributions,Vec partition_areas,double* vertex_response,double* qmu_part){
    305305        _error_("Not supported yet!");
    306 }
    307 /*}}}*/
    308 /*FUNCTION Penta::Migration{{{1*/
    309 void  Penta::Migration(double* sheet_ungrounding){
    310         _error_("not supported yet!");
    311306}
    312307/*}}}*/
     
    20462041
    20472042}/*}}}*/
     2043/*FUNCTION Penta::MigrateGroundingLine{{{1*/
     2044void  Penta::MigrateGroundingLine(double* sheet_ungrounding){
     2045        _error_("not supported yet!");
     2046}
     2047/*}}}*/
    20482048/*FUNCTION Penta::MinEdgeLength{{{1*/
    20492049double Penta::MinEdgeLength(double xyz_list[6][3]){
  • issm/trunk/src/c/objects/Elements/Penta.h

    r10375 r10376  
    103103               
    104104                void   InputToResult(int enum_type,int step,double time);
    105                 void   Migration(double* sheet_ungrounding);
     105                void   MigrateGroundingLine(double* sheet_ungrounding);
    106106                void   PotentialSheetUngrounding(Vec potential_sheet_ungrounding);
    107107                void   ShelfSync();
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r10373 r10376  
    19221922
    19231923}/*}}}*/
    1924 /*FUNCTION Tria::Migration{{{1*/
    1925 void  Tria::Migration(double* sheet_ungrounding){
     1924/*FUNCTION Tria::MigrateGroundingLine{{{1*/
     1925void  Tria::MigrateGroundingLine(double* sheet_ungrounding){
    19261926
    19271927        int     i,migration_style,unground;
  • issm/trunk/src/c/objects/Elements/Tria.h

    r10375 r10376  
    102102                void   DeleteResults(void);
    103103                void   MaterialUpdateFromTemperature(void){_error_("not implemented yet");};
    104                 void   Migration(double* sheet_ungrounding);
     104                void   MigrateGroundingLine(double* sheet_ungrounding);
    105105                void   ShelfSync();
    106106                void   PotentialSheetUngrounding(Vec potential_sheet_ungrounding);
Note: See TracChangeset for help on using the changeset viewer.