Changeset 22011


Ignore:
Timestamp:
08/25/17 16:08:32 (8 years ago)
Author:
Mathieu Morlighem
Message:

BUG: fixing AD, GetMNaterialsParameter returns a double, not an int

Location:
issm/trunk-jpl/src/c
Files:
4 edited

Legend:

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

    r22010 r22011  
    15251525                /*Update Rheology only if converged (we must make sure that the temperature is below melting point
    15261526                 * otherwise the rheology could be negative*/
    1527                 rheology_law=element->GetMaterialParameter(MaterialsRheologyLawEnum);
     1527                rheology_law=element->GetIntegerMaterialParameter(MaterialsRheologyLawEnum);
    15281528                element->GetInputListOnNodes(&surface[0],SurfaceEnum);
    15291529                switch(rheology_law){
  • issm/trunk-jpl/src/c/analyses/ThermalAnalysis.cpp

    r22010 r22011  
    809809                /*Update Rheology only if converged (we must make sure that the temperature is below melting point
    810810                 * otherwise the rheology could be negative*/
    811                 rheology_law=element->GetMaterialParameter(MaterialsRheologyLawEnum);
     811                rheology_law=element->GetIntegerMaterialParameter(MaterialsRheologyLawEnum);
    812812                element->GetInputListOnNodes(&surface[0],SurfaceEnum);
    813813                switch(rheology_law){
  • issm/trunk-jpl/src/c/classes/Materials/Matpar.cpp

    r22010 r22011  
    646646                case SmbRlapslgmEnum:                        return this->rlapslgm;
    647647                case SmbDpermilEnum:                         return this->dpermil;
    648                 case MaterialsRheologyLawEnum:               return this->rheology_law;
    649648                case MaterialsLithosphereShearModulusEnum:   return this->lithosphere_shear_modulus;
    650649                case MaterialsLithosphereDensityEnum:        return this->lithosphere_density;
     
    657656}
    658657/*}}}*/
     658IssmDouble Matpar::GetIntegerMaterialParameter(int enum_in){/*{{{*/
     659
     660        switch(enum_in){
     661                case MaterialsRheologyLawEnum:               return this->rheology_law;
     662                default: _error_("Enum "<<EnumToStringx(enum_in)<<" not supported yet");
     663        }
     664
     665}
     666/*}}}*/
    659667IssmDouble Matpar::PureIceEnthalpy(IssmDouble pressure){/*{{{*/
    660668        return heatcapacity*(TMeltingPoint(pressure)-referencetemperature);
  • issm/trunk-jpl/src/c/classes/Materials/Matpar.h

    r22010 r22011  
    124124                IssmDouble GetEnthalpyDiffusionParameterVolume(int numvertices,IssmDouble* enthalpy,IssmDouble* pressure);
    125125                IssmDouble GetMaterialParameter(int in_enum);
     126                IssmDouble GetIntegerMaterialParameter(int in_enum);
    126127                IssmDouble PureIceEnthalpy(IssmDouble pressure);
    127128                void       ThermalToEnthalpy(IssmDouble* penthalpy,IssmDouble temperature,IssmDouble waterfraction,IssmDouble pressure);
Note: See TracChangeset for help on using the changeset viewer.