Changeset 10354


Ignore:
Timestamp:
10/28/11 15:57:46 (14 years ago)
Author:
seroussi
Message:

keep cleaning grounding lines

Location:
issm/trunk/src/c/modules/GroundinglineMigrationx
Files:
3 edited

Legend:

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

    r10309 r10354  
    3939
    4040                /*Create flag for nodes above the hydrostatic equilibrium: */
    41                 double* potential_sheet_ungrounding=PotentialSheetUngrounding(elements,nodes,parameters);
     41                double* vertices_potentially_ungrounding=PotentialSheetUngrounding(elements,vertices,parameters);
    4242
    4343                /*propagate ice shelf into connex areas of the ice sheet that potentially want to unground: */
    44                 double* sheet_ungrounding=PropagateShelfIntoConnexIceSheet(elements,nodes,parameters,potential_sheet_ungrounding);
     44                double* sheet_ungrounding=PropagateShelfIntoConnexIceSheet(elements,nodes,parameters,vertices_potentially_ungrounding);
    4545
    4646                /*Now, use the sheet_ungrounding flags to unground the ice sheet (at the same time, take care of grounding elements of the ice shelf
     
    5858
    5959                /*free ressouces: */
    60                 xfree((void**)&potential_sheet_ungrounding);
     60                xfree((void**)&vertices_potentially_ungrounding);
    6161                xfree((void**)&sheet_ungrounding);
    6262        }
  • issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationxLocal.h

    r10309 r10354  
    77
    88class Elements;
     9class Vertices;
    910class Nodes;
    1011class Parameters;
    1112
    1213/* local prototypes: */
    13 double*    PotentialSheetUngrounding(Elements* elements,Nodes* nodes,Parameters* parameters);
    14 double*    PropagateShelfIntoConnexIceSheet(Elements* elements,Nodes* nodes,Parameters* parameters,double* potential_sheet_ungrounding);
     14double*    PotentialSheetUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters);
     15double*    PropagateShelfIntoConnexIceSheet(Elements* elements,Nodes* nodes,Parameters* parameters,double* vertices_potentially_ungrounding);
    1516bool*      CreateElementOnGroundingline(Elements* elements,double* element_on_iceshelf);
    1617double*    CreateElementOnIceShelf(Elements* elements);
  • issm/trunk/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationxUtils.cpp

    r10309 r10354  
    77#include "../../shared/shared.h"
    88#include "../../io/io.h"
    9 #include "../../io/io.h"
    109#include "../../include/include.h"
    1110#include "../../toolkits/toolkits.h"
     
    1312
    1413/*FUNCTION PotentialSheetUngrounding {{{1*/
    15 double*    PotentialSheetUngrounding(Elements* elements,Nodes* nodes,Parameters* parameters){
    16 
    17         int      i;
    18         Element* element=NULL;
    19         Vec      vec_potential_sheet_ungrounding=NULL;
    20         double*  potential_sheet_ungrounding=NULL;
    21         int      numnods;
    22         int      configuration_type;
    23 
    24         /*recover parameters: */
    25         parameters->FindParam(&configuration_type,ConfigurationTypeEnum);
    26        
    27         /*First, initialize vec_new_shelf_nodes, which will track which nodes have changed status: */
    28         numnods=nodes->NumberOfNodes(configuration_type);
    29         vec_potential_sheet_ungrounding=NewVec(numnods);
    30 
    31         /*Loop through elements, and fill vec_potential_sheet_ungrounding: */
    32         for(i=0;i<elements->Size();i++){
    33                 element=(Element*)elements->GetObjectByOffset(i);
    34                 element->PotentialSheetUngrounding(vec_potential_sheet_ungrounding);
    35         }
    36 
    37         /*Assemble vector: */
    38         VecAssemblyBegin(vec_potential_sheet_ungrounding);
    39         VecAssemblyEnd(vec_potential_sheet_ungrounding);
     14double*    PotentialSheetUngrounding(Elements* elements,Vertices* vertices,Parameters* parameters){
     15
     16        int      i,numberofvertices;
     17        double*  vertices_potentially_ungrounding      = NULL;
     18        Vec      vec_vertices_potentially_ungrounding = NULL;
     19        Element* element                               = NULL;
     20
     21        /*Initialize vector with number of vertices*/
     22        numberofvertices=vertices->NumberOfVertices();
     23        vec_vertices_potentially_ungrounding=NewVec(numberofvertices); //grounded vertex that could start floating
     24
     25        /*Fill vector vertices_potentially_floating: */
     26        for(i=0;i<elements->Size();i++){
     27                element=(Element*)elements->GetObjectByOffset(i);
     28                element->PotentialSheetUngrounding(vec_vertices_potentially_ungrounding);
     29        }
     30
     31        /*Assemble vector: */
     32        VecAssemblyBegin(vec_vertices_potentially_ungrounding);
     33        VecAssemblyEnd(vec_vertices_potentially_ungrounding);
    4034
    4135        /*Serialize vector: */
    42         VecToMPISerial(&potential_sheet_ungrounding,vec_potential_sheet_ungrounding);
    43 
    44         /*free ressouces: */
    45         VecFree(&vec_potential_sheet_ungrounding);
    46 
    47         return potential_sheet_ungrounding;
     36        VecToMPISerial(&vertices_potentially_ungrounding,vec_vertices_potentially_ungrounding);
     37
     38        /*free ressouces and return: */
     39        VecFree(&vec_vertices_potentially_ungrounding);
     40        return vertices_potentially_ungrounding;
    4841}
    4942/*}}}*/
Note: See TracChangeset for help on using the changeset viewer.