Ignore:
Timestamp:
05/31/22 06:20:44 (3 years ago)
Author:
Mathieu Morlighem
Message:

CHG: moving MLHO to MOLHO

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk-jpl/src/m/parameterization/setflowequation.js

    r25609 r27031  
    33//
    44//   This routine works like plotmodel: it works with an even number of inputs
    5 //   'SIA','SSA','L1L2','MLHO','HO','FS' and 'fill' are the possible options
     5//   'SIA','SSA','L1L2','MOLHO','HO','FS' and 'fill' are the possible options
    66//   that must be followed by the corresponding exp file or flags list
    77//   It can either be a domain file (argus type, .exp extension), or an array of element flags.
     
    1111//   a string 'all' will be considered as the entire domain
    1212//   You can specify the type of coupling, 'penalties' or 'tiling', to use with the input 'coupling'
    13 //   NB: L1L2 and MLHO cannot currently be coupled to any other ice flow model
     13//   NB: L1L2 and MOLHO cannot currently be coupled to any other ice flow model
    1414//
    1515//   Usage:
     
    3838        HOflag   = FlagElements(md,options.getfieldvalue('HO',''));
    3939        L1L2flag = FlagElements(md,options.getfieldvalue('L1L2',''));
    40         MLHOflag = FlagElements(md,options.getfieldvalue('MLHO',''));
     40        MOLHOflag = FlagElements(md,options.getfieldvalue('MOLHO',''));
    4141        FSflag   = FlagElements(md,options.getfieldvalue('FS',''));
    4242        filltype = options.getfieldvalue('fill','none');
     
    5555
    5656        //check that each element has at least one flag
    57         for(var i=0;i<md.mesh.numberofelements;i++)if((SIAflag[i] + SSAflag[i] + HOflag[i] + L1L2flag[i] + MLHOflag[i] + FSflag[i])==0)
     57        for(var i=0;i<md.mesh.numberofelements;i++)if((SIAflag[i] + SSAflag[i] + HOflag[i] + L1L2flag[i] + MOLHOflag[i] + FSflag[i])==0)
    5858        throw Error("elements type not assigned, supported models are 'SIA','SSA','HO' and 'FS'");
    5959
    6060        //check that each element has only one flag
    61         if (ArrayAnyAboveStrict(ArrayXPY(SIAflag,SSAflag,HOflag,L1L2flag,MLHOflag),1)){
     61        if (ArrayAnyAboveStrict(ArrayXPY(SIAflag,SSAflag,HOflag,L1L2flag,MOLHOflag),1)){
    6262                console.log('setflowequation warning message: some elements have several types, higher order type is used for them')
    6363
     
    7171        //check that L1L2 is not coupled to any other model for now
    7272        if (ArrayAnyEqual(L1L2flag,1) & ArrayAnyEqual(ArrayOr(SIAflag,SSAflag,HOflag,FSflag),1)) throw Error('L1L2 cannot be coupled to any other model');
    73         if (ArrayAnyEqual(MLHOflag,1) & ArrayAnyEqual(ArrayOr(SIAflag,SSAflag,HOflag,FSflag),1)) throw Error('MLHO cannot be coupled to any other model');
     73        if (ArrayAnyEqual(MOLHOflag,1) & ArrayAnyEqual(ArrayOr(SIAflag,SSAflag,HOflag,FSflag),1)) throw Error('MOLHO cannot be coupled to any other model');
    7474
    7575        //Check that no HO or FS for 2d mesh
     
    100100        for(var i=0;i<pos.length;i++) for(var j=0;j<md.mesh.elements[0].length;j++) nodeonL1L2[md.mesh.elements[pos[i]][j]-1]=1;
    101101
    102         nodeonMLHO=NewArrayFill(md.mesh.numberofvertices,0);
    103         pos=ArrayFind(MLHOflag,1);
    104         for(var i=0;i<pos.length;i++) for(var j=0;j<md.mesh.elements[0].length;j++) nodeonMLHO[md.mesh.elements[pos[i]][j]-1]=1;
     102        nodeonMOLHO=NewArrayFill(md.mesh.numberofvertices,0);
     103        pos=ArrayFind(MOLHOflag,1);
     104        for(var i=0;i<pos.length;i++) for(var j=0;j<md.mesh.elements[0].length;j++) nodeonMOLHO[md.mesh.elements[pos[i]][j]-1]=1;
    105105
    106106        nodeonFS=NewArrayFill(md.mesh.numberofvertices,0);
     
    262262        pos=ArrayFind(SSAflag,1);for(var i=0;i<pos.length;i++)md.flowequation.element_equation[pos[i]]=2;
    263263        pos=ArrayFind(L1L2flag,1);for(var i=0;i<pos.length;i++)md.flowequation.element_equation[pos[i]]=3;
    264         pos=ArrayFind(MLHOflag,1);for(var i=0;i<pos.length;i++)md.flowequation.element_equation[pos[i]]=4;
     264        pos=ArrayFind(MOLHOflag,1);for(var i=0;i<pos.length;i++)md.flowequation.element_equation[pos[i]]=4;
    265265        pos=ArrayFind(HOflag,1);for(var i=0;i<pos.length;i++)md.flowequation.element_equation[pos[i]]=5;
    266266        pos=ArrayFind(FSflag,1);for(var i=0;i<pos.length;i++)md.flowequation.element_equation[pos[i]]=6;
     
    281281        pos=ArrayFind(nodeonSSA,1);for(var i=0;i<pos.length;i++)md.flowequation.vertex_equation[pos[i]]=2;
    282282        pos=ArrayFind(nodeonL1L2,1);for(var i=0;i<pos.length;i++)md.flowequation.vertex_equation[pos[i]]=3;
    283         pos=ArrayFind(nodeonMLHO,1);for(var i=0;i<pos.length;i++)md.flowequation.vertex_equation[pos[i]]=4;
     283        pos=ArrayFind(nodeonMOLHO,1);for(var i=0;i<pos.length;i++)md.flowequation.vertex_equation[pos[i]]=4;
    284284        pos=ArrayFind(nodeonHO,1);for(var i=0;i<pos.length;i++)md.flowequation.vertex_equation[pos[i]]=5;
    285285        pos=ArrayFind(nodeonFS,1);for(var i=0;i<pos.length;i++)md.flowequation.vertex_equation[pos[i]]=6;
     
    301301        md.flowequation.isSSA  = ArrayAnyEqual(md.flowequation.element_equation,2);
    302302        md.flowequation.isL1L2 = ArrayAnyEqual(md.flowequation.element_equation,3);
    303         md.flowequation.isMLHO = ArrayAnyEqual(md.flowequation.element_equation,4);
     303        md.flowequation.isMOLHO = ArrayAnyEqual(md.flowequation.element_equation,4);
    304304        md.flowequation.isHO   = ArrayAnyEqual(md.flowequation.element_equation,5);
    305305        md.flowequation.isFS   = ArrayAnyEqual(md.flowequation.element_equation,6);
Note: See TracChangeset for help on using the changeset viewer.