Changeset 3511


Ignore:
Timestamp:
04/12/10 08:51:41 (15 years ago)
Author:
seroussi
Message:

fixed problem with icefront Stokes

Location:
issm/trunk/src/c/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Icefront.cpp

    r3463 r3511  
    112112        icefront_b[1]=iomodel->bed[i2-1];
    113113
    114         if ((int)*(iomodel->elements_type+2*element+0)==MacAyealFormulationEnum()){ //this is a collapsed 3d element, icefront will be 2d
    115                 strcpy(icefront_type,"segment");
    116         }
    117         else if ((int)*(iomodel->elements_type+2*element+0)==PattynFormulationEnum()){ //this is a real 3d element, icefront will be 3d.
     114        if (iomodel->sub_analysis_type==HorizAnalysisEnum()){
     115                if ((int)*(iomodel->elements_type+2*element+0)==MacAyealFormulationEnum()){ //this is a collapsed 3d element, icefront will be 2d
     116                        strcpy(icefront_type,"segment");
     117                }
     118                else if ((int)*(iomodel->elements_type+2*element+0)==PattynFormulationEnum()){ //this is a real 3d element, icefront will be 3d.
     119                        strcpy(icefront_type,"quad");
     120                        i3=(int)*(iomodel->pressureload+segment_width*i+2);
     121                        i4=(int)*(iomodel->pressureload+segment_width*i+3);
     122                        icefront_node_ids[2]=i3;
     123                        icefront_node_ids[3]=i4;
     124
     125                        icefront_h[2]=iomodel->thickness[i3-1];
     126                        icefront_h[3]=iomodel->thickness[i4-1];
     127
     128                        icefront_b[2]=iomodel->bed[i3-1];
     129                        icefront_b[3]=iomodel->bed[i4-1];
     130                }
     131                else{
     132                        ISSMERROR(exprintf(" element type %i not supported yet",(int)*(iomodel->elements_type+2*element+0)));
     133                }
     134        }
     135        else if (iomodel->sub_analysis_type==StokesAnalysisEnum()){
     136                //We have a Stokes element, so we need a 3d Icefront
    118137                strcpy(icefront_type,"quad");
    119138                i3=(int)*(iomodel->pressureload+segment_width*i+2);
     
    128147                icefront_b[3]=iomodel->bed[i4-1];
    129148        }
    130         else{
    131                 ISSMERROR(exprintf(" element type %i not supported yet",(int)*(iomodel->elements_type+2*element+0)));
    132         }
     149        else ISSMERROR("Not supported yet!");
    133150
    134151        this->Init(icefront_type,icefront_fill,icefront_sid,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b);
  • issm/trunk/src/c/objects/Icefront.h

    r3463 r3511  
    2626                char  type[ICEFRONTSTRING];
    2727                int   fill;
    28                 int       sid;
     28                int     sid;
    2929       
    3030                /*material: */
    31                 int mparid; //material id
     31                int     mparid; //material id
    3232                Matpar* matpar;
    33                 int   matpar_offset;
     33                int     matpar_offset;
    3434       
    3535                /*element of icefront: */
    36                 int     element_type;
    37                 int     eid;  //id of element on ice front
     36                int        element_type;
     37                int      eid;  //id of element on ice front
    3838                Element* element;
    39                 int     element_offset;
     39                int      element_offset;
    4040
    4141                /*nodes: */
Note: See TracChangeset for help on using the changeset viewer.