Changeset 3105


Ignore:
Timestamp:
02/23/10 17:02:40 (15 years ago)
Author:
Mathieu Morlighem
Message:

Added fill in ice front

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

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp

    r3098 r3105  
    3434        /*icefront intermediary data: */
    3535        char icefront_type[ICEFRONTSTRING];
    36         int icefront_element_type;
    37         int     icefront_sid;
    38         int icefront_eid;
    39         int icefront_mparid;
    40         int     icefront_node_ids[MAX_ICEFRONT_GRIDS];
     36        int  icefront_fill;
     37        int  icefront_element_type;
     38        int  icefront_sid;
     39        int  icefront_eid;
     40        int  icefront_mparid;
     41        int  icefront_node_ids[MAX_ICEFRONT_GRIDS];
    4142        double icefront_h[MAX_ICEFRONT_GRIDS];
    4243        double  icefront_b[MAX_ICEFRONT_GRIDS];
     
    115116                icefront_mparid=iomodel->numberofelements+1; //matlab indexing
    116117                icefront_sid=i+1; //matlab indexing
    117                 icefront_eid=(int)*(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing
     118                icefront_fill=(int)*(iomodel->pressureload+segment_width*i+segment_width-1);
     119                icefront_eid=(int) *(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing
    118120                icefront_element_type=element_type;
    119121
     
    150152                }
    151153
    152                 icefront = new Icefront(icefront_type,icefront_sid,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b);
     154                icefront = new Icefront(icefront_type,icefront_fill,icefront_sid,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b);
    153155               
    154156                loads->AddObject(icefront);
  • issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp

    r3098 r3105  
    3333        /*icefront intermediary data: */
    3434        char icefront_type[ICEFRONTSTRING];
    35         int icefront_element_type;
    36         int     icefront_sid;
     35        int  icefront_fill;
     36        int  icefront_element_type;
     37        int  icefront_sid;
    3738        int icefront_eid;
    3839        int icefront_mparid;
     
    9293                icefront_mparid=iomodel->numberofelements+1; //matlab indexing
    9394                icefront_sid=count+1; //matlab indexing
    94                 icefront_eid=(int)*(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing
     95                icefront_fill=(int)*(iomodel->pressureload+segment_width*i+segment_width-1);
     96                icefront_eid=(int) *(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing
    9597                icefront_element_type=PentaEnum();
    9698
     
    115117                icefront_b[3]=iomodel->bed[i4-1];
    116118       
    117                 icefront = new Icefront(icefront_type,icefront_sid,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b);
     119                icefront = new Icefront(icefront_type,icefront_fill,icefront_sid,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b);
    118120               
    119121                loads->AddObject(icefront);
  • issm/trunk/src/c/objects/Icefront.cpp

    r2907 r3105  
    2626/*}}}*/
    2727/*FUNCTION Icefront creation {{{1*/
    28 Icefront::Icefront(char icefront_type[ICEFRONTSTRING],int icefront_sid, int icefront_mparid, int icefront_eid, int icefront_element_type,
     28Icefront::Icefront(char icefront_type[ICEFRONTSTRING],int icefront_fill,int icefront_sid, int icefront_mparid, int icefront_eid, int icefront_element_type,
    2929                int icefront_node_ids[MAX_ICEFRONT_GRIDS],double icefront_h[MAX_ICEFRONT_GRIDS],double  icefront_b[MAX_ICEFRONT_GRIDS]){
    3030
     
    3232       
    3333        strcpy(type,icefront_type);
     34        fill=icefront_fill;
    3435        sid=icefront_sid;
    3536       
     
    7576
    7677        memcpy(&type,marshalled_dataset,sizeof(type));marshalled_dataset+=sizeof(type);
     78        memcpy(&fill,marshalled_dataset,sizeof(fill));marshalled_dataset+=sizeof(fill);
    7779        memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);
    7880       
     
    116118        /*marshall Icefront data: */
    117119        memcpy(marshalled_dataset,&type,sizeof(type));marshalled_dataset+=sizeof(type);
     120        memcpy(marshalled_dataset,&fill,sizeof(fill));marshalled_dataset+=sizeof(fill);
    118121        memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);
    119122       
     
    139142
    140143        return sizeof(type)+
     144          sizeof(fill)+
    141145                sizeof(sid)+
    142146                sizeof(mparid)+
     
    251255}       
    252256/*}}}*/
    253 /*FUNCTION Icefront CreatePVectorDiagnosticHorizStokes {{{1*/
     257/*FUNCTION Icefront CreatePVectorDiagnosticHorizSegment{{{1*/
    254258#undef __FUNCT__
    255259#define __FUNCT__ "Icefront::CreatePVectorDiagnosticHorizSegment"
     
    277281        double normal[2];
    278282        double length;
    279         int    fill;
    280283
    281284        /*Objects: */
     
    287290        inputs=(ParameterInputs*)vinputs;
    288291
    289         /*Recover material and fill parameters: */
     292        /*Recover material */
    290293        matpar=(Matpar*)element->GetMatPar();
    291         if (element->GetShelf())fill=WaterEnum();
    292         else fill=AirEnum();
    293294
    294295        //check that the element is onbed (collapsed formulation) otherwise:pe=0
     
    380381        int   doflist[numdofs];
    381382
    382         int    fill;
    383383        double xyz_list[numgrids][3];
    384384        double xyz_list_quad[numgrids+1][3]; //center node
     
    416416                throw ErrorException(__FUNCT__," quad icefront is associated to a TriaElem!");
    417417        }
    418         /*Recover material and fill parameters: */
     418        /*Recover material*/
    419419        matpar=(Matpar*)element->GetMatPar();
    420         if (element->GetShelf())fill=WaterEnum();
    421         else fill=AirEnum();
    422420
    423421        /* Set pe_g to 0: */
     
    543541        int   doflist[numdofs];
    544542
    545         int    fill;
    546543        double xyz_list[numgrids][3];
    547544        double xyz_list_quad[numgrids+1][3]; //center node
     
    579576                throw ErrorException(__FUNCT__," quad icefront is associated to a TriaElem!");
    580577        }
    581         /*Recover material and fill parameters: */
     578        /*Recover material*/
    582579        matpar=(Matpar*)element->GetMatPar();
    583         if (element->GetShelf())fill=WaterEnum();
    584         else fill=AirEnum();
    585580
    586581        /* Set pe_g to 0: */
     
    699694        printf("Icefront:\n");
    700695        printf("   type: %s\n",type);
     696        printf("   fill: %i\n",fill);
    701697        printf("   sid: %i\n",sid);
    702698       
     
    743739        printf("Icefront:\n");
    744740        printf("   type: %s\n",type);
     741        printf("   fill: %i\n",fill);
    745742        printf("   sid: %i\n",sid);
    746743       
     
    14151412                }
    14161413                else{
    1417                         throw ErrorException(__FUNCT__," fill type not supported yet");
     1414                        throw ErrorException(__FUNCT__,exprintf("fill type %i not supported yet",fill));
    14181415                }
    14191416
  • issm/trunk/src/c/objects/Icefront.h

    r803 r3105  
    1919        private:
    2020                char    type[ICEFRONTSTRING];
    21                 int             sid;
     21                int   fill;
     22                int     sid;
    2223       
    2324                /*material: */
     
    4445
    4546                Icefront();
    46                 Icefront(char type[ICEFRONTSTRING],int sid, int mparid, int eid, int element_type, int node_ids[MAX_ICEFRONT_GRIDS],double h[MAX_ICEFRONT_GRIDS],double b[MAX_ICEFRONT_GRIDS]);
     47                Icefront(char type[ICEFRONTSTRING],int fill,int sid, int mparid, int eid, int element_type, int node_ids[MAX_ICEFRONT_GRIDS],double h[MAX_ICEFRONT_GRIDS],double        b[MAX_ICEFRONT_GRIDS]);
    4748                ~Icefront();
    4849
Note: See TracChangeset for help on using the changeset viewer.