Changeset 9636


Ignore:
Timestamp:
09/06/11 16:53:02 (14 years ago)
Author:
Mathieu Morlighem
Message:

Added material class

Location:
issm/trunk
Files:
13 added
15 deleted
74 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h

    r9632 r9636  
    4646        TimesteppingTimeAdaptEnum,
    4747        TimesteppingCflCoefficientEnum,
     48        MaterialsRheologyBEnum,
     49        MaterialsRheologyBbarEnum,
     50        MaterialsRheologyNEnum,
     51        MaterialsRheologyLawEnum,
     52        MaterialsRhoIceEnum,
     53        MaterialsRhoWaterEnum,
     54        MaterialsHeatcapacityEnum,
     55        MaterialsLatentheatEnum,
     56        MaterialsBetaEnum,
     57        MaterialsThermalconductivityEnum,
     58        MaterialsMixedLayerCapacityEnum,
     59        MaterialsThermalExchangeVelocityEnum,
     60        MaterialsMeltingpointEnum,
    4861        /*}}}*/
    4962        /*Datasets {{{1*/
     
    236249        QmuPressureEnum,
    237250        ResetPenaltiesEnum,
    238         RheologyBEnum,
    239         RheologyBbarEnum,
    240         RheologyNEnum,
    241251        SegmentOnIceShelfEnum,
    242252        ShelfDampeningEnum,
     
    322332        SoftMigrationEnum,
    323333        /*}}}*/
    324         /*Material{{{1*/
    325         RhoIceEnum,
    326         RhoWaterEnum,
    327         GravityEnum,
    328         MixedLayerCapacityEnum,
    329         ThermalExchangeVelocityEnum,
    330         /*}}}*/
     334
    331335        /*Solver{{{1*/
    332336        StokesSolverEnum,
     
    336340        ColinearEnum,
    337341        SeparateEnum,
    338         BetaEnum,
    339342        CmGradientEnum,
    340343        CmJumpEnum,
     
    395398        /*}}}*/
    396399        /*Rheology law (move too Material) {{{1*/
    397         RheologyLawEnum,
    398400        PatersonEnum,
    399401        ArrheniusEnum,
     
    448450        StokesreconditioningEnum,
    449451        LowerelementsEnum,
    450         HeatcapacityEnum,
    451         LatentheatEnum,
    452         ThermalconductivityEnum,
    453         MeltingpointEnum,
    454452        DhdtEnum,
    455453        IsprognosticEnum,
  • issm/trunk/src/c/EnumDefinitions/EnumToModelField.cpp

    r9612 r9636  
    1515                case ThicknessEnum : return "thickness";
    1616                case FrictionCoefficientEnum : return "drag_coefficient";
    17                 case RheologyBEnum : return "rheology_B";
    18                 case RheologyBbarEnum : return "rheology_B";
     17                case MaterialsRheologyBEnum : return "rheology_B";
     18                case MaterialsRheologyBbarEnum : return "rheology_B";
    1919                case DhdtEnum : return "dhdt";
    2020                case VxEnum : return "vx";
  • issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp

    r9632 r9636  
    5050                case TimesteppingTimeAdaptEnum : return "TimesteppingTimeAdapt";
    5151                case TimesteppingCflCoefficientEnum : return "TimesteppingCflCoefficient";
     52                case MaterialsRheologyBEnum : return "MaterialsRheologyB";
     53                case MaterialsRheologyBbarEnum : return "MaterialsRheologyBbar";
     54                case MaterialsRheologyNEnum : return "MaterialsRheologyN";
     55                case MaterialsRheologyLawEnum : return "MaterialsRheologyLaw";
     56                case MaterialsRhoIceEnum : return "MaterialsRhoIce";
     57                case MaterialsRhoWaterEnum : return "MaterialsRhoWater";
     58                case MaterialsHeatcapacityEnum : return "MaterialsHeatcapacity";
     59                case MaterialsLatentheatEnum : return "MaterialsLatentheat";
     60                case MaterialsBetaEnum : return "MaterialsBeta";
     61                case MaterialsThermalconductivityEnum : return "MaterialsThermalconductivity";
     62                case MaterialsMixedLayerCapacityEnum : return "MaterialsMixedLayerCapacity";
     63                case MaterialsThermalExchangeVelocityEnum : return "MaterialsThermalExchangeVelocity";
     64                case MaterialsMeltingpointEnum : return "MaterialsMeltingpoint";
    5265                case ConstraintsEnum : return "Constraints";
    5366                case ElementsEnum : return "Elements";
     
    203216                case QmuPressureEnum : return "QmuPressure";
    204217                case ResetPenaltiesEnum : return "ResetPenalties";
    205                 case RheologyBEnum : return "RheologyB";
    206                 case RheologyBbarEnum : return "RheologyBbar";
    207                 case RheologyNEnum : return "RheologyN";
    208218                case SegmentOnIceShelfEnum : return "SegmentOnIceShelf";
    209219                case ShelfDampeningEnum : return "ShelfDampening";
     
    278288                case AgressiveMigrationEnum : return "AgressiveMigration";
    279289                case SoftMigrationEnum : return "SoftMigration";
    280                 case RhoIceEnum : return "RhoIce";
    281                 case RhoWaterEnum : return "RhoWater";
    282                 case GravityEnum : return "Gravity";
    283                 case MixedLayerCapacityEnum : return "MixedLayerCapacity";
    284                 case ThermalExchangeVelocityEnum : return "ThermalExchangeVelocity";
    285290                case StokesSolverEnum : return "StokesSolver";
    286291                case IntersectEnum : return "Intersect";
    287292                case ColinearEnum : return "Colinear";
    288293                case SeparateEnum : return "Separate";
    289                 case BetaEnum : return "Beta";
    290294                case CmGradientEnum : return "CmGradient";
    291295                case CmJumpEnum : return "CmJump";
     
    340344                case OptionDoubleEnum : return "OptionDouble";
    341345                case OptionLogicalEnum : return "OptionLogical";
    342                 case RheologyLawEnum : return "RheologyLaw";
    343346                case PatersonEnum : return "Paterson";
    344347                case ArrheniusEnum : return "Arrhenius";
     
    391394                case StokesreconditioningEnum : return "Stokesreconditioning";
    392395                case LowerelementsEnum : return "Lowerelements";
    393                 case HeatcapacityEnum : return "Heatcapacity";
    394                 case LatentheatEnum : return "Latentheat";
    395                 case ThermalconductivityEnum : return "Thermalconductivity";
    396                 case MeltingpointEnum : return "Meltingpoint";
    397396                case DhdtEnum : return "Dhdt";
    398397                case IsprognosticEnum : return "Isprognostic";
  • issm/trunk/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp

    r9610 r9636  
    4747                        case VyEnum:   iomodel->FetchData(1,VyEnum); break;
    4848                        case FrictionCoefficientEnum: iomodel->FetchData(1,FrictionCoefficientEnum); break;
    49                         case RheologyBbarEnum:    iomodel->FetchData(1,RheologyBEnum); break;
     49                        case MaterialsRheologyBbarEnum:    iomodel->FetchData(1,MaterialsRheologyBEnum); break;
    5050                        default: _error_("Control %s not implemented yet",EnumToStringx((int)iomodel->Data(ControlTypeEnum)[i]));
    5151                }
     
    6666       
    6767        /*Free data: */
    68         iomodel->DeleteData(1+4+5,ElementsEnum,ControlTypeEnum,WeightsEnum,CmMinEnum,CmMaxEnum,DhdtEnum,VxEnum,VyEnum,FrictionCoefficientEnum,RheologyBEnum);
     68        iomodel->DeleteData(1+4+5,ElementsEnum,ControlTypeEnum,WeightsEnum,CmMinEnum,CmMaxEnum,DhdtEnum,VxEnum,VyEnum,FrictionCoefficientEnum,MaterialsRheologyBEnum);
    6969}
  • issm/trunk/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp

    r9405 r9636  
    4545       
    4646        /*Fetch data needed: */
    47         iomodel->FetchData(4,ElementsEnum,ElementconnectivityEnum,RheologyBEnum,RheologyNEnum);
     47        iomodel->FetchData(4,ElementsEnum,ElementconnectivityEnum,MaterialsRheologyBEnum,MaterialsRheologyNEnum);
    4848        if(dim==3)          iomodel->FetchData(2,UpperelementsEnum,LowerelementsEnum);
    4949        if(control_analysis)iomodel->FetchData(3,ControlTypeEnum,CmMinEnum,CmMaxEnum);
     
    6464        /*Free data: */
    6565        iomodel->DeleteData(9,ElementsEnum,ElementconnectivityEnum,UpperelementsEnum,LowerelementsEnum,
    66                                 RheologyBEnum,RheologyNEnum,ControlTypeEnum,CmMinEnum,CmMaxEnum);
     66                                MaterialsRheologyBEnum,MaterialsRheologyNEnum,ControlTypeEnum,CmMinEnum,CmMaxEnum);
    6767
    6868        /*Add new constrant material property tgo materials, at the end: */
  • issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp

    r9632 r9636  
    4545        parameters->AddObject(iomodel->CopyConstantObject(SettingsLowmemEnum));
    4646        parameters->AddObject(iomodel->CopyConstantObject(ConnectivityEnum));
    47         parameters->AddObject(iomodel->CopyConstantObject(BetaEnum));
    48         parameters->AddObject(iomodel->CopyConstantObject(MeltingpointEnum));
    4947        parameters->AddObject(iomodel->CopyConstantObject(ConstantsReferencetemperatureEnum));
    50         parameters->AddObject(iomodel->CopyConstantObject(LatentheatEnum));
    51         parameters->AddObject(iomodel->CopyConstantObject(HeatcapacityEnum));
    5248        parameters->AddObject(iomodel->CopyConstantObject(ArtificialDiffusivityEnum));
    5349        parameters->AddObject(iomodel->CopyConstantObject(GroundinglineMeltingRateEnum));
     
    6763        parameters->AddObject(iomodel->CopyConstantObject(IsprognosticEnum));
    6864        parameters->AddObject(iomodel->CopyConstantObject(IsthermalEnum));
    69         parameters->AddObject(iomodel->CopyConstantObject(RheologyLawEnum));
     65        parameters->AddObject(iomodel->CopyConstantObject(MaterialsRheologyLawEnum));
    7066
    7167        /*some parameters that did not come with the iomodel: */
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp

    r9597 r9636  
    4444        iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
    4545        iomodel->Constant(&g,ConstantsGEnum);
    46         iomodel->Constant(&rho_ice,RhoIceEnum);
     46        iomodel->Constant(&rho_ice,MaterialsRhoIceEnum);
    4747        iomodel->Constant(&stokesreconditioning,StokesreconditioningEnum);
    4848        iomodel->Constant(&isstokes,IsstokesEnum);
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp

    r9612 r9636  
    5757        iomodel->FetchDataToInput(elements,ElementOnIceShelfEnum);
    5858        iomodel->FetchDataToInput(elements,ElementOnWaterEnum);
    59         iomodel->FetchDataToInput(elements,RheologyBEnum);
    60         iomodel->FetchDataToInput(elements,RheologyNEnum);
     59        iomodel->FetchDataToInput(elements,MaterialsRheologyBEnum);
     60        iomodel->FetchDataToInput(elements,MaterialsRheologyNEnum);
    6161        iomodel->FetchDataToInput(elements,VxEnum,VxObsEnum,0);
    6262        iomodel->FetchDataToInput(elements,VyEnum,VyObsEnum,0);
  • issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp

    r9632 r9636  
    2828        iomodel->Constant(&dim,DimEnum);
    2929        iomodel->Constant(&numberofvertices,NumberOfVerticesEnum);
    30         iomodel->Constant(&heatcapacity,HeatcapacityEnum);
     30        iomodel->Constant(&heatcapacity,MaterialsHeatcapacityEnum);
    3131        iomodel->Constant(&referencetemperature,ConstantsReferencetemperatureEnum);
    3232
  • issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/UpdateElementsEnthalpy.cpp

    r9612 r9636  
    5050        iomodel->FetchDataToInput(elements,ElementOnWaterEnum);
    5151        iomodel->FetchDataToInput(elements,ElementsTypeEnum);
    52         iomodel->FetchDataToInput(elements,RheologyBEnum);
    53         iomodel->FetchDataToInput(elements,RheologyNEnum);
     52        iomodel->FetchDataToInput(elements,MaterialsRheologyBEnum);
     53        iomodel->FetchDataToInput(elements,MaterialsRheologyNEnum);
    5454        iomodel->FetchDataToInput(elements,PressureEnum);
    5555        iomodel->FetchDataToInput(elements,TemperatureEnum);
  • issm/trunk/src/c/modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp

    r9612 r9636  
    4343        iomodel->FetchDataToInput(elements,ElementOnWaterEnum);
    4444        iomodel->FetchDataToInput(elements,ElementsTypeEnum);
    45         iomodel->FetchDataToInput(elements,RheologyBEnum);
    46         iomodel->FetchDataToInput(elements,RheologyNEnum);
     45        iomodel->FetchDataToInput(elements,MaterialsRheologyBEnum);
     46        iomodel->FetchDataToInput(elements,MaterialsRheologyNEnum);
    4747        iomodel->FetchDataToInput(elements,PressureEnum);
    4848        iomodel->FetchDataToInput(elements,TemperatureEnum);
  • issm/trunk/src/c/modules/ModelProcessorx/Melting/UpdateElementsMelting.cpp

    r9612 r9636  
    5151        iomodel->FetchDataToInput(elements,ElementOnWaterEnum);
    5252        iomodel->FetchDataToInput(elements,ElementsTypeEnum);
    53         iomodel->FetchDataToInput(elements,RheologyBEnum);
    54         iomodel->FetchDataToInput(elements,RheologyNEnum);
     53        iomodel->FetchDataToInput(elements,MaterialsRheologyBEnum);
     54        iomodel->FetchDataToInput(elements,MaterialsRheologyNEnum);
    5555        iomodel->FetchDataToInput(elements,SurfaceforcingsAccumulationRateEnum);
    5656        iomodel->FetchDataToInput(elements,SurfaceforcingsAblationRateEnum);
  • issm/trunk/src/c/modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp

    r9612 r9636  
    5252        iomodel->FetchDataToInput(elements,ElementOnWaterEnum);
    5353        iomodel->FetchDataToInput(elements,ElementsTypeEnum);
    54         iomodel->FetchDataToInput(elements,RheologyBEnum);
    55         iomodel->FetchDataToInput(elements,RheologyNEnum);
     54        iomodel->FetchDataToInput(elements,MaterialsRheologyBEnum);
     55        iomodel->FetchDataToInput(elements,MaterialsRheologyNEnum);
    5656        iomodel->FetchDataToInput(elements,PressureEnum);
    5757        iomodel->FetchDataToInput(elements,TemperatureEnum);
  • issm/trunk/src/c/modules/Responsex/Responsex.cpp

    r9610 r9636  
    4141                case RheologyBbarAbsGradientEnum:RheologyBbarAbsGradientx( responses, elements,nodes, vertices, loads, materials, parameters,process_units,weight_index); break;
    4242                case DragCoefficientAbsGradientEnum:DragCoefficientAbsGradientx(responses, elements,nodes, vertices, loads, materials, parameters,process_units,weight_index); break;
    43                 case RheologyBbarEnum:RheologyBbarx(responses, elements,nodes, vertices, loads, materials, parameters,process_units); break;
     43                case MaterialsRheologyBbarEnum:RheologyBbarx(responses, elements,nodes, vertices, loads, materials, parameters,process_units); break;
    4444                case FrictionCoefficientEnum:NodalValuex(responses, FrictionCoefficientEnum,elements,nodes, vertices, loads, materials, parameters,process_units); break;
    4545                default: _error_(" response descriptor \"%s\" not supported yet!",response_descriptor); break;
  • issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp

    r9632 r9636  
    4848        else if (strcmp(name,"TimesteppingTimeAdapt")==0) return TimesteppingTimeAdaptEnum;
    4949        else if (strcmp(name,"TimesteppingCflCoefficient")==0) return TimesteppingCflCoefficientEnum;
     50        else if (strcmp(name,"MaterialsRheologyB")==0) return MaterialsRheologyBEnum;
     51        else if (strcmp(name,"MaterialsRheologyBbar")==0) return MaterialsRheologyBbarEnum;
     52        else if (strcmp(name,"MaterialsRheologyN")==0) return MaterialsRheologyNEnum;
     53        else if (strcmp(name,"MaterialsRheologyLaw")==0) return MaterialsRheologyLawEnum;
     54        else if (strcmp(name,"MaterialsRhoIce")==0) return MaterialsRhoIceEnum;
     55        else if (strcmp(name,"MaterialsRhoWater")==0) return MaterialsRhoWaterEnum;
     56        else if (strcmp(name,"MaterialsHeatcapacity")==0) return MaterialsHeatcapacityEnum;
     57        else if (strcmp(name,"MaterialsLatentheat")==0) return MaterialsLatentheatEnum;
     58        else if (strcmp(name,"MaterialsBeta")==0) return MaterialsBetaEnum;
     59        else if (strcmp(name,"MaterialsThermalconductivity")==0) return MaterialsThermalconductivityEnum;
     60        else if (strcmp(name,"MaterialsMixedLayerCapacity")==0) return MaterialsMixedLayerCapacityEnum;
     61        else if (strcmp(name,"MaterialsThermalExchangeVelocity")==0) return MaterialsThermalExchangeVelocityEnum;
     62        else if (strcmp(name,"MaterialsMeltingpoint")==0) return MaterialsMeltingpointEnum;
    5063        else if (strcmp(name,"Constraints")==0) return ConstraintsEnum;
    5164        else if (strcmp(name,"Elements")==0) return ElementsEnum;
     
    201214        else if (strcmp(name,"QmuPressure")==0) return QmuPressureEnum;
    202215        else if (strcmp(name,"ResetPenalties")==0) return ResetPenaltiesEnum;
    203         else if (strcmp(name,"RheologyB")==0) return RheologyBEnum;
    204         else if (strcmp(name,"RheologyBbar")==0) return RheologyBbarEnum;
    205         else if (strcmp(name,"RheologyN")==0) return RheologyNEnum;
    206216        else if (strcmp(name,"SegmentOnIceShelf")==0) return SegmentOnIceShelfEnum;
    207217        else if (strcmp(name,"ShelfDampening")==0) return ShelfDampeningEnum;
     
    276286        else if (strcmp(name,"AgressiveMigration")==0) return AgressiveMigrationEnum;
    277287        else if (strcmp(name,"SoftMigration")==0) return SoftMigrationEnum;
    278         else if (strcmp(name,"RhoIce")==0) return RhoIceEnum;
    279         else if (strcmp(name,"RhoWater")==0) return RhoWaterEnum;
    280         else if (strcmp(name,"Gravity")==0) return GravityEnum;
    281         else if (strcmp(name,"MixedLayerCapacity")==0) return MixedLayerCapacityEnum;
    282         else if (strcmp(name,"ThermalExchangeVelocity")==0) return ThermalExchangeVelocityEnum;
    283288        else if (strcmp(name,"StokesSolver")==0) return StokesSolverEnum;
    284289        else if (strcmp(name,"Intersect")==0) return IntersectEnum;
    285290        else if (strcmp(name,"Colinear")==0) return ColinearEnum;
    286291        else if (strcmp(name,"Separate")==0) return SeparateEnum;
    287         else if (strcmp(name,"Beta")==0) return BetaEnum;
    288292        else if (strcmp(name,"CmGradient")==0) return CmGradientEnum;
    289293        else if (strcmp(name,"CmJump")==0) return CmJumpEnum;
     
    338342        else if (strcmp(name,"OptionDouble")==0) return OptionDoubleEnum;
    339343        else if (strcmp(name,"OptionLogical")==0) return OptionLogicalEnum;
    340         else if (strcmp(name,"RheologyLaw")==0) return RheologyLawEnum;
    341344        else if (strcmp(name,"Paterson")==0) return PatersonEnum;
    342345        else if (strcmp(name,"Arrhenius")==0) return ArrheniusEnum;
     
    389392        else if (strcmp(name,"Stokesreconditioning")==0) return StokesreconditioningEnum;
    390393        else if (strcmp(name,"Lowerelements")==0) return LowerelementsEnum;
    391         else if (strcmp(name,"Heatcapacity")==0) return HeatcapacityEnum;
    392         else if (strcmp(name,"Latentheat")==0) return LatentheatEnum;
    393         else if (strcmp(name,"Thermalconductivity")==0) return ThermalconductivityEnum;
    394         else if (strcmp(name,"Meltingpoint")==0) return MeltingpointEnum;
    395394        else if (strcmp(name,"Dhdt")==0) return DhdtEnum;
    396395        else if (strcmp(name,"Isprognostic")==0) return IsprognosticEnum;
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r9632 r9636  
    530530        Input* input=NULL;
    531531
    532         if(enum_type==RheologyBbarEnum){
     532        if(enum_type==MaterialsRheologyBbarEnum){
    533533                if(!IsOnBed()) return;
    534                 input=(Input*)matice->inputs->GetInput(RheologyBEnum);
     534                input=(Input*)matice->inputs->GetInput(MaterialsRheologyBEnum);
    535535        }
    536536        else{
     
    549549        Input* input=NULL;
    550550
    551         if(enum_type==RheologyBbarEnum){
    552                 input=(Input*)matice->inputs->GetInput(RheologyBEnum);
     551        if(enum_type==MaterialsRheologyBbarEnum){
     552                input=(Input*)matice->inputs->GetInput(MaterialsRheologyBEnum);
    553553        }
    554554        else{
     
    568568        Input* input=NULL;
    569569
    570         if(enum_type==RheologyBbarEnum){
    571                 input=(Input*)matice->inputs->GetInput(RheologyBEnum);
     570        if(enum_type==MaterialsRheologyBbarEnum){
     571                input=(Input*)matice->inputs->GetInput(MaterialsRheologyBEnum);
    572572        }
    573573        else{
     
    12241224
    12251225        /*Depth Averaging B*/
    1226         this->InputDepthAverageAtBase(RheologyBEnum,RheologyBbarEnum,MaterialsEnum);
     1226        this->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum,MaterialsEnum);
    12271227
    12281228        /*Call Tria function*/
     
    12321232
    12331233        /*Delete B averaged*/
    1234         this->matice->inputs->DeleteInput(RheologyBbarEnum);
     1234        this->matice->inputs->DeleteInput(MaterialsRheologyBbarEnum);
    12351235
    12361236        /*clean up and return*/
     
    44294429                        break;
    44304430
    4431                 case RheologyBbarEnum:
     4431                case MaterialsRheologyBbarEnum:
    44324432                        inputs->GetParameterValue(&approximation,ApproximationEnum);
    44334433                        switch(approximation){
     
    46694669
    46704670        /*Depth Average B*/
    4671         this->InputDepthAverageAtBase(RheologyBEnum,RheologyBbarEnum,MaterialsEnum);
     4671        this->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum,MaterialsEnum);
    46724672
    46734673        /*Collapse element to the base*/
     
    46774677
    46784678        /*delete Average B*/
    4679         this->matice->inputs->DeleteInput(RheologyBbarEnum);
     4679        this->matice->inputs->DeleteInput(MaterialsRheologyBbarEnum);
    46804680
    46814681} /*}}}*/
     
    46874687
    46884688        /*Depth Average B*/
    4689         this->InputDepthAverageAtBase(RheologyBEnum,RheologyBbarEnum,MaterialsEnum);
     4689        this->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum,MaterialsEnum);
    46904690
    46914691        /*Collapse element to the base*/
     
    46954695
    46964696        /*delete Average B*/
    4697         this->matice->inputs->DeleteInput(RheologyBbarEnum);
     4697        this->matice->inputs->DeleteInput(MaterialsRheologyBbarEnum);
    46984698} /*}}}*/
    46994699/*FUNCTION Penta::GradjBbarStokes {{{1*/
     
    47044704
    47054705        /*Depth Average B*/
    4706         this->InputDepthAverageAtBase(RheologyBEnum,RheologyBbarEnum,MaterialsEnum);
     4706        this->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum,MaterialsEnum);
    47074707
    47084708        /*Collapse element to the base*/
     
    47124712
    47134713        /*delete Average B*/
    4714         this->matice->inputs->DeleteInput(RheologyBbarEnum);
     4714        this->matice->inputs->DeleteInput(MaterialsRheologyBbarEnum);
    47154715} /*}}}*/
    47164716/*FUNCTION Penta::Sid {{{1*/
     
    47854785        for(int i=0;i<num_controls;i++){
    47864786
    4787                 if(control_type[i]==RheologyBbarEnum){
     4787                if(control_type[i]==MaterialsRheologyBbarEnum){
    47884788                        if (!IsOnBed()) goto cleanup_and_return;
    4789                         input=(Input*)matice->inputs->GetInput(RheologyBEnum); _assert_(input);
     4789                        input=(Input*)matice->inputs->GetInput(MaterialsRheologyBEnum); _assert_(input);
    47904790                }
    47914791                else{
     
    47994799                if (save_parameter) ((ControlInput*)input)->SaveValue();
    48004800
    4801                 if(control_type[i]==RheologyBbarEnum){
    4802                         this->InputExtrude(RheologyBEnum,MaterialsEnum);
     4801                if(control_type[i]==MaterialsRheologyBbarEnum){
     4802                        this->InputExtrude(MaterialsRheologyBEnum,MaterialsEnum);
    48034803                }
    48044804        }
     
    50965096
    50975097        /*Go through all the input objects, and find the one corresponding to enum_type, if it exists: */
    5098         if (enum_type==RheologyBbarEnum) input=this->matice->inputs->GetInput(RheologyBEnum);
     5098        if (enum_type==MaterialsRheologyBbarEnum) input=this->matice->inputs->GetInput(MaterialsRheologyBEnum);
    50995099        else input=this->inputs->GetInput(enum_type);
    51005100        //if (!input) _error_("Input %s not found in penta->inputs",EnumToStringx(enum_type)); why error out? if the requested input does not exist, we should still
     
    52045204                                        }
    52055205                                        break;
    5206                                 case RheologyBbarEnum:
     5206                                case MaterialsRheologyBbarEnum:
    52075207                                        /*Matice will take care of it*/ break;
    52085208                                default:
     
    62496249                /*Update Rheology only if converged (we must make sure that the temperature is below melting point
    62506250                 * otherwise the rheology could be negative*/
    6251                 this->parameters->FindParam(&rheology_law,RheologyLawEnum);
     6251                this->parameters->FindParam(&rheology_law,MaterialsRheologyLawEnum);
    62526252                switch(rheology_law){
    62536253                        case NoneEnum:
     
    62576257                                B_average=Paterson((values[0]+values[1]+values[2]+values[3]+values[4]+values[5])/6.0);
    62586258                                for(i=0;i<numdof;i++) B[i]=B_average;
    6259                                 this->matice->inputs->AddInput(new PentaVertexInput(RheologyBEnum,B));
     6259                                this->matice->inputs->AddInput(new PentaVertexInput(MaterialsRheologyBEnum,B));
    62606260                                break;
    62616261                        case ArrheniusEnum:
     
    62656265                                                        matice->GetN());
    62666266                                for(i=0;i<numdof;i++) B[i]=B_average;
    6267                                 this->matice->inputs->AddInput(new PentaVertexInput(RheologyBEnum,B));
     6267                                this->matice->inputs->AddInput(new PentaVertexInput(MaterialsRheologyBEnum,B));
    62686268                                break;
    62696269                        default:
     
    63246324                /*Update Rheology only if converged (we must make sure that the temperature is below melting point
    63256325                 * otherwise the rheology could be negative*/
    6326                 this->parameters->FindParam(&rheology_law,RheologyLawEnum);
     6326                this->parameters->FindParam(&rheology_law,MaterialsRheologyLawEnum);
    63276327                switch(rheology_law){
    63286328                        case NoneEnum:
     
    63326332                                B_average=Paterson((temperatures[0]+temperatures[1]+temperatures[2]+temperatures[3]+temperatures[4]+temperatures[5])/6.0);
    63336333                                for(i=0;i<numdof;i++) B[i]=B_average;
    6334                                 this->matice->inputs->AddInput(new PentaVertexInput(RheologyBEnum,B));
     6334                                this->matice->inputs->AddInput(new PentaVertexInput(MaterialsRheologyBEnum,B));
    63356335                                break;
    63366336                        case ArrheniusEnum:
     
    63406340                                                        matice->GetN());
    63416341                                for(i=0;i<numdof;i++) B[i]=B_average;
    6342                                 this->matice->inputs->AddInput(new PentaVertexInput(RheologyBEnum,B));
     6342                                this->matice->inputs->AddInput(new PentaVertexInput(MaterialsRheologyBEnum,B));
    63436343                                break;
    63446344                        default:
     
    70817081
    70827082        /*We have found the base under this. Call InputDepthAverageAtBase on it: */
    7083         base->InputDepthAverageAtBase(RheologyBEnum,RheologyBbarEnum,MaterialsEnum);
     7083        base->InputDepthAverageAtBase(MaterialsRheologyBEnum,MaterialsRheologyBbarEnum,MaterialsEnum);
    70847084
    70857085        /*Ok, base->matice now has the Bbar. Ask Bbar from this enum: */
     
    75077507        iomodel->Constant(&dakota_analysis,DakotaAnalysisEnum);
    75087508        iomodel->Constant(&isstokes,IsstokesEnum);
    7509         iomodel->Constant(&beta,BetaEnum);
    7510         iomodel->Constant(&heatcapacity,HeatcapacityEnum);
     7509        iomodel->Constant(&beta,MaterialsBetaEnum);
     7510        iomodel->Constant(&heatcapacity,MaterialsHeatcapacityEnum);
    75117511        iomodel->Constant(&referencetemperature,ConstantsReferencetemperatureEnum);
    7512         iomodel->Constant(&meltingpoint,MeltingpointEnum);
    7513         iomodel->Constant(&latentheat,LatentheatEnum);
    7514 
     7512        iomodel->Constant(&meltingpoint,MaterialsMeltingpointEnum);
     7513        iomodel->Constant(&latentheat,MaterialsLatentheatEnum);
    75157514
    75167515        /*Checks if debuging*/
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r9628 r9636  
    21592159        Input* input=NULL;
    21602160
    2161         if(enum_type==RheologyBbarEnum){
     2161        if(enum_type==MaterialsRheologyBbarEnum){
    21622162                input=(Input*)matice->inputs->GetInput(enum_type);
    21632163        }
     
    21772177        Input* input=NULL;
    21782178
    2179         if(enum_type==RheologyBbarEnum){
     2179        if(enum_type==MaterialsRheologyBbarEnum){
    21802180                input=(Input*)matice->inputs->GetInput(enum_type);
    21812181        }
     
    21962196        Input* input=NULL;
    21972197
    2198         if(enum_type==RheologyBbarEnum){
     2198        if(enum_type==MaterialsRheologyBbarEnum){
    21992199                input=(Input*)matice->inputs->GetInput(enum_type);
    22002200        }
     
    26972697                        GradjDragMacAyeal(gradient);
    26982698                        break;
    2699                 case RheologyBbarEnum:
     2699                case MaterialsRheologyBbarEnum:
    27002700                        GradjBMacAyeal(gradient);
    27012701                        break;
     
    27592759        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    27602760        GetDofList1(&doflist1[0]);
    2761         Input* rheologyb_input=matice->inputs->GetInput(RheologyBbarEnum); _assert_(rheologyb_input);
     2761        Input* rheologyb_input=matice->inputs->GetInput(MaterialsRheologyBbarEnum); _assert_(rheologyb_input);
    27622762        Input* weights_input=inputs->GetInput(WeightsEnum);                _assert_(weights_input);
    27632763
     
    28082808        Input* adjointx_input=inputs->GetInput(AdjointxEnum);              _assert_(adjointx_input);
    28092809        Input* adjointy_input=inputs->GetInput(AdjointyEnum);              _assert_(adjointy_input);
    2810         Input* rheologyb_input=matice->inputs->GetInput(RheologyBbarEnum); _assert_(rheologyb_input);
     2810        Input* rheologyb_input=matice->inputs->GetInput(MaterialsRheologyBbarEnum); _assert_(rheologyb_input);
    28112811
    28122812        /* Start  looping on the number of gaussian points: */
     
    31153115        for(int i=0;i<num_controls;i++){
    31163116
    3117                 if(control_type[i]==RheologyBbarEnum){
     3117                if(control_type[i]==MaterialsRheologyBbarEnum){
    31183118                        input=(Input*)matice->inputs->GetInput(control_type[i]); _assert_(input);
    31193119                }
     
    32233223
    32243224        /*Go through all the input objects, and find the one corresponding to enum_type, if it exists: */
    3225         if (enum_type==RheologyBbarEnum) input=this->matice->inputs->GetInput(enum_type);
     3225        if (enum_type==MaterialsRheologyBbarEnum) input=this->matice->inputs->GetInput(enum_type);
    32263226        else input=this->inputs->GetInput(enum_type);
    32273227        if (!input) _error_("Input %s not found in tria->inputs",EnumToStringx(enum_type));
     
    33213321                                        }
    33223322                                        break;
    3323                                 case RheologyBbarEnum:
     3323                                case MaterialsRheologyBbarEnum:
    33243324                                        /*Matice will take care of it*/ break;
    33253325                                default:
     
    37323732
    37333733                        /*update input*/
    3734                         if (name==RheologyBbarEnum || name==RheologyBEnum){
     3734                        if (name==MaterialsRheologyBbarEnum || name==MaterialsRheologyBEnum){
    37353735                                matice->inputs->AddInput(new TriaVertexInput(name,values));
    37363736                        }
     
    45044504        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    45054505        Input* weights_input  =inputs->GetInput(WeightsEnum);              _assert_(weights_input);
    4506         Input* rheologyb_input=matice->inputs->GetInput(RheologyBbarEnum); _assert_(rheologyb_input);
     4506        Input* rheologyb_input=matice->inputs->GetInput(MaterialsRheologyBbarEnum); _assert_(rheologyb_input);
    45074507
    45084508        /* Start looping on the number of gaussian points: */
  • issm/trunk/src/c/objects/Materials/Matice.cpp

    r9405 r9636  
    202202        double B;
    203203
    204         inputs->GetParameterAverage(&B,RheologyBEnum);
     204        inputs->GetParameterAverage(&B,MaterialsRheologyBEnum);
    205205        return B;
    206206}
     
    212212        double Bbar;
    213213
    214         inputs->GetParameterAverage(&Bbar,RheologyBbarEnum);
     214        inputs->GetParameterAverage(&Bbar,MaterialsRheologyBbarEnum);
    215215        return Bbar;
    216216}
     
    222222        double n;
    223223
    224         inputs->GetParameterAverage(&n,RheologyNEnum);
     224        inputs->GetParameterAverage(&n,MaterialsRheologyNEnum);
    225225        return n;
    226226}
     
    594594                                        this->inputs->AddInput(new TriaVertexInput(name,values));
    595595                                        /*Special case for rheology B in 2D: Pourave land for this solution{{{2*/
    596                                         if(name==RheologyBEnum){
     596                                        if(name==MaterialsRheologyBEnum){
    597597                                                /*Are we in 2D?:*/
    598598                                                if(element->Enum()==TriaEnum){
     
    605605                                                if(dim==2){
    606606                                                        /*Dupliacte rheology input: */
    607                                                         this->inputs->AddInput(new TriaVertexInput(RheologyBbarEnum,values));
     607                                                        this->inputs->AddInput(new TriaVertexInput(MaterialsRheologyBbarEnum,values));
    608608                                                }
    609609                                        }
     
    674674
    675675                /*Get B*/
    676                 if (iomodel->Data(RheologyBEnum)) {
    677                         for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->Data(RheologyBEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+i]-1)];
    678                         this->inputs->AddInput(new TriaVertexInput(RheologyBbarEnum,nodeinputs));
     676                if (iomodel->Data(MaterialsRheologyBEnum)) {
     677                        for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->Data(MaterialsRheologyBEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+i]-1)];
     678                        this->inputs->AddInput(new TriaVertexInput(MaterialsRheologyBbarEnum,nodeinputs));
    679679                }
    680680
    681681                /*Get n*/
    682                 if (iomodel->Data(RheologyNEnum)) {
    683                         for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->Data(RheologyNEnum)[index];
    684                         this->inputs->AddInput(new TriaVertexInput(RheologyNEnum,nodeinputs));
     682                if (iomodel->Data(MaterialsRheologyNEnum)) {
     683                        for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->Data(MaterialsRheologyNEnum)[index];
     684                        this->inputs->AddInput(new TriaVertexInput(MaterialsRheologyNEnum,nodeinputs));
    685685                }
    686686
     
    689689                        for(i=0;i<num_control_type;i++){
    690690                                switch((int)iomodel->Data(ControlTypeEnum)[i]){
    691                                         case RheologyBbarEnum:
    692                                                 if (iomodel->Data(RheologyBEnum)){
    693                                                         _assert_(iomodel->Data(RheologyBEnum));_assert_(iomodel->Data(CmMinEnum)); _assert_(iomodel->Data(CmMaxEnum));
    694                                                         for(j=0;j<num_vertices;j++)nodeinputs[j]=iomodel->Data(RheologyBEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+j]-1)];
     691                                        case MaterialsRheologyBbarEnum:
     692                                                if (iomodel->Data(MaterialsRheologyBEnum)){
     693                                                        _assert_(iomodel->Data(MaterialsRheologyBEnum));_assert_(iomodel->Data(CmMinEnum)); _assert_(iomodel->Data(CmMaxEnum));
     694                                                        for(j=0;j<num_vertices;j++)nodeinputs[j]=iomodel->Data(MaterialsRheologyBEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+j]-1)];
    695695                                                        for(j=0;j<num_vertices;j++)cmmininputs[j]=iomodel->Data(CmMinEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
    696696                                                        for(j=0;j<num_vertices;j++)cmmaxinputs[j]=iomodel->Data(CmMaxEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
    697                                                         this->inputs->AddInput(new ControlInput(RheologyBbarEnum,TriaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
     697                                                        this->inputs->AddInput(new ControlInput(MaterialsRheologyBbarEnum,TriaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
    698698                                                }
    699699                                                break;
     
    713713
    714714                /*Get B*/
    715                 if (iomodel->Data(RheologyBEnum)) {
    716                         for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->Data(RheologyBEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+i]-1)];
    717                         this->inputs->AddInput(new PentaVertexInput(RheologyBEnum,nodeinputs));
     715                if (iomodel->Data(MaterialsRheologyBEnum)) {
     716                        for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->Data(MaterialsRheologyBEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+i]-1)];
     717                        this->inputs->AddInput(new PentaVertexInput(MaterialsRheologyBEnum,nodeinputs));
    718718                }
    719719
    720720                /*Get n*/
    721                 if (iomodel->Data(RheologyNEnum)) {
    722                         for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->Data(RheologyNEnum)[index];
    723                         this->inputs->AddInput(new PentaVertexInput(RheologyNEnum,nodeinputs));
     721                if (iomodel->Data(MaterialsRheologyNEnum)) {
     722                        for(i=0;i<num_vertices;i++) nodeinputs[i]=iomodel->Data(MaterialsRheologyNEnum)[index];
     723                        this->inputs->AddInput(new PentaVertexInput(MaterialsRheologyNEnum,nodeinputs));
    724724                }
    725725
     
    728728                        for(i=0;i<num_control_type;i++){
    729729                                switch((int)iomodel->Data(ControlTypeEnum)[i]){
    730                                         case RheologyBbarEnum:
    731                                                 if (iomodel->Data(RheologyBEnum)){
    732                                                         _assert_(iomodel->Data(RheologyBEnum));_assert_(iomodel->Data(CmMinEnum)); _assert_(iomodel->Data(CmMaxEnum));
    733                                                         for(j=0;j<num_vertices;j++)nodeinputs[j]=iomodel->Data(RheologyBEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+j]-1)];
     730                                        case MaterialsRheologyBbarEnum:
     731                                                if (iomodel->Data(MaterialsRheologyBEnum)){
     732                                                        _assert_(iomodel->Data(MaterialsRheologyBEnum));_assert_(iomodel->Data(CmMinEnum)); _assert_(iomodel->Data(CmMaxEnum));
     733                                                        for(j=0;j<num_vertices;j++)nodeinputs[j]=iomodel->Data(MaterialsRheologyBEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+j]-1)];
    734734                                                        for(j=0;j<num_vertices;j++)cmmininputs[j]=iomodel->Data(CmMinEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
    735735                                                        for(j=0;j<num_vertices;j++)cmmaxinputs[j]=iomodel->Data(CmMaxEnum)[int(iomodel->Data(ElementsEnum)[num_vertices*index+j]-1)*num_control_type+i];
    736                                                         this->inputs->AddInput(new ControlInput(RheologyBEnum,PentaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
     736                                                        this->inputs->AddInput(new ControlInput(MaterialsRheologyBEnum,PentaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
    737737                                                }
    738738                                                break;
     
    751751bool Matice::IsInput(int name){
    752752        if (
    753                                 name==RheologyBEnum ||
    754                                 name==RheologyBbarEnum ||
    755                                 name==RheologyNEnum
     753                                name==MaterialsRheologyBEnum ||
     754                                name==MaterialsRheologyBbarEnum ||
     755                                name==MaterialsRheologyNEnum
    756756                ){
    757757                return true;
  • issm/trunk/src/c/objects/Materials/Matpar.cpp

    r9617 r9636  
    2626
    2727        this->mid                       = matpar_mid;
    28         iomodel->Constant(&this->rho_ice,RhoIceEnum);
    29         iomodel->Constant(&this->rho_water,RhoWaterEnum);
    30         iomodel->Constant(&this->heatcapacity,HeatcapacityEnum);
    31         iomodel->Constant(&this->thermalconductivity,ThermalconductivityEnum);
    32         iomodel->Constant(&this->latentheat,LatentheatEnum);
    33         iomodel->Constant(&this->beta,BetaEnum);
    34         iomodel->Constant(&this->meltingpoint,MeltingpointEnum);
     28        iomodel->Constant(&this->rho_ice,MaterialsRhoIceEnum);
     29        iomodel->Constant(&this->rho_water,MaterialsRhoWaterEnum);
     30        iomodel->Constant(&this->heatcapacity,MaterialsHeatcapacityEnum);
     31        iomodel->Constant(&this->thermalconductivity,MaterialsThermalconductivityEnum);
     32        iomodel->Constant(&this->latentheat,MaterialsLatentheatEnum);
     33        iomodel->Constant(&this->beta,MaterialsBetaEnum);
     34        iomodel->Constant(&this->meltingpoint,MaterialsMeltingpointEnum);
    3535        iomodel->Constant(&this->referencetemperature,ConstantsReferencetemperatureEnum);
    36         iomodel->Constant(&this->mixed_layer_capacity,MixedLayerCapacityEnum);
    37         iomodel->Constant(&this->thermal_exchange_velocity,ThermalExchangeVelocityEnum);
     36        iomodel->Constant(&this->mixed_layer_capacity,MaterialsMixedLayerCapacityEnum);
     37        iomodel->Constant(&this->thermal_exchange_velocity,MaterialsThermalExchangeVelocityEnum);
    3838        iomodel->Constant(&this->g,ConstantsGEnum);
    3939       
     
    227227
    228228        switch(name){
    229                 case RhoIceEnum:
     229                case MaterialsRhoIceEnum:
    230230                        this->rho_ice=constant;
    231231                        break;
    232232
    233                 case  RhoWaterEnum:
     233                case MaterialsRhoWaterEnum:
    234234                        this->rho_water=constant;
    235235                        break;
    236236
    237                 case  HeatcapacityEnum:
     237                case MaterialsHeatcapacityEnum:
    238238                        this->heatcapacity=constant;
    239239                        break;
    240240
    241                 case  ThermalconductivityEnum:
     241                case MaterialsThermalconductivityEnum:
    242242                        this->thermalconductivity=constant;
    243243                        break;
    244244
    245                 case  LatentheatEnum:
     245                case  MaterialsLatentheatEnum:
    246246                        this->latentheat=constant;
    247247                        break;
    248248
    249                 case  BetaEnum:
     249                case  MaterialsBetaEnum:
    250250                        this->beta=constant;
    251251                        break;
    252252
    253                 case  MeltingpointEnum:
     253                case  MaterialsMeltingpointEnum:
    254254                        this->meltingpoint=constant;
    255255                        break;
     
    259259                        break;
    260260
    261                 case  MixedLayerCapacityEnum:
     261                case  MaterialsMixedLayerCapacityEnum:
    262262                        this->mixed_layer_capacity=constant;
    263263                        break;
    264264
    265                 case  ThermalExchangeVelocityEnum:
     265                case  MaterialsThermalExchangeVelocityEnum:
    266266                        this->thermalconductivity=constant;
    267267                        break;
    268268
    269                 case  GravityEnum:
     269                case  ConstantsGEnum:
    270270                        this->g=constant;
    271271                        break;
  • issm/trunk/src/c/solutions/controltao_core.cpp

    r8607 r9636  
    5151
    5252        /*Set up and solve TAO*/
    53         GetVectorFromInputsx(&initial_solution,femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,RheologyBbarEnum,VertexEnum);
     53        GetVectorFromInputsx(&initial_solution,femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,MaterialsRheologyBbarEnum,VertexEnum);
    5454        info = TaoCreate(PETSC_COMM_WORLD,method,&tao); if(info) _error_("STOP");
    5555        info = TaoApplicationCreate(PETSC_COMM_WORLD,&controlapp); if(info) _error_("STOP");
     
    107107
    108108        InputUpdateFromConstantx(femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,SurfaceAbsVelMisfitEnum,CmResponseEnum);
    109         InputUpdateFromVectorx(femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,X,RheologyBbarEnum,VertexEnum);
     109        InputUpdateFromVectorx(femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,X,MaterialsRheologyBbarEnum,VertexEnum);
    110110        adjointdiagnostic_core(user->femmodel);
    111         Gradjx(&gradient, femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters, RheologyBbarEnum);
     111        Gradjx(&gradient, femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters, MaterialsRheologyBbarEnum);
    112112        VecScale(gradient,10e7);
    113113        //VecScale(gradient,-1.);
  • issm/trunk/src/m/classes/model/model.m

    r9632 r9636  
    2727                 timestepping = modelfield('default',0,'marshall',true);
    2828                 groundingline = modelfield('default',0,'marshall',true);
     29                 materials = modelfield('default',0,'marshall',true);
    2930
    3031                 %FIXME: all other fields should belong to other classes
     
    103104
    104105                 %Materials parameters
    105                  rho_ice                    = modelfield('default',0,'marshall',true,'format','Double');
    106                  rho_water                  = modelfield('default',0,'marshall',true,'format','Double');
    107                  heatcapacity               = modelfield('default',0,'marshall',true,'format','Double');
    108                  latentheat                 = modelfield('default',0,'marshall',true,'format','Double');
    109                  thermalconductivity        = modelfield('default',0,'marshall',true,'format','Double');
    110                  meltingpoint               = modelfield('default',0,'marshall',true,'format','Double');
    111                  beta                       = modelfield('default',0,'marshall',true,'format','Double');
    112                  mixed_layer_capacity       = modelfield('default',0,'marshall',true,'format','Double');
    113                  thermal_exchange_velocity  = modelfield('default',0,'marshall',true,'format','Double');
     106
    114107                 min_mechanical_constraints = modelfield('default',0,'marshall',true,'format','Integer');
    115 
    116                  %Physical parameters
    117 
    118                  rheology_B       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
    119                  rheology_n       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
    120                  rheology_law     = modelfield('default','','marshall',true,'preprocess','StringToEnum','format','Integer');
    121108
    122109                 %Geometrical parameters
     
    362349                         if isfield(structmd,'p'), md.friction.p=structmd.p; end
    363350                         if isfield(structmd,'q'), md.friction.q=structmd.p; end
    364                          if isfield(structmd,'B'), md.rheology_B=structmd.B; end
    365                          if isfield(structmd,'n'), md.rheology_n=structmd.n; end
    366351                         if isfield(structmd,'melting'), md.basalforcings.melting_rate=structmd.melting; end
    367352                         if isfield(structmd,'melting_rate'), md.basalforcings.melting_rate=structmd.melting_rate; end
     
    420405                         if isfield(structmd,'time_adapt'), md.timestepping.time_adapt=structmd.time_adapt; end
    421406                         if isfield(structmd,'cfl_coefficient'), md.timestepping.cfl_coefficient=structmd.cfl_coefficient; end
     407                         if isfield(structmd,'rheology_B'), md.materials.rheology_B=structmd.B; end
     408                         if isfield(structmd,'rheology_n'), md.materials.rheology_n=structmd.n; end
    422409
    423410                         %Field changes
     
    461448                         end
    462449                         if isnumeric(structmd.rheology_law),
    463                                  if (structmd.rheology_law==272), md.rheology_law='None';      end
    464                                  if (structmd.rheology_law==368), md.rheology_law='Paterson';  end
    465                                  if (structmd.rheology_law==369), md.rheology_law='Arrhenius'; end
     450                                 if (structmd.rheology_law==272), md.materials.rheology_law='None';      end
     451                                 if (structmd.rheology_law==368), md.materials.rheology_law='Paterson';  end
     452                                 if (structmd.rheology_law==369), md.materials.rheology_law='Arrhenius'; end
    466453                         end
    467454                         if isnumeric(structmd.groundingline_migration),
     
    538525                         md.timestepping=timestepping;
    539526                         md.groundingline=groundingline;
    540 
    541                          %Materials parameters
    542 
    543                          %ice density (kg/m^3)
    544                          md.rho_ice=917;
    545 
    546                          %water density (kg/m^3)
    547                          md.rho_water=1023;
    548 
    549                          %ice heat capacity cp (J/kg/K)
    550                          md.heatcapacity=2093;
    551 
    552                          %ice latent heat of fusion L (J/kg)
    553                          md.latentheat=3.34*10^5;
    554 
    555                          %ice thermal conductivity lamda (W/m/K)
    556                          md.thermalconductivity=2.4;
    557 
    558                          %the melting point of ice at 1 atmosphere of pressure in K
    559                          md.meltingpoint=273.15;
    560 
    561                          %rate of change of melting point with pressure (K/Pa)
    562                          md.beta=9.8*10^-8;
    563 
    564                          %mixed layer (ice-water interface) heat capacity (J/kg/K)
    565                          md.mixed_layer_capacity=3974;
    566 
    567                          %thermal exchange velocity (ice-water interface) (m/s)
    568                          md.thermal_exchange_velocity=1.00*10^-4;
     527                         md.materials=materials;
     528
    569529
    570530                         %Physical parameters
     
    692652                         %0 to desactivate
    693653                         md.waitonlock=Inf;
    694 
    695                          %Rheology law: what is the temperature dependence of B with T
    696                          %available: none, paterson and arrhenius
    697                          md.rheology_law='Paterson';
    698654
    699655                 end
  • issm/trunk/src/m/enum/EnumToModelField.m

    r9612 r9636  
    1313                case ThicknessEnum(), string='thickness'; return
    1414                case FrictionCoefficientEnum(), string='drag_coefficient'; return
    15                 case RheologyBEnum(), string='rheology_B'; return
    16                 case RheologyBbarEnum(), string='rheology_B'; return
     15                case MaterialsRheologyBEnum(), string='rheology_B'; return
     16                case MaterialsRheologyBbarEnum(), string='rheology_B'; return
    1717                case DhdtEnum(), string='dhdt'; return
    1818                case VxEnum(), string='vx'; return
  • issm/trunk/src/m/model/ThicknessCorrection.m

    r8298 r9636  
    1919%initialize thickness with the observations, and get hydrostatic thickness from the dem
    2020thickness=md.thickness;
    21 thickness_hydro=md.surface/(1-md.rho_ice/md.rho_water);
     21thickness_hydro=md.surface/(1-md.materials.rho_ice/md.materials.rho_water);
    2222thickness_coeff=zeros(size(md.thickness));
    2323
     
    6767
    6868%check the computed thickness
    69 minth=1/(1-md.rho_ice/md.rho_water);
     69minth=1/(1-md.materials.rho_ice/md.materials.rho_water);
    7070pos=find(isnan(thickness) | (thickness<=0));
    7171thickness(pos)=minth;
  • issm/trunk/src/m/model/basalstress.m

    r9610 r9636  
    1818
    1919%compute basal drag
    20 bx=(md.constants.g*(md.rho_ice*md.thickness+md.rho_water*md.bed)).^r.*(md.friction.coefficient).^2.*ubx.^s;
    21 by=(md.constants.g*(md.rho_ice*md.thickness+md.rho_water*md.bed)).^r.*(md.friction.coefficient).^2.*uby.^s;
    22 b=(md.constants.g*(md.rho_ice*md.thickness+md.rho_water*md.bed)).^r.*(md.friction.coefficient).^2.*ub.^s;
     20bx=(md.constants.g*(md.materials.rho_ice*md.thickness+md.materials.rho_water*md.bed)).^r.*(md.friction.coefficient).^2.*ubx.^s;
     21by=(md.constants.g*(md.materials.rho_ice*md.thickness+md.materials.rho_water*md.bed)).^r.*(md.friction.coefficient).^2.*uby.^s;
     22b=(md.constants.g*(md.materials.rho_ice*md.thickness+md.materials.rho_water*md.bed)).^r.*(md.friction.coefficient).^2.*ub.^s;
  • issm/trunk/src/m/model/basevert.m

    r1 r9636  
    3333dbdy=(md.bed(md.elements).*beta)*summation;
    3434
    35 wb=-md.rho_ice/md.rho_water*(hux+hvy)+uelem.*dbdx+velem.*dbdy;
     35wb=-md.materials.rho_ice/md.materials.rho_water*(hux+hvy)+uelem.*dbdx+velem.*dbdy;
  • issm/trunk/src/m/model/collapse.m

    r9632 r9636  
    6969
    7070%materials
    71 md.rheology_B=DepthAverage(md,md.rheology_B);
    72 md.rheology_n=project2d(md,md.rheology_n,1);
     71md.materials.rheology_B=DepthAverage(md,md.materials.rheology_B);
     72md.materials.rheology_n=project2d(md,md.materials.rheology_n,1);
    7373
    7474%special for thermal modeling:
  • issm/trunk/src/m/model/contourmassbalance.m

    r8298 r9636  
    3434ny=sin(atan2((x(segments(:,1))-x(segments(:,2))) , (y(segments(:,2))-y(segments(:,1)))));
    3535L=sqrt((x(segments(:,1))-x(segments(:,2))).^2+(y(segments(:,2))-y(segments(:,1))).^2);
    36 flux = - md.rho_ice*sum(L.*H.*(vx.*nx+vy.*ny)); %outflux is negative!
     36flux = - md.materials.rho_ice*sum(L.*H.*(vx.*nx+vy.*ny)); %outflux is negative!
    3737disp(['mass outflux on ' file ' = ' num2str(-flux/10^9) ' Gt/yr']);
    3838areas=GetAreas(md.elements,md.x,md.y);
    39 dhdt=flux/(sum(areas(find(elemin)))*md.rho_ice);
     39dhdt=flux/(sum(areas(find(elemin)))*md.materials.rho_ice);
    4040disp(['dhdt on ' file ' (Flux  method) = ' num2str(dhdt) ' m/yr']);
    4141
  • issm/trunk/src/m/model/drivingstress.m

    r9597 r9636  
    1414thickness_bar=(md.thickness(md.elements(:,1))+md.thickness(md.elements(:,2))+md.thickness(md.elements(:,3)))/3;
    1515
    16 px=md.rho_ice*md.constants.g*thickness_bar.*sx;
    17 py=md.rho_ice*md.constants.g*thickness_bar.*sy;
     16px=md.materials.rho_ice*md.constants.g*thickness_bar.*sx;
     17py=md.materials.rho_ice*md.constants.g*thickness_bar.*sy;
    1818pmag=sqrt(px.^2+py.^2);
  • issm/trunk/src/m/model/effectivepressure.m

    r9605 r9636  
    88%      Neff=effectivepressure(md)
    99
    10 Neff=md.rho_ice*md.constants.g*md.thickness+md.rho_ice*md.constants.g*md.bed;
     10Neff=md.materials.rho_ice*md.constants.g*md.thickness+md.materials.rho_ice*md.constants.g*md.bed;
    1111pos=find(Neff<0);
    1212Neff(pos)=0;
  • issm/trunk/src/m/model/extrude.m

    r9632 r9636  
    197197
    198198%materials
    199 md.rheology_B=project3d(md,'vector',md.rheology_B,'type','node');
    200 md.rheology_n=project3d(md,'vector',md.rheology_n,'type','element');
     199md.materials.rheology_B=project3d(md,'vector',md.materials.rheology_B,'type','node');
     200md.materials.rheology_n=project3d(md,'vector',md.materials.rheology_n,'type','element');
    201201
    202202%parameters
     
    217217%Put lithostatic pressure is there is an existing pressure
    218218if ~isnan(md.pressure),
    219         md.pressure=md.constants.g*md.rho_ice*(md.surface-md.z);
     219        md.pressure=md.constants.g*md.materials.rho_ice*(md.surface-md.z);
    220220end
    221221
  • issm/trunk/src/m/model/ismodelselfconsistent.m

    r9635 r9636  
    8383%NO NAN {{{1
    8484fields={'numberofelements','numberofnodes','x','y','z','friction.coefficient','friction.p','friction.q',...
    85         'rho_ice','rho_water','rheology_B','elementoniceshelf','surface','thickness','bed','constants.g','settings.lowmem','nsteps','maxiter',...
    86         'eps_res','max_nonlinear_iterations','rheology_n','nodeonbed','nodeonsurface','elementonbed','elementonsurface','elementconnectivity'};
     85        'materials.rho_ice','materials.rho_water','materials.rheology_B','elementoniceshelf','surface','thickness','bed','constants.g','settings.lowmem','nsteps','maxiter',...
     86        'eps_res','max_nonlinear_iterations','materials.rheology_n','nodeonbed','nodeonsurface','elementonbed','elementonsurface','elementconnectivity'};
    8787checknan(md,fields);
    8888%}}}}
    8989%FIELDS >= 0 {{{1
    9090fields={'numberofelements','numberofnodes','elements','friction.coefficient','friction.p','friction.q',...
    91         'rho_ice','rho_water','rheology_B','elementoniceshelf','thickness','constants.g','eps_res','max_nonlinear_iterations','eps_rel','eps_abs','nsteps','maxiter',...
    92         'settings.lowmem','rheology_n','nodeonbed','nodeonsurface','elementonbed','elementonsurface'};
     91        'materials.rho_ice','materials.rho_water','materials.rheology_B','elementoniceshelf','thickness','constants.g','eps_res','max_nonlinear_iterations','eps_rel','eps_abs','nsteps','maxiter',...
     92        'settings.lowmem','materials.rheology_n','nodeonbed','nodeonsurface','elementonbed','elementonsurface'};
    9393checkgreater(md,fields,0);
    9494%}}}
    9595%FIELDS > 0 {{{1
    9696fields={'numberofelements','numberofnodes','elements','friction.p',...
    97         'rho_ice','rho_water','rheology_B','thickness','constants.g','max_nonlinear_iterations','eps_res','eps_rel','eps_abs','maxiter'};
     97        'materials.rho_ice','materials.rho_water','materials.rheology_B','thickness','constants.g','max_nonlinear_iterations','eps_res','eps_rel','eps_abs','maxiter'};
    9898checkgreaterstrict(md,fields,0);
    9999%}}}
    100100%SIZE NUMBEROFELEMENTS {{{1
    101 fields={'friction.p','friction.q','elementoniceshelf','rheology_n','elementonbed'};
     101fields={'friction.p','friction.q','elementoniceshelf','materials.rheology_n','elementonbed'};
    102102checksize(md,fields,[md.numberofelements 1]);
    103103%}}}
    104104%SIZE NUMBEROFNODES {{{1
    105 fields={'x','y','z','rheology_B','friction.coefficient','basalforcings.melting_rate','surface','thickness','bed','nodeonbed','nodeonsurface'};
     105fields={'x','y','z','materials.rheology_B','friction.coefficient','basalforcings.melting_rate','surface','thickness','bed','nodeonbed','nodeonsurface'};
    106106checksize(md,fields,[md.numberofnodes 1]);
    107107%}}}
     
    181181        message(['model not consistent: model ' md.miscellaneous.name ' hydrostatic_adjustment field should be AbsoluteEnum or IncrementalEnum']);
    182182end
    183 if ~ismember({md.rheology_law},{'None' 'Paterson' 'Arrhenius'}),
     183if ~ismember({md.materials.rheology_law},{'None' 'Paterson' 'Arrhenius'}),
    184184        message(['model not consistent: model ' md.miscellaneous.name ' rheology_law field should be ''none'' ''paterson'' or ''arrhenius''']);
    185185end
  • issm/trunk/src/m/model/mechanicalproperties.m

    r9597 r9636  
    4848%compute viscosity
    4949nu=zeros(numberofelements,1);
    50 B_bar=md.rheology_B(index)*summation/3;
    51 power=(md.rheology_n-1)./(2*md.rheology_n);
     50B_bar=md.materials.rheology_B(index)*summation/3;
     51power=(md.materials.rheology_n-1)./(2*md.materials.rheology_n);
    5252second_inv=(ux.^2+vy.^2+((uy+vx).^2)/4+ux.*vy);
    5353%some corrections
  • issm/trunk/src/m/model/plot/plot_basaldrag.m

    r9610 r9636  
    3030
    3131%compute basal drag
    32 drag=(max(md.constants.g*(md.rho_ice*md.thickness+md.rho_water*md.bed),0)).^r.*(md.friction.coefficient).^2.*ub.^s/1000;
     32drag=(max(md.constants.g*(md.materials.rho_ice*md.thickness+md.materials.rho_water*md.bed),0)).^r.*(md.friction.coefficient).^2.*ub.^s/1000;
    3333
    3434%Figure out if this is a Section plot
  • issm/trunk/src/m/model/sia.m

    r9597 r9636  
    2222Ael=Bel.^(-3);
    2323
    24 velx=-2*(md.rho_ice*md.constants.g)^3*s.^2.*sx.*Ael/4.*hel.^4;
    25 vely=-2*(md.rho_ice*md.constants.g)^3*s.^2.*sy.*Ael/4.*hel.^4;
     24velx=-2*(md.materials.rho_ice*md.constants.g)^3*s.^2.*sx.*Ael/4.*hel.^4;
     25vely=-2*(md.materials.rho_ice*md.constants.g)^3*s.^2.*sy.*Ael/4.*hel.^4;
    2626vel=sqrt(velx.^2+vely.^2);
  • issm/trunk/template

    r9633 r9636  
    6363        elementonwater
    6464
    65 }}}
    66 materials{{{
    67         rho_ice
    68         rho_water
    69         heatcapacity
    70         latentheat
    71         thermalconductivity
    72         meltingpoint
    73         beta
    74         mixed_layer_capacity
    75         thermal_exchange_velocity
    76         rheology_B
    77         rheology_n
    78         rheology_law
    7965}}}
    8066flowequation{{{
     
    186172        qmu_params
    187173        dakotaresults ->results
    188         dakotain ->check
    189         dakotaout ->check
    190         dakotadat ->check
    191174        qmu_analysis -> isqmu
    192175        part ->partition
  • issm/trunk/test/Miscellaneous/Bump/Bump.par

    r8824 r9636  
    88ymax=max(md.y);
    99md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
    10 md.bed=-md.rho_ice/md.rho_water*md.thickness+10;
     10md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness+10;
    1111md.surface=md.bed+md.thickness;
    12 md.bed=-md.rho_ice/md.rho_water*md.thickness+height*exp(-((md.x-50000).^2+(md.y-50000).^2)/(4000)^2)+10;
     12md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness+height*exp(-((md.x-50000).^2+(md.y-50000).^2)/(4000)^2)+10;
    1313md.thickness=md.surface-md.bed;
    1414
     
    2323md.observed_temperature=(273-20)*ones(md.numberofnodes,1);
    2424
    25 md.rheology_B=paterson(md.observed_temperature);
    26 md.rheology_n=3*ones(md.numberofelements,1);
     25md.materials.rheology_B=paterson(md.observed_temperature);
     26md.materials.rheology_n=3*ones(md.numberofelements,1);
    2727
    2828%Deal with boundary conditions:
  • issm/trunk/test/Miscellaneous/GJM_test1/SquareShelf.par

    r9632 r9636  
    77ymax=max(md.y);
    88md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
    9 md.bed=-md.rho_ice/md.rho_water*md.thickness;
     9md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
    1010md.surface=md.bed+md.thickness;
    1111
    1212%Materials
    1313md.observed_temperature=(273-20)*ones(md.numberofnodes,1);
    14 md.rheology_B=paterson(md.observed_temperature);
    15 md.rheology_n=3*ones(md.numberofelements,1);
     14md.materials.rheology_B=paterson(md.observed_temperature);
     15md.materials.rheology_n=3*ones(md.numberofelements,1);
    1616md.temperature=md.observed_temperature;
    1717
  • issm/trunk/test/Miscellaneous/Regularization/Square.par

    r8824 r9636  
    55ymax=max(md.y);
    66md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
    7 md.bed=-md.rho_ice/md.rho_water*md.thickness+10;
     7md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness+10;
    88md.surface=md.bed+md.thickness;
    99
     
    1919md.observed_temperature=(273-20)*ones(md.numberofnodes,1);
    2020
    21 md.rheology_B=paterson(md.observed_temperature);
    22 md.rheology_n=3*ones(md.numberofelements,1);
     21md.materials.rheology_B=paterson(md.observed_temperature);
     22md.materials.rheology_n=3*ones(md.numberofelements,1);
    2323
    2424%Deal with boundary conditions:
  • issm/trunk/test/Miscellaneous/connectivity/Square.par

    r9632 r9636  
    1212ymax=max(md.y);
    1313md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
    14 md.bed=-md.rho_ice/md.rho_water*md.thickness;
     14md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
    1515md.surface=md.bed+md.thickness;
    1616
     
    2626md.observed_temperature=(273-20)*ones(md.numberofnodes,1);
    2727
    28 md.rheology_B=paterson(md.observed_temperature);
    29 md.rheology_n=3*ones(md.numberofelements,1);
     28md.materials.rheology_B=paterson(md.observed_temperature);
     29md.materials.rheology_n=3*ones(md.numberofelements,1);
    3030
    3131%Deal with boundary conditions:
  • issm/trunk/test/NightlyRun/test1301.m

    r9632 r9636  
    1717pos=find(md.nodeonsurface);
    1818md.thermal.spctemperature(pos)=md.temperature(pos);
    19 md.rheology_B=paterson(md.temperature);
     19md.materials.rheology_B=paterson(md.temperature);
    2020
    2121%analytical results
    2222%melting heat = geothermal flux
    2323%Mb*L*rho=G   => Mb=G/L*rho
    24 melting=md.basalforcings.geothermalflux/(md.rho_ice*md.latentheat)*md.constants.yts;
     24melting=md.basalforcings.geothermalflux/(md.materials.rho_ice*md.materials.latentheat)*md.constants.yts;
    2525
    2626%modeled  results
  • issm/trunk/test/NightlyRun/test1302.m

    r9632 r9636  
    2020%analytical results
    2121%d2T/dz2-w*rho_ice*c/k*dT/dz=0   T(surface)=0  T(bed)=10   => T=A exp(alpha z)+B
    22 alpha=0.1/md.constants.yts*md.rho_ice*md.heatcapacity/md.thermalconductivity;   %alpha=w rho_ice c /k  and w=0.1m/an
     22alpha=0.1/md.constants.yts*md.materials.rho_ice*md.heatcapacity/md.thermalconductivity;   %alpha=w rho_ice c /k  and w=0.1m/an
    2323A=10/(exp(alpha*(-1000))-1);    %A=T(bed)/(exp(alpha*bed)-1)  with bed=-1000 T(bed)=10
    2424B=-A;
  • issm/trunk/test/NightlyRun/test233.m

    r9597 r9636  
    1818xmax=max(md.x);
    1919
    20 di=md.rho_ice/md.rho_water;
     20di=md.materials.rho_ice/md.materials.rho_water;
    2121
    2222h=1000;
    2323md.thickness=h*ones(md.numberofnodes,1);
    24 md.bed=-md.rho_ice/md.rho_water*md.thickness;
     24md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
    2525md.surface=md.bed+md.thickness;
    2626
     
    3333%Materials
    3434md.temperature=(273-20)*ones(md.numberofnodes,1);
    35 md.rheology_B=paterson(md.temperature);
    36 md.rheology_n=3*ones(md.numberofelements,1);
     35md.materials.rheology_B=paterson(md.temperature);
     36md.materials.rheology_n=3*ones(md.numberofelements,1);
    3737
    3838%Boundary conditions:
     
    6161
    6262%create analytical solution: strain rate is constant = ((rho_ice*g*h)/4B)^3 (Paterson, 4th Edition, page 292.
    63 %ey_c=(md.rho_ice*md.constants.g*(1-di)*md.thickness./(4*md.rheology_B)).^3;
     63%ey_c=(md.materials.rho_ice*md.constants.g*(1-di)*md.thickness./(4*md.materials.rheology_B)).^3;
    6464%vy_c=ey_c.*md.y*md.constants.yts;
    6565
  • issm/trunk/test/NightlyRun/test234.m

    r9597 r9636  
    1818xmax=max(md.x);
    1919
    20 di=md.rho_ice/md.rho_water;
     20di=md.materials.rho_ice/md.materials.rho_water;
    2121
    2222h=1000;
    2323md.thickness=h*ones(md.numberofnodes,1);
    24 md.bed=-md.rho_ice/md.rho_water*md.thickness;
     24md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
    2525md.surface=md.bed+md.thickness;
    2626
     
    3333%Materials
    3434md.temperature=(273-20)*ones(md.numberofnodes,1);
    35 md.rheology_B=paterson(md.temperature);
    36 md.rheology_n=3*ones(md.numberofelements,1);
     35md.materials.rheology_B=paterson(md.temperature);
     36md.materials.rheology_n=3*ones(md.numberofelements,1);
    3737
    3838%Boundary conditions:
     
    6161
    6262%create analytical solution: strain rate is constant = ((rho_ice*g*h)/4B)^3 (Paterson, 4th Edition, page 292.
    63 %ey_c=(md.rho_ice*md.constants.g*(1-di)*md.thickness./(4*md.rheology_B)).^3;
     63%ey_c=(md.materials.rho_ice*md.constants.g*(1-di)*md.thickness./(4*md.materials.rheology_B)).^3;
    6464%vy_c=ey_c.*md.y*md.constants.yts;
    6565
  • issm/trunk/test/NightlyRun/test235.m

    r9571 r9636  
    1515xmax=max(md.x);
    1616
    17 di=md.rho_ice/md.rho_water;
     17di=md.materials.rho_ice/md.materials.rho_water;
    1818
    1919h=1000;
    2020md.thickness=h*ones(md.numberofnodes,1);
    21 md.bed=-md.rho_ice/md.rho_water*md.thickness;
     21md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
    2222md.surface=md.bed+md.thickness;
    2323
     
    3030%Materials
    3131md.temperature=(273-20)*ones(md.numberofnodes,1);
    32 md.rheology_B=paterson(md.temperature);
    33 md.rheology_n=3*ones(md.numberofelements,1);
     32md.materials.rheology_B=paterson(md.temperature);
     33md.materials.rheology_n=3*ones(md.numberofelements,1);
    3434
    3535%Boundary conditions:
  • issm/trunk/test/NightlyRun/test236.m

    r9571 r9636  
    1515xmax=max(md.x);
    1616
    17 di=md.rho_ice/md.rho_water;
     17di=md.materials.rho_ice/md.materials.rho_water;
    1818
    1919h=1000;
    2020md.thickness=h*ones(md.numberofnodes,1);
    21 md.bed=-md.rho_ice/md.rho_water*md.thickness;
     21md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
    2222md.surface=md.bed+md.thickness;
    2323
     
    3030%Materials
    3131md.temperature=(273-20)*ones(md.numberofnodes,1);
    32 md.rheology_B=paterson(md.temperature);
    33 md.rheology_n=3*ones(md.numberofelements,1);
     32md.materials.rheology_B=paterson(md.temperature);
     33md.materials.rheology_n=3*ones(md.numberofelements,1);
    3434
    3535%Boundary conditions:
  • issm/trunk/test/NightlyRun/test423.m

    r9610 r9636  
    1313%Dakota options
    1414%variables
    15 md.variables.rho_ice=normal_uncertain('RhoIce',md.rho_ice,0.01);
     15md.variables.rho_ice=normal_uncertain('RhoIce',md.materials.rho_ice,0.01);
    1616md.variables.drag_coefficient=normal_uncertain('scaled_FrictionCoefficient',1,.01);
    1717%md.variables.drag_coefficient=normal_uncertain('scaled_FrictionCoefficient',1,.01*ones(md.npart,1));
  • issm/trunk/test/NightlyRun/test424.m

    r9610 r9636  
    1414%Dakota options
    1515%variables
    16 md.variables.rho_ice=normal_uncertain('RhoIce',md.rho_ice,0.01);
     16md.variables.rho_ice=normal_uncertain('RhoIce',md.materials.rho_ice,0.01);
    1717md.variables.drag_coefficient=normal_uncertain('scaled_FrictionCoefficient',1,0.01);
    1818
  • issm/trunk/test/NightlyRun/test425.m

    r9610 r9636  
    1313
    1414%variables
    15 md.variables.rho_ice=normal_uncertain('RhoIce',md.rho_ice,0.01);
     15md.variables.rho_ice=normal_uncertain('RhoIce',md.materials.rho_ice,0.01);
    1616md.variables.drag_coefficient=normal_uncertain('scaled_FrictionCoefficient',1,0.01);
    1717
  • issm/trunk/test/NightlyRun/test426.m

    r9610 r9636  
    1313
    1414%variables
    15 md.variables.rho_ice=normal_uncertain('RhoIce',md.rho_ice,0.01);
     15md.variables.rho_ice=normal_uncertain('RhoIce',md.materials.rho_ice,0.01);
    1616md.variables.drag_coefficient=normal_uncertain('scaled_FrictionCoefficient',1,0.01);
    1717
  • issm/trunk/test/NightlyRun/test427.m

    r9610 r9636  
    44md=setelementstype(md,'macayeal','all');
    55md.cluster=none;
    6 md.rho_ice=10^7; %involved in the mass flux, make it easy
     6md.materials.rho_ice=10^7; %involved in the mass flux, make it easy
    77md.thickness(:)=1; %make it easy
    88
  • issm/trunk/test/NightlyRun/test428.m

    r9610 r9636  
    44md=setelementstype(md,'macayeal','all');
    55md.cluster=generic('name',oshostname(),'np',3);
    6 md.rho_ice=10^7; %involved in the mass flux, make it easy
     6md.materials.rho_ice=10^7; %involved in the mass flux, make it easy
    77md.thickness(:)=1; %make it easy
    88
  • issm/trunk/test/NightlyRun/test434.m

    r9610 r9636  
    44md=setelementstype(md,'macayeal','all');
    55md.cluster=generic('name',oshostname(),'np',3);
    6 md.rho_ice=10^7; %involved in the mass flux, make it easy
     6md.materials.rho_ice=10^7; %involved in the mass flux, make it easy
    77md.thickness(:)=1; %make it easy
    88
  • issm/trunk/test/NightlyRun/test439.m

    r9571 r9636  
    1313%Dakota options
    1414%variables
    15 md.variables.rho_ice=normal_uncertain('RhoIce',md.rho_ice,0.01);
     15md.variables.rho_ice=normal_uncertain('RhoIce',md.materials.rho_ice,0.01);
    1616
    1717%responses
  • issm/trunk/test/NightlyRun/test440.m

    r9571 r9636  
    1313%Dakota options
    1414%variables
    15 md.variables.rho_ice=normal_uncertain('RhoIce',md.rho_ice,0.01);
     15md.variables.rho_ice=normal_uncertain('RhoIce',md.materials.rho_ice,0.01);
    1616
    1717%responses
  • issm/trunk/test/NightlyRun/test446.m

    r9629 r9636  
    2323md.cluster=generic('name',oshostname(),'np',3);
    2424%plug holes into the ice sheet, to test for grounding line migration. {{{1
    25 di=md.rho_ice/md.rho_water;
     25di=md.materials.rho_ice/md.materials.rho_water;
    2626rad=sqrt((md.x).*md.x+(md.y).*md.y);
    2727pos=find(rad<200000);
  • issm/trunk/test/NightlyRun/test521.m

    r9541 r9636  
    44
    55%impose hydrostatic equilibrium (required by Stokes)
    6 md.bed=-md.rho_ice/md.rho_water*md.thickness;
     6md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
    77md.surface=md.bed+md.thickness;
    88md=extrude(md,3,1);
  • issm/trunk/test/NightlyRun/test522.m

    r9541 r9636  
    44
    55%impose hydrostatic equilibrium (required by Stokes)
    6 md.bed=-md.rho_ice/md.rho_water*md.thickness;
     6md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
    77md.surface=md.bed+md.thickness;
    88md=extrude(md,3,1);
  • issm/trunk/test/Par/79North.par

    r9632 r9636  
    1212%Materials
    1313md.temperature=(273-20)*ones(md.numberofnodes,1);
    14 md.rheology_B=paterson(md.temperature);
    15 md.rheology_n=3*ones(md.numberofelements,1);
     14md.materials.rheology_B=paterson(md.temperature);
     15md.materials.rheology_n=3*ones(md.numberofelements,1);
    1616
    1717%Friction
  • issm/trunk/test/Par/ISMIPA.par

    r9610 r9636  
    1515
    1616disp('      creating flow law paramter');
    17 md.rheology_B=6.8067*10^7*ones(md.numberofnodes,1);
    18 md.rheology_n=3*ones(md.numberofelements,1);
     17md.materials.rheology_B=6.8067*10^7*ones(md.numberofnodes,1);
     18md.materials.rheology_n=3*ones(md.numberofelements,1);
    1919
    2020disp('      boundary conditions for diagnostic model');
  • issm/trunk/test/Par/ISMIPB.par

    r9610 r9636  
    1515
    1616disp('      creating flow law paramter');
    17 md.rheology_B=6.8067*10^7*ones(md.numberofnodes,1);
    18 md.rheology_n=3*ones(md.numberofelements,1);
     17md.materials.rheology_B=6.8067*10^7*ones(md.numberofnodes,1);
     18md.materials.rheology_n=3*ones(md.numberofelements,1);
    1919
    2020disp('      boundary conditions for diagnostic model');
  • issm/trunk/test/Par/ISMIPC.par

    r9610 r9636  
    77
    88disp('      creating drag');
    9 %md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.x*2*pi/max(md.x/2)).*sin(md.y*2*pi/max(md.x/2)))./(md.constants.g*(md.rho_ice*md.thickness+md.rho_water*md.bed)));
     9%md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.x*2*pi/max(md.x/2)).*sin(md.y*2*pi/max(md.x/2)))./(md.constants.g*(md.materials.rho_ice*md.thickness+md.materials.rho_water*md.bed)));
    1010md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.x*2*pi/max(md.x)).*sin(md.y*2*pi/max(md.x))));
    1111%Take care of iceshelves: no basal drag
     
    1616
    1717disp('      creating flow law paramter');
    18 md.rheology_B=6.8067*10^7*ones(md.numberofnodes,1);
    19 md.rheology_n=3*ones(md.numberofelements,1);
     18md.materials.rheology_B=6.8067*10^7*ones(md.numberofnodes,1);
     19md.materials.rheology_n=3*ones(md.numberofelements,1);
    2020
    2121disp('      boundary conditions for diagnostic model: ');
  • issm/trunk/test/Par/ISMIPD.par

    r9610 r9636  
    1515
    1616disp('      creating flow law paramter');
    17 md.rheology_B=6.8067*10^7*ones(md.numberofnodes,1);
    18 md.rheology_n=3*ones(md.numberofelements,1);
     17md.materials.rheology_B=6.8067*10^7*ones(md.numberofnodes,1);
     18md.materials.rheology_n=3*ones(md.numberofelements,1);
    1919
    2020disp('      boundary conditions for diagnostic model: ');
  • issm/trunk/test/Par/ISMIPE.par

    r9610 r9636  
    2424
    2525disp('      creating flow law paramter');
    26 md.rheology_B=6.8067*10^7*ones(md.numberofnodes,1);
    27 md.rheology_n=3*ones(md.numberofelements,1);
     26md.materials.rheology_B=6.8067*10^7*ones(md.numberofnodes,1);
     27md.materials.rheology_n=3*ones(md.numberofelements,1);
    2828
    2929disp('      boundary conditions for diagnostic model: ');
  • issm/trunk/test/Par/ISMIPF.par

    r9632 r9636  
    1414
    1515disp('      creating flow law paramter');
    16 md.rheology_B=1.4734*10^14*ones(md.numberofnodes,1);
    17 md.rheology_n=1*ones(md.numberofelements,1);
    18 md.rheology_law='None';
     16md.materials.rheology_B=1.4734*10^14*ones(md.numberofnodes,1);
     17md.materials.rheology_n=1*ones(md.numberofelements,1);
     18md.materials.rheology_law='None';
    1919
    2020disp('      boundary conditions for diagnostic model');
  • issm/trunk/test/Par/Pig.par

    r9628 r9636  
    1616%Materials
    1717md.temperature=(273-20)*ones(md.numberofnodes,1);
    18 md.rheology_B=paterson(md.temperature);
    19 md.rheology_n=3*ones(md.numberofelements,1);
     18md.materials.rheology_B=paterson(md.temperature);
     19md.materials.rheology_n=3*ones(md.numberofelements,1);
    2020md.temperature=md.temperature;
    2121
  • issm/trunk/test/Par/RoundSheetEISMINT.par

    r9628 r9636  
    1818
    1919disp('      creating flow law paramter');
    20 md.rheology_B=6.81*10^(7)*ones(md.numberofnodes,1); %to have the same B as the analytical solution
    21 md.rheology_n=3*ones(md.numberofelements,1);
     20md.materials.rheology_B=6.81*10^(7)*ones(md.numberofnodes,1); %to have the same B as the analytical solution
     21md.materials.rheology_n=3*ones(md.numberofelements,1);
    2222
    2323disp('      creating surface mass balance');
     
    5353
    5454%Constants
    55 md.rho_ice=910;
    56 md.thermalconductivity=2.1;
    57 md.latentheat=3.35*10^5;
    58 md.beta=8.66*10^-4/(md.rho_ice*md.constants.g); %conversion from K/m to K/Pa
     55md.materials.rho_ice=910;
     56md.materials.thermalconductivity=2.1;
     57md.materials.latentheat=3.35*10^5;
     58md.materials.beta=8.66*10^-4/(md.materials.rho_ice*md.constants.g); %conversion from K/m to K/Pa
    5959md.constants.yts=31556926;
  • issm/trunk/test/Par/RoundSheetShelf.par

    r9632 r9636  
    11%Start defining model parameters here
    22
    3 di=md.rho_ice/md.rho_water;
     3di=md.materials.rho_ice/md.materials.rho_water;
    44rad=1e6;
    55shelfextent=2e5;
     
    1111ymax=max(radius);
    1212md.thickness=hmax+(hmin-hmax)*(radius-ymin)/(ymax-ymin);
    13 md.bed=-md.rho_ice/md.rho_water*md.thickness;
     13md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
    1414
    1515pos=find(md.nodeonicesheet);
     
    4141%Materials
    4242md.temperature=(273-20)*ones(md.numberofnodes,1);
    43 md.rheology_B=paterson(md.temperature);
    44 md.rheology_n=3*ones(md.numberofelements,1);
     43md.materials.rheology_B=paterson(md.temperature);
     44md.materials.rheology_n=3*ones(md.numberofelements,1);
    4545
    4646%Surface mass balance and basal melting
  • issm/trunk/test/Par/RoundSheetStaticEISMINT.par

    r9611 r9636  
    2323
    2424disp('      creating flow law paramter');
    25 md.rheology_B=6.81*10^(7)*ones(md.numberofnodes,1); %to have the same B as the analytical solution
    26 md.rheology_n=3*ones(md.numberofelements,1);
     25md.materials.rheology_B=6.81*10^(7)*ones(md.numberofnodes,1); %to have the same B as the analytical solution
     26md.materials.rheology_n=3*ones(md.numberofelements,1);
    2727
    2828disp('      creating surface mass balance');
  • issm/trunk/test/Par/SquareEISMINT.par

    r9632 r9636  
    55ymax=max(md.y);
    66md.thickness=500*ones(md.numberofnodes,1);
    7 md.bed=-md.rho_ice/md.rho_water*md.thickness;
     7md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
    88md.surface=md.bed+md.thickness;
    99
     
    2020
    2121disp('      creating flow law paramter');
    22 md.rheology_B=1.7687*10^8*ones(md.numberofnodes,1);
    23 md.rheology_n=3*ones(md.numberofelements,1);
     22md.materials.rheology_B=1.7687*10^8*ones(md.numberofnodes,1);
     23md.materials.rheology_n=3*ones(md.numberofelements,1);
    2424
    2525disp('      creating surface mass balance');
  • issm/trunk/test/Par/SquareSheetConstrained.par

    r9632 r9636  
    77ymax=max(md.y);
    88md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
    9 md.bed=-md.rho_ice/md.rho_water*md.thickness+20;
     9md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness+20;
    1010md.surface=md.bed+md.thickness;
    1111
     
    2020%Materials
    2121md.temperature=(273-20)*ones(md.numberofnodes,1);
    22 md.rheology_B=paterson(md.temperature);
    23 md.rheology_n=3*ones(md.numberofelements,1);
     22md.materials.rheology_B=paterson(md.temperature);
     23md.materials.rheology_n=3*ones(md.numberofelements,1);
    2424
    2525%Friction
  • issm/trunk/test/Par/SquareSheetShelf.par

    r9632 r9636  
    77ymax=max(md.y);
    88md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
    9 md.bed=-md.rho_ice/md.rho_water*md.thickness;
    10 bed_sheet=-md.rho_ice/md.rho_water*(hmax+(hmin-hmax)*(ymax/2-ymin)/(ymax-ymin));
     9md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
     10bed_sheet=-md.materials.rho_ice/md.materials.rho_water*(hmax+(hmin-hmax)*(ymax/2-ymin)/(ymax-ymin));
    1111pos=find(md.y<=ymax/2);
    1212md.bed(pos)=bed_sheet;
     
    2323%Materials
    2424md.temperature=(273-20)*ones(md.numberofnodes,1);
    25 md.rheology_B=paterson(md.temperature);
    26 md.rheology_n=3*ones(md.numberofelements,1);
     25md.materials.rheology_B=paterson(md.temperature);
     26md.materials.rheology_n=3*ones(md.numberofelements,1);
    2727
    2828%Accumulation and melting
  • issm/trunk/test/Par/SquareShelf.par

    r9632 r9636  
    77ymax=max(md.y);
    88md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
    9 md.bed=-md.rho_ice/md.rho_water*md.thickness;
     9md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
    1010md.surface=md.bed+md.thickness;
    1111
     
    2020%Materials
    2121md.temperature=(273-20)*ones(md.numberofnodes,1);
    22 md.rheology_B=paterson(md.temperature);
    23 md.rheology_n=3*ones(md.numberofelements,1);
     22md.materials.rheology_B=paterson(md.temperature);
     23md.materials.rheology_n=3*ones(md.numberofelements,1);
    2424
    2525%Friction
  • issm/trunk/test/Par/SquareShelfConstrained.par

    r9632 r9636  
    77ymax=max(md.y);
    88md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
    9 md.bed=-md.rho_ice/md.rho_water*md.thickness;
     9md.bed=-md.materials.rho_ice/md.materials.rho_water*md.thickness;
    1010md.surface=md.bed+md.thickness;
    1111
     
    2020%Materials
    2121md.temperature=(273-20)*ones(md.numberofnodes,1);
    22 md.rheology_B=paterson(md.temperature);
    23 md.rheology_n=3*ones(md.numberofelements,1);
     22md.materials.rheology_B=paterson(md.temperature);
     23md.materials.rheology_n=3*ones(md.numberofelements,1);
    2424
    2525%Surface mass balance and basal melting
  • issm/trunk/test/Par/SquareThermal.par

    r9632 r9636  
    2626
    2727disp('      creating flow law paramter');
    28 md.rheology_B=paterson(md.temperature);
    29 md.rheology_n=3*ones(md.numberofelements,1);
     28md.materials.rheology_B=paterson(md.temperature);
     29md.materials.rheology_n=3*ones(md.numberofelements,1);
    3030
    3131disp('      creating surface mass balance');
Note: See TracChangeset for help on using the changeset viewer.