Changeset 5136


Ignore:
Timestamp:
08/10/10 16:34:40 (15 years ago)
Author:
seroussi
Message:

specity front_type when creating ice front

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

Legend:

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

    r5125 r5136  
    3030/*}}}*/
    3131/*FUNCTION Icefront::Icefront(int id, int i, IoModel* iomodel,int analysis_type) {{{1*/
    32 Icefront::Icefront(int icefront_id,int i, IoModel* iomodel,int in_analysis_type){
     32Icefront::Icefront(int icefront_id,int i, IoModel* iomodel,int in_icefront_type, int in_analysis_type){
    3333
    3434        int segment_width;
     
    4141        int  icefront_node_ids[MAX_ICEFRONT_GRIDS];
    4242        int  icefront_fill;
    43         int  icefront_type;
    4443
    4544        /*First, retrieve element index and element type: */
     
    5655        icefront_mparid=iomodel->numberofelements+1; //matlab indexing
    5756
    58         icefront_node_ids[0]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+0);
    59         icefront_node_ids[1]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+1);
    60 
    61         if (in_analysis_type==DiagnosticHorizAnalysisEnum){
    62                 if ((int)*(iomodel->elements_type+2*element+0)==MacAyealApproximationEnum){ //this is a collapsed 3d element, icefront will be 2d
    63                         icefront_type=SegmentIcefrontEnum;
    64                 }
    65                 else if ((int)*(iomodel->elements_type+2*element+0)==PattynApproximationEnum){ //this is a real 3d element, icefront will be 3d.
    66                         icefront_type=QuadIceFrontEnum;
    67                         icefront_node_ids[2]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+2);
    68                         icefront_node_ids[3]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+3);
    69                 }
    70                 else ISSMERROR(" element type %i not supported yet",(int)*(iomodel->elements_type+2*element+0));
    71         }
    72         else if (in_analysis_type==DiagnosticStokesAnalysisEnum){
    73                 //We have a Stokes element, so we need a 3d Icefront
    74                 icefront_type=QuadIceFrontEnum;
     57        if (in_icefront_type==QuadIceFrontEnum){
     58                icefront_node_ids[0]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+0);
     59                icefront_node_ids[1]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+1);
     60        }
     61        else if (in_icefront_type==QuadIceFrontEnum){
     62                icefront_node_ids[0]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+0);
     63                icefront_node_ids[1]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+1);
    7564                icefront_node_ids[2]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+2);
    7665                icefront_node_ids[3]=iomodel->nodecounter+(int)*(iomodel->pressureload+segment_width*i+3);
     
    7867        else ISSMERROR("analysis_type %s not supported yet!",EnumToString(in_analysis_type));
    7968
    80         if (icefront_type==QuadIceFrontEnum) num_nodes=4;
     69        if (in_icefront_type==QuadIceFrontEnum) num_nodes=4;
    8170        else num_nodes=2;
    8271        icefront_fill=(int)*(iomodel->pressureload+segment_width*i+segment_width-1);
     
    9483        this->inputs=new Inputs();
    9584        this->inputs->AddInput(new IntInput(FillEnum,icefront_fill));
    96         this->inputs->AddInput(new IntInput(TypeEnum,icefront_type));
     85        this->inputs->AddInput(new IntInput(TypeEnum,in_icefront_type));
    9786       
    9887        //this->parameters: we still can't point to it, it may not even exist. Configure will handle this.
  • issm/trunk/src/c/objects/Loads/Icefront.h

    r5096 r5136  
    3535                /*Icefront constructors, destructors: {{{1*/
    3636                Icefront();
    37                 Icefront(int icefront_id,int i, IoModel* iomodel,int analysis_type);
     37                Icefront(int icefront_id,int i, IoModel* iomodel,int in_icefront_type, int analysis_type);
    3838                ~Icefront();
    3939                /*}}}*/
Note: See TracChangeset for help on using the changeset viewer.