Changeset 9515


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

rheology_law now processed in marshall

Location:
issm/trunk/src
Files:
4 edited

Legend:

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

    r9479 r9515  
    6565        parameters->AddObject(iomodel->CopyConstantObject(IsprognosticEnum));
    6666        parameters->AddObject(iomodel->CopyConstantObject(IsthermalEnum));
    67 
    68         /*Some parameters need to be processed from iomodel*/
    69         char* rheology_law = NULL;
    70         iomodel->Constant(&rheology_law,RheologyLawEnum);
    71         if      (strcmp(rheology_law,"none")==0)      parameters->AddObject(new IntParam(RheologyLawEnum,NoneEnum));
    72         else if (strcmp(rheology_law,"paterson")==0)  parameters->AddObject(new IntParam(RheologyLawEnum,PatersonEnum));
    73         else if (strcmp(rheology_law,"arrhenius")==0) parameters->AddObject(new IntParam(RheologyLawEnum,ArrheniusEnum));
    74         else _error_("Rheology law %s not supported",rheology_law);
    75         xfree((void**)&rheology_law);
     67        parameters->AddObject(iomodel->CopyConstantObject(RheologyLawEnum));
    7668
    7769        /*some parameters that did not come with the iomodel: */
  • issm/trunk/src/m/classes/model.m

    r9513 r9515  
    123123                 rheology_B       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
    124124                 rheology_n       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
    125                  rheology_law     = modelfield('default','','marshall',true,'format','String');
     125                 rheology_law     = modelfield('default','','marshall',true,'preprocess','StringToEnum','format','Integer');
    126126
    127127                 %Geometrical parameters
     
    478478                         end
    479479                         if isnumeric(structmd.rheology_law),
    480                                  if (structmd.rheology_law==272), md.rheology_law='none';      end
    481                                  if (structmd.rheology_law==368), md.rheology_law='paterson';  end
    482                                  if (structmd.rheology_law==369), md.rheology_law='arrhenius'; end
     480                                 if (structmd.rheology_law==272), md.rheology_law='None';      end
     481                                 if (structmd.rheology_law==368), md.rheology_law='Paterson';  end
     482                                 if (structmd.rheology_law==369), md.rheology_law='Arrhenius'; end
    483483                         end
    484484
     
    722722                         %Rheology law: what is the temperature dependence of B with T
    723723                         %available: none, paterson and arrhenius
    724                          md.rheology_law='paterson';
     724                         md.rheology_law='Paterson';
    725725
    726726                         %i/o:
  • issm/trunk/src/m/model/display/displaymaterials.m

    r9465 r9515  
    1515fielddisplay(md,'rheology_B','flow law parameter [Pa/s^(1/n)]');
    1616fielddisplay(md,'rheology_n','Glen''s flow law exponent');
    17 fielddisplay(md,'rheology_law','law for the temperature dependance of the rheology: ''none'', ''paterson'' or ''arrhenius''');
     17fielddisplay(md,'rheology_law','law for the temperature dependance of the rheology: ''None'', ''Paterson'' or ''Arrhenius''');
    1818fielddisplay(md,'heatcapacity','heat capacity [J/kg/K]');
    1919fielddisplay(md,'thermalconductivity','ice thermal conductivity [W/m/K]');
  • issm/trunk/src/m/model/ismodelselfconsistent.m

    r9468 r9515  
    176176        message(['model not consistent: model ' md.name ' hydrostatic_adjustment field should be AbsoluteEnum or IncrementalEnum']);
    177177end
    178 if ~ismember({md.rheology_law},{'none' 'paterson' 'arrhenius'}),
     178if ~ismember({md.rheology_law},{'None' 'Paterson' 'Arrhenius'}),
    179179        message(['model not consistent: model ' md.name ' rheology_law field should be ''none'' ''paterson'' or ''arrhenius''']);
    180180end
Note: See TracChangeset for help on using the changeset viewer.