Ignore:
Timestamp:
09/06/11 11:11:00 (14 years ago)
Author:
Mathieu Morlighem
Message:

Added friction object

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/model/model.m

    r9607 r9610  
    1616                 flaim     = modelfield('default',0,'marshall',false);
    1717                 surfaceforcings = modelfield('default',0,'marshall',true);
     18                 friction  = modelfield('default',0,'marshall',true);
    1819
    1920                 %FIXME: all other fields should belong to other classes
     
    119120                 %Physical parameters
    120121
    121                  drag_coefficient = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
    122                  drag_p           = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
    123                  drag_q           = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
    124122                 rheology_B       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
    125123                 rheology_n       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
     
    408406
    409407                         %Field name change
    410                          if isfield(structmd,'drag'), md.drag_coefficient=structmd.drag; end
    411                          if isfield(structmd,'p'), md.drag_p=structmd.p; end
    412                          if isfield(structmd,'q'), md.drag_q=structmd.p; end
     408                         if isfield(structmd,'drag'), md.friction.coefficient=structmd.drag; end
     409                         if isfield(structmd,'p'), md.friction.p=structmd.p; end
     410                         if isfield(structmd,'q'), md.friction.q=structmd.p; end
    413411                         if isfield(structmd,'B'), md.rheology_B=structmd.B; end
    414412                         if isfield(structmd,'n'), md.rheology_n=structmd.n; end
     
    438436                         if isfield(structmd,'dakota_analysis'), md.dakota_analysis=structmd.dakota_analysis; end
    439437                         if isfield(structmd,'surface_mass_balance'), md.surfaceforcings.mass_balance=structmd.surface_mass_balance; end
     438                         if isfield(structmd,'drag_coefficient'), md.friction.coefficient=structmd.drag_coefficient; end
     439                         if isfield(structmd,'drag_p'), md.friction.p=structmd.drag_p; end
     440                         if isfield(structmd,'drag_q'), md.friction.q=structmd.drag_q; end
    440441
    441442                         %Field changes
     
    489490                         end
    490491                         if isnumeric(md.control_type),
    491                                  if (structmd.control_type==143), md.control_type={'DragCoefficient'}; end
     492                                 if (structmd.control_type==143), md.control_type={'FrictionCoefficient'}; end
    492493                                 if (structmd.control_type==190), md.control_type={'RheologyBbar'}; end
    493494                                 if (structmd.control_type==147), md.control_type={'Dhdt'}; end
     
    545546                         md.flaim=flaim;
    546547                         md.surfaceforcings=surfaceforcings;
     548                         md.friction=friction;
    547549
    548550                         %Materials parameters
     
    674676                         %parameter to be inferred by control methods (only
    675677                         %drag and B are supported yet)
    676                          md.control_type={'DragCoefficient'};
     678                         md.control_type={'FrictionCoefficient'};
    677679
    678680                         %number of steps in the control methods
Note: See TracChangeset for help on using the changeset viewer.