Changeset 22010


Ignore:
Timestamp:
08/25/17 15:18:00 (8 years ago)
Author:
Mathieu Morlighem
Message:

CHG: move rheology_law to matpar

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

Legend:

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

    r22004 r22010  
    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->material->GetRheologyLaw();
     1527                rheology_law=element->GetMaterialParameter(MaterialsRheologyLawEnum);
    15281528                element->GetInputListOnNodes(&surface[0],SurfaceEnum);
    15291529                switch(rheology_law){
  • issm/trunk-jpl/src/c/analyses/ThermalAnalysis.cpp

    r22004 r22010  
    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->material->GetRheologyLaw();
     811                rheology_law=element->GetMaterialParameter(MaterialsRheologyLawEnum);
    812812                element->GetInputListOnNodes(&surface[0],SurfaceEnum);
    813813                switch(rheology_law){
  • issm/trunk-jpl/src/c/classes/Materials/Material.h

    r22004 r22010  
    4242                virtual void       GetViscosity_D(IssmDouble* pviscosity,IssmDouble epseff)=0;
    4343                virtual void       GetViscosity2dDerivativeEpsSquare(IssmDouble* pmu_prime, IssmDouble* pepsilon)=0;
    44                 virtual int        GetRheologyLaw()=0;
    4544                virtual bool       IsDamage()=0;
    4645                virtual bool       IsEnhanced()=0;
  • issm/trunk-jpl/src/c/classes/Materials/Matestar.cpp

    r22004 r22010  
    4141        this->mid=matestar_mid;
    4242
    43         /*rheology law:*/
    44         iomodel->FetchData(&this->rheology_law,"md.materials.rheology_law");
    45 
    4643        /*Hooks: */
    4744        matestar_eid=index+1;
     
    370367void  Matestar::GetViscosity2dDerivativeEpsSquare(IssmDouble* pmu_prime, IssmDouble* epsilon){/*{{{*/
    371368        _error_("not implemented yet");
    372 }
    373 /*}}}*/
    374 int Matestar::GetRheologyLaw(){/*{{{*/
    375         return this->rheology_law;
    376369}
    377370/*}}}*/
  • issm/trunk-jpl/src/c/classes/Materials/Matestar.h

    r22004 r22010  
    6464                void       GetViscosity_D(IssmDouble* pviscosity, IssmDouble eps_eff);
    6565                void       GetViscosity2dDerivativeEpsSquare(IssmDouble* pmu_prime, IssmDouble* pepsilon);
    66                 int        GetRheologyLaw();
    6766                IssmDouble GetA();
    6867                IssmDouble GetAbar();
  • issm/trunk-jpl/src/c/classes/Materials/Matice.cpp

    r22004 r22010  
    4040   int materialtype;
    4141   iomodel->FindConstant(&materialtype,"md.materials.type");
    42    iomodel->FindConstant(&this->rheology_law,"md.materials.rheology_law");
    4342        this->Init(matice_mid,index,materialtype);
    4443
     
    640639}
    641640/*}}}*/
    642 int   Matice::GetRheologyLaw(){/*{{{*/
    643         return this->rheology_law;
    644 }
    645 /*}}}*/
    646641void  Matice::InputUpdateFromConstant(IssmDouble constant, int name){/*{{{*/
    647642        /*Nothing updated yet*/
  • issm/trunk-jpl/src/c/classes/Materials/Matice.h

    r22004 r22010  
    6868                void       GetViscosity_D(IssmDouble* pviscosity, IssmDouble eps_eff);
    6969                void       GetViscosity2dDerivativeEpsSquare(IssmDouble* pmu_prime, IssmDouble* pepsilon);
    70                 int        GetRheologyLaw();
    7170                IssmDouble GetA();
    7271                IssmDouble GetAbar();
  • issm/trunk-jpl/src/c/classes/Materials/Matpar.cpp

    r22004 r22010  
    3838        rlapslgm                  = 0;
    3939        dpermil                   = 0;
     40        rheology_law              = 0;
    4041
    4142        albedo_snow               = 0;
     
    6162        earth_density             = 0;
    6263
    63         poisson                   = 0;
    64         young_modulus             = 0;
    65         ridging_exponent          = 0;
    66         cohesion                  = 0;
    67         internal_friction_coef    = 0;
    68         compression_coef          = 0;
    69         traction_coef             = 0;
    70         time_relaxation_stress    = 0;
    71         time_relaxation_damage    = 0;
    72 
    73        
    7464        int nnat,dummy;
    7565        int* nature=NULL;
     
    10292                        iomodel->FindConstant(&this->thermal_exchange_velocity,"md.materials.thermal_exchange_velocity");
    10393                        iomodel->FindConstant(&this->g,"md.constants.g");
     94                        iomodel->FindConstant(&this->rheology_law,"md.materials.rheology_law");
    10495
    10596                        switch(smb_model){
     
    202193                                                iomodel->FindConstant(&this->thermal_exchange_velocity,"md.materials.thermal_exchange_velocity");
    203194                                                iomodel->FindConstant(&this->g,"md.constants.g");
     195                                                iomodel->FindConstant(&this->rheology_law,"md.materials.rheology_law");
    204196
    205197                                                switch(smb_model){ //{{{
     
    328320        matpar->rlapslgm=this->rlapslgm;
    329321        matpar->dpermil=this->dpermil;
     322        matpar->rheology_law=this->rheology_law;
    330323
    331324        matpar->sediment_compressibility=this->sediment_compressibility;
     
    379372        _printf_("   rlapslgm: " << rlapslgm << "\n");
    380373        _printf_("   dpermil: " << dpermil << "\n");
     374        _printf_("   rheology_law: " << rheology_law << "\n");
    381375        _printf_("   albedo_ice: " << albedo_ice << "\n");
    382376        _printf_("   albedo_snow: " << albedo_snow << "\n");
     
    396390        _printf_("   mantle_density: " << mantle_density << "\n");     
    397391        _printf_("   earth_density: " << earth_density << "\n");       
    398         _printf_("   poisson: " << poisson << "\n");   
    399         _printf_("   young_modulus: " << young_modulus << "\n");       
    400         _printf_("   ridging_exponent: " << ridging_exponent << "\n"); 
    401         _printf_("   cohesion: " << cohesion << "\n"); 
    402         _printf_("   internal_friction_coef: " << internal_friction_coef << "\n");     
    403         _printf_("   compression_coef: " << compression_coef << "\n"); 
    404         _printf_("   traction_coef: " << traction_coef << "\n");       
    405         _printf_("   time_relaxation_stress: " << time_relaxation_stress << "\n");     
    406         _printf_("   time_relaxation_damage: " << time_relaxation_damage << "\n");     
    407392        return;
    408393}
     
    434419        MARSHALLING(rlapslgm);
    435420        MARSHALLING(dpermil);
     421        MARSHALLING(rheology_law);
    436422
    437423        //hydrology Dual Porous Continuum:
     
    456442        //slr:
    457443        MARSHALLING(earth_density);
    458 
    459         //Sea ice:
    460         MARSHALLING(poisson);
    461         MARSHALLING(young_modulus);
    462         MARSHALLING(ridging_exponent);
    463         MARSHALLING(cohesion);
    464         MARSHALLING(internal_friction_coef);
    465         MARSHALLING(compression_coef);
    466         MARSHALLING(traction_coef);
    467         MARSHALLING(time_relaxation_stress);
    468         MARSHALLING(time_relaxation_damage);
    469 
    470444}
    471445/*}}}*/
     
    668642                case HydrologydcWaterCompressibilityEnum:    return this->water_compressibility;
    669643                case ConstantsGEnum:                         return this->g;
    670                 case SmbDesfacEnum:              return this->desfac;
    671                 case SmbRlapsEnum:               return this->rlaps;
    672                 case SmbRlapslgmEnum:            return this->rlapslgm;
    673                 case SmbDpermilEnum:             return this->dpermil;
     644                case SmbDesfacEnum:                          return this->desfac;
     645                case SmbRlapsEnum:                           return this->rlaps;
     646                case SmbRlapslgmEnum:                        return this->rlapslgm;
     647                case SmbDpermilEnum:                         return this->dpermil;
     648                case MaterialsRheologyLawEnum:               return this->rheology_law;
    674649                case MaterialsLithosphereShearModulusEnum:   return this->lithosphere_shear_modulus;
    675650                case MaterialsLithosphereDensityEnum:        return this->lithosphere_density;
  • issm/trunk-jpl/src/c/classes/Materials/Matpar.h

    r22004 r22010  
    3535                IssmDouble  rlapslgm;
    3636                IssmDouble  dpermil;
     37                int         rheology_law;
    3738
    3839                /*albedo: */
     
    6162                /*slr:*/
    6263                IssmDouble earth_density;
    63 
    64                 /*Sea ice*/
    65                 IssmDouble poisson;
    66                 IssmDouble young_modulus;
    67                 IssmDouble ridging_exponent;
    68                 IssmDouble cohesion;
    69                 IssmDouble internal_friction_coef;
    70                 IssmDouble compression_coef;
    71                 IssmDouble traction_coef;
    72                 IssmDouble time_relaxation_stress;
    73                 IssmDouble time_relaxation_damage;
    7464
    7565        public:
     
    10797                void       GetViscosity_D(IssmDouble* pviscosity,IssmDouble eps_eff){_error_("not supported");};
    10898                void       GetViscosity2dDerivativeEpsSquare(IssmDouble* pmu_prime, IssmDouble* pepsilon){_error_("not supported");};
    109                 int        GetRheologyLaw(){_error_("not supported");};
    11099                IssmDouble GetA(){_error_("not supported");};
    111100                IssmDouble GetAbar(){_error_("not supported");};
Note: See TracChangeset for help on using the changeset viewer.