Changeset 27626


Ignore:
Timestamp:
03/01/23 07:51:05 (2 years ago)
Author:
Mathieu Morlighem
Message:

CHG: make AD work with Tikhonov and schoof

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Cfdragcoeffabsgrad.cpp

    r27169 r27626  
    116116IssmDouble Cfdragcoeffabsgrad::Cfdragcoeffabsgrad_Calculation(Element* element, int weights_enum){/*{{{*/
    117117
    118         int        domaintype,numcomponents;
     118        int        domaintype,numcomponents,frictionlaw;
    119119        IssmDouble Jelem=0.;
    120120        IssmDouble Jdet;
     
    145145        /*Get input if it already exists*/
    146146        DatasetInput *datasetinput = basalelement->GetDatasetInput(definitionenum);  _assert_(datasetinput);
    147         Input        *drag_input   = basalelement->GetInput(FrictionCoefficientEnum); _assert_(drag_input);
     147        Input        *drag_input   = NULL;
     148
     149        /* get the friction law: if 2-Weertman, 11-Schoof or 14-RegularizedCoulomb, which has a different names of C */
     150        element->FindParam(&frictionlaw, FrictionLawEnum);
     151        switch(frictionlaw) {
     152                case 2:
     153                case 11:
     154                case 14:
     155                        drag_input = basalelement->GetInput(FrictionCEnum); _assert_(drag_input);
     156                        break;
     157                default:
     158                        drag_input = basalelement->GetInput(FrictionCoefficientEnum); _assert_(drag_input);
     159        }
     160
    148161
    149162        /* Start  looping on the number of gaussian points: */
Note: See TracChangeset for help on using the changeset viewer.