Changeset 25854


Ignore:
Timestamp:
12/11/20 11:58:04 (4 years ago)
Author:
Mathieu Morlighem
Message:

CHG: schoof inversion HO and FS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/AdjointHorizAnalysis.cpp

    r25439 r25854  
    16611661        /*Intermediaries*/
    16621662        int      domaintype,dim;
    1663         int frictionlaw;
    16641663        Element* basalelement;
    16651664
     
    17021701
    17031702        /* get the friction law: if 2-Weertman, 11-Schoof, use a special name for the coefficient*/
    1704         element->FindParam(&frictionlaw, FrictionLawEnum);
     1703        int frictionlaw; element->FindParam(&frictionlaw, FrictionLawEnum);
    17051704        Input* dragcoefficient_input;
    17061705        switch(frictionlaw) {
     
    17901789                adjointz_input  = element->GetInput(AdjointzEnum);             _assert_(adjointz_input);
    17911790        }
    1792         Input* dragcoeff_input = element->GetInput(FrictionCoefficientEnum);  _assert_(dragcoeff_input);
     1791        /* get the friction law: 1- Budd, 11-Schoof*/
     1792        int frictionlaw; element->FindParam(&frictionlaw, FrictionLawEnum);
     1793        Input* dragcoeff_input = NULL;
     1794        switch(frictionlaw) {
     1795                case 1:
     1796                        dragcoeff_input = element->GetInput(FrictionCoefficientEnum); _assert_(dragcoeff_input);
     1797                        break;
     1798                case 2:
     1799                case 11:
     1800                        dragcoeff_input = element->GetInput(FrictionCEnum); _assert_(dragcoeff_input);
     1801                        break;
     1802                default:
     1803                        _error_("Friction law "<< frictionlaw <<" not supported in the inversion.");
     1804        }
    17931805
    17941806        /* Start  looping on the number of gaussian points: */
     
    18821894        Input* adjointx_input  = element->GetInput(AdjointxEnum);             _assert_(adjointx_input);
    18831895        Input* adjointy_input  = NULL;
    1884         Input* dragcoeff_input = element->GetInput(FrictionCoefficientEnum);  _assert_(dragcoeff_input);
    18851896        if(domaintype!=Domain2DverticalEnum){
    18861897                vy_input        = element->GetInput(VyEnum);                   _assert_(vy_input);
    18871898                adjointy_input  = element->GetInput(AdjointyEnum);             _assert_(adjointy_input);
    18881899        }
     1900        /* get the friction law: 1- Budd, 11-Schoof*/
     1901        int frictionlaw; element->FindParam(&frictionlaw, FrictionLawEnum);
     1902        Input* dragcoeff_input = NULL;
     1903        switch(frictionlaw) {
     1904                case 1:
     1905                        dragcoeff_input = element->GetInput(FrictionCoefficientEnum); _assert_(dragcoeff_input);
     1906                        break;
     1907                case 2:
     1908                case 11:
     1909                        dragcoeff_input = element->GetInput(FrictionCEnum); _assert_(dragcoeff_input);
     1910                        break;
     1911                default:
     1912                        _error_("Friction law "<< frictionlaw <<" not supported in the inversion.");
     1913        }
     1914
    18891915        /* Start  looping on the number of gaussian points: */
    18901916        Gauss* gauss=element->NewGaussBase(4);
     
    19581984        /*Fetch number of vertices for this finite element*/
    19591985        int numvertices = basalelement->GetNumberOfVertices();
    1960         int frictionlaw;
    19611986
    19621987        /*Initialize some vectors*/
     
    19772002
    19782003        /* get the friction law: 1- Budd, 11-Schoof*/
    1979         element->FindParam(&frictionlaw, FrictionLawEnum);
    1980         Input* dragcoeff_input;
     2004        int frictionlaw;element->FindParam(&frictionlaw, FrictionLawEnum);
     2005        Input* dragcoeff_input = NULL;
    19812006        switch(frictionlaw) {
    19822007                case 1:
Note: See TracChangeset for help on using the changeset viewer.