Changeset 9513


Ignore:
Timestamp:
08/31/11 11:01:17 (14 years ago)
Author:
Mathieu Morlighem
Message:

preprocess pressureload in marshall

Location:
issm/trunk/src
Files:
3 edited

Legend:

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

    r9465 r9513  
    8989
    9090        /*Fill*/
    91         switch((int)iomodel->Data(PressureloadEnum)[segment_width*i+segment_width-1]){
    92                 case 0: icefront_fill=AirEnum; break;
    93                 case 1: icefront_fill=WaterEnum; break;
    94                 case 2: icefront_fill=IceEnum; break;
    95                 default: _error_("Fill %i not supported",iomodel->Data(PressureloadEnum)[segment_width*i+segment_width-1]);
    96         }
     91        icefront_fill=(int)iomodel->Data(PressureloadEnum)[segment_width*i+segment_width-1];
    9792       
    9893        /*Ok, we have everything to build the object: */
  • issm/trunk/src/m/classes/model.m

    r9509 r9513  
    140140                 %Boundary conditions
    141141                 nodeonboundary = modelfield('default',NaN,'marshall',false);
    142                  pressureload   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
     142                 pressureload   = modelfield('default',NaN,'marshall',true,'preprocess','marshallpressureload','format','DoubleMat','mattype',3);
    143143                 spcvx          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
    144144                 spcvy          = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
  • issm/trunk/src/m/model/marshall.m

    r9509 r9513  
    340340function out=marshallverbose(in)
    341341        out = VerboseToBinary(in);
     342function out=marshallpressureload(in)
     343        out=in;
     344        pos=find(in(:,end)==0); out(pos,end)=AirEnum;
     345        pos=find(in(:,end)==1); out(pos,end)=WaterEnum;
     346        pos=find(in(:,end)==2); out(pos,end)=IceEnum;
Note: See TracChangeset for help on using the changeset viewer.