Changeset 8926


Ignore:
Timestamp:
07/12/11 16:28:11 (14 years ago)
Author:
Eric.Larour
Message:

marshall.m is now automatically feedding off of model template for each field.
this necessitated a rewrite of the ModelProcessorx, so that instead of processing
strings, it processes now enums.

Location:
issm/trunk/src
Files:
79 added
26 deleted
82 edited

Legend:

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

    r8806 r8926  
    189189        ControlTypeEnum,
    190190        ConvergedEnum,
    191         DhDtEnum,
    192191        DragCoefficientEnum,
    193192        DragPEnum,
     
    201200        ElementOnSurfaceEnum,
    202201        ElementOnWaterEnum,
    203         EpsVelEnum,
    204202        FillEnum,
    205203        FractionIncrementEnum,
    206204        FrictionEnum,
    207         GeothermalFluxEnum,
    208205        HydrostaticAdjustmentEnum,
    209206        InternalEnum,
     
    219216        SurfaceAverageVelMisfitEnum,
    220217        MaxPenetrationEnum,
    221         MeanVelEnum,
    222218        MeltingOffsetEnum,
    223219        GroundingLineMeltingRateEnum,
     
    242238        ShelfDampeningEnum,
    243239        StabilizeConstraintsEnum,
    244         StokesReconditioningEnum,
    245    SurfaceAccumulationRateEnum,
     240        SurfaceAccumulationRateEnum,
    246241        SurfaceAblationRateEnum,
    247242        SurfaceAreaEnum,
     
    304299        TimeEnum,
    305300        OutputFrequencyEnum,
    306         WaterColumnEnum,
    307301        WaterColumnOldEnum,
    308302        WaterColumnPicardEnum,
     
    339333        RhoWaterEnum,
    340334        GravityEnum,
    341         ThermalConductivityEnum,
    342335        BasalMeltingRateCorrectionEnum,
    343336        BasalMeltingRateCorrectionApplyEnum,
     
    371364        EpsRelEnum,
    372365        EpsResEnum,
    373         HeatCapacityEnum,
    374         IsHutterEnum,
    375         IsMacAyealPattynEnum,
    376         IsStokesEnum,
    377         KffEnum, //TO BE DELETED (not used anymore)
    378         LatentHeatEnum,
    379366        LowmemEnum,
    380         MaxIterEnum,
    381367        MaxNonlinearIterationsEnum,
    382         MeltingPointEnum,
    383368        MinMechanicalConstraintsEnum,
    384369        MinThermalConstraintsEnum,
    385         NStepsEnum,
    386370        NdtEnum,
    387371        NumOutputEnum,
     
    390374        NumberOfNodesEnum,
    391375        NumberOfVerticesEnum,
    392         OptScalEnum,
    393376        OutputFilePointerEnum,
    394         OutputFileNameEnum,
    395         ParameterOutputEnum,
    396377        PenaltyMeltingEnum,
    397378        QmuAnalysisEnum,
     
    412393        PetscRcEnum,
    413394        SparsityEnum,
    414         TolXEnum,
    415395        VariableDescriptorsEnum,
    416396        VerboseEnum,
    417         WaitOnLockEnum,
    418397        PetscOptionsStringsEnum,
    419398        PetscOptionsAnalysesEnum,
     
    442421        ArrheniusEnum,
    443422        /*}}}*/
     423        /*Temporary{{{1*/
     424        NumberOfElements2DEnum,
     425        NumControlTypeEnum,
     426        SpcvyEnum,
     427        HydroQEnum,
     428        VerboseBinaryEnum,
     429        NodeOnWaterEnum,
     430        YEnum,
     431        GlMeltingRateEnum,
     432        ElementsTypeEnum,
     433        PenaltiesEnum,
     434        PrognosticDGEnum,
     435        PressureloadEnum,
     436        HydroCREnum,
     437        NameEnum,
     438        VerticesTypeEnum,
     439        HydroKnEnum,
     440        GEnum,
     441        InputfilenameEnum,
     442        SpcvzEnum,
     443        list,
     444        NumberOfNodes2DEnum,
     445        NodeOnStokesEnum,
     446        NodeOnHutterEnum,
     447        ZEnum,
     448        GlMigrationEnum,
     449        RiftinfoEnum,
     450        ElementOnIceSheetEnum,
     451        SpcthicknessEnum,
     452        SpctemperatureEnum,
     453        PenaltyLockEnum,
     454        SpcvxEnum,
     455        UpperelementsEnum,
     456        HydroPEnum,
     457        NodeOnPattynEnum,
     458        EdgesEnum,
     459        Elements2DEnum,
     460        XEnum,
     461        NumCmResponsesEnum,
     462        NodeOnMacayealEnum,
     463        ElementconnectivityEnum,
     464        SpcwatercolumnEnum,
     465        ArtificialDiffusivityEnum,
     466        HydroNEnum,
     467        BorderstokesEnum,
     468        NumlayersEnum,
     469        DiagnosticRefEnum,
     470        IshutterEnum,
     471        IsmacayealpattynEnum,
     472        IsstokesEnum,
     473        StokesreconditioningEnum,
     474        LowerelementsEnum,
     475        HeatcapacityEnum,
     476        LatentheatEnum,
     477        ThermalconductivityEnum,
     478        MeltingpointEnum,
     479        ReferencetemperatureEnum,
     480        DhdtEnum,
     481        GeothermalfluxEnum,
     482        IsprognosticEnum,
     483        IsdiagnosticEnum,
     484        IsthermalEnum,
     485        NstepsEnum,
     486        MaxiterEnum,
     487        TolxEnum,
     488        OptscalEnum,
     489        EpsvelEnum,
     490        MeanvelEnum,
     491        ParameteroutputEnum,
     492        OutputfilenameEnum,
     493        WaterfractionEnum,
     494        WatercolumnEnum,
     495        WaitonlockEnum,
     496        NumberOfVariablesEnum,
     497        NumvariabledescriptorsEnum,
     498        NumberOfResponsesEnum,
     499        NumresponsedescriptorsEnum,
     500        NpartEnum,
     501        QmuMassFluxNumProfilesEnum,
     502        /*}}}*/
    444503        VxMeshEnum,
    445504        VyMeshEnum,
    446505        VzMeshEnum,
    447         IsDiagnosticEnum,
    448         IsPrognosticEnum,
    449         IsThermalEnum,
    450506        EnthalpySolutionEnum,
    451507        EnthalpyAnalysisEnum,
    452508        EnthalpyEnum,
    453509        EnthalpyPicardEnum,
    454         WaterFractionEnum,
    455         ReferenceTemperatureEnum,
    456510        ThicknessAbsGradientEnum,
    457511        VelAbsGradientEnum,
  • issm/trunk/src/c/EnumDefinitions/EnumToModelField.cpp

    r8517 r8926  
    1717                case RheologyBEnum : return "rheology_B";
    1818                case RheologyBbarEnum : return "rheology_B";
    19                 case DhDtEnum : return "dhdt";
     19                case DhdtEnum : return "dhdt";
    2020                case VxEnum : return "vx";
    2121                case VxObsEnum : return "vx_obs";
  • issm/trunk/src/c/io/Disk/IoModelFetchData.cpp

    r8913 r8926  
    1313#include "./diskio.h"
    1414
    15 /*FUNCTION IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle,char* data_name){{{1*/
    16 void  IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle,char* data_name){
     15/*FUNCTION IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle,int data_enum){{{1*/
     16void  IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle,int data_enum){
    1717
    1818        extern int my_rank;
     
    2626       
    2727        /*Set file pointer to beginning of the data: */
    28         fid=SetFilePointerToData(model_handle,data_name);
     28        fid=SetFilePointerToData(model_handle,data_enum);
    2929       
    3030        /*Now fetch: */
     
    6262}
    6363/*}}}*/
    64 /*FUNCTION IoModelFetchData(char** pstring,FILE* model_handle,char* data_name){{{1*/
    65 void  IoModelFetchData(char** pstring,FILE* model_handle,char* data_name){
     64/*FUNCTION IoModelFetchData(char** pstring,FILE* model_handle,int data_enum){{{1*/
     65void  IoModelFetchData(char** pstring,FILE* model_handle,int data_enum){
    6666
    6767        extern int my_rank;
     
    7474       
    7575        /*Set file pointer to beginning of the data: */
    76         fid=SetFilePointerToData(model_handle,data_name);
     76        fid=SetFilePointerToData(model_handle,data_enum);
    7777       
    7878        /*Now fetch: */
     
    106106}
    107107/*}}}*/
    108 /*FUNCTION IoModelFetchData(double* pscalar,FILE* model_handle,char* data_name){{{1*/
    109 void  IoModelFetchData(double* pscalar,FILE* model_handle,char* data_name){
     108/*FUNCTION IoModelFetchData(char*** pstrings,int* pnumstrings,FILE* model_handle,int data_enum){{{1*/
     109void  IoModelFetchData(char*** pstrings,int* pnumstrings,FILE* model_handle,int data_enum){
     110
     111        extern int my_rank;
     112        extern int num_procs;
     113        FILE* fid=NULL;
     114        int i;
     115
     116        /*output: */
     117        int   numstrings=0;
     118        char** strings=NULL;
     119       
     120        /*intermediary: */
     121        char* string=NULL;
     122        int   string_size;
     123       
     124        /*Set file pointer to beginning of the data: */
     125        fid=SetFilePointerToData(model_handle,data_enum);
     126       
     127        /*We have to read a bunch of strings from disk. First read the number of strings, and allocate: */
     128        if(my_rank==0){ 
     129                if(fread(&numstrings,sizeof(int),1,fid)!=1) _error_(" could not read length of string array");
     130        }
     131        MPI_Bcast(&numstrings,1,MPI_INT,0,MPI_COMM_WORLD);
     132
     133        /*Now allocate string array: */
     134        if(numstrings){
     135                strings=(char**)xmalloc(numstrings*sizeof(char*));
     136                for(i=0;i<numstrings;i++)strings[i]=NULL;
     137
     138                /*Go through strings, and read: */
     139                for(i=0;i<numstrings;i++){
     140                       
     141                        if(my_rank==0){ 
     142                                if(fread(&string_size,sizeof(int),1,fid)!=1) _error_(" could not read length of string ");
     143                        }
     144                        MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD);
     145                        if(string_size){
     146                                string=(char*)xmalloc((string_size+1)*sizeof(char));
     147                                string[string_size]='\0';
     148
     149                                /*Read string on node 0, then broadcast: */
     150                                if(my_rank==0){ 
     151                                        if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_("  could not read string ");
     152                                }
     153                                MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD);
     154                        }
     155                        else{
     156                                string=(char*)xmalloc(sizeof(char));
     157                                string[0]='\0';
     158                        }
     159
     160                        strings[i]=string;
     161                }
     162        }
     163
     164        /*Assign output pointers: */
     165        *pstrings=strings;
     166        *pnumstrings=numstrings;
     167}
     168/*}}}*/
     169/*FUNCTION IoModelFetchData(double* pscalar,FILE* model_handle,int data_enum){{{1*/
     170void  IoModelFetchData(double* pscalar,FILE* model_handle,int data_enum){
    110171
    111172
     
    118179       
    119180        /*Set file pointer to beginning of the data: */
    120         fid=SetFilePointerToData(model_handle,data_name);
     181        fid=SetFilePointerToData(model_handle,data_enum);
    121182       
    122183        /*We have to read a scalar from disk. First read the dimensions of the scalar, then the scalar: */
     
    131192}
    132193/*}}}*/
    133 /*FUNCTION IoModelFetchData(int* pinteger,FILE* model_handle,char* data_name){{{1*/
    134 void  IoModelFetchData(int* pinteger,FILE* model_handle,char* data_name){
     194/*FUNCTION IoModelFetchData(int* pinteger,FILE* model_handle,int data_enum){{{1*/
     195void  IoModelFetchData(int* pinteger,FILE* model_handle,int data_enum){
    135196
    136197        extern int my_rank;
     
    142203       
    143204        /*Set file pointer to beginning of the data: */
    144         fid=SetFilePointerToData(model_handle,data_name);
     205        fid=SetFilePointerToData(model_handle,data_enum);
    145206       
    146207        /*We have to read a integer from disk. First read the dimensions of the integer, then the integer: */
     
    156217}
    157218/*}}}*/
    158 /*FUNCTION SetFilePointerToData(FILE* model_handle,char* data_name){{{1*/
    159 FILE* SetFilePointerToData(FILE* model_handle,char* data_name){
    160 
    161         extern int my_rank;
    162         extern int num_procs;
    163        
    164         int string_size;
     219/*FUNCTION SetFilePointerToData(FILE* model_handle,int data_enum){{{1*/
     220FILE* SetFilePointerToData(FILE* model_handle,int data_enum){
     221
     222        extern int my_rank;
     223        extern int num_procs;
     224       
    165225        int record_length;
    166         char* string=NULL;
    167         char* repository=NULL;
    168226        FILE* fid=NULL;
    169227        int found=0;
     228        int record_enum;
    170229
    171230        /*Go find in the binary file, the position of the data we want to fetch: */
     
    176235                fseek(fid,0,SEEK_SET);
    177236
    178                 /*Now march through file looking for the correct name: */
     237                /*Now march through file looking for the correct data identifier: */
    179238                for(;;){
    180                         /*Read size of first string name: */
    181                         if(fread(&string_size,sizeof(int),1,fid)==0){
     239                        /*Read enum for this size of first string name: */
     240                        if(fread(&record_enum,sizeof(int),1,fid)==0){
    182241                                /*Ok, we have reached the end of the file. break: */
    183242                                found=0;
    184243                                break;
    185244                        }
    186                         /*Allocate string of correct size: */
    187                         string=(char*)xmalloc((string_size+1)*sizeof(char));
    188                         string[string_size]='\0';
    189 
    190                         /*Read string: */
    191                         if(fread(string,string_size*sizeof(char),1,fid)==0){
    192                                 /*Ok, we have reached the end of the file. break: */
    193                                 found=0;
    194                                 break;
    195                         }
    196                         /*Is this the correct string? : */
    197                         if (strcmp(string,data_name)==0){
     245                       
     246                        /*Is this the record sought for? : */
     247                        if (data_enum==record_enum){
    198248                                /*Ok, we have found the correct string. Pass the record length, and break: */
    199249                                fseek(fid,sizeof(int),SEEK_CUR);
     
    207257                                fseek(fid,record_length,SEEK_CUR);
    208258                        }
    209                         /*Erase string: */
    210                         xfree((void**)&string);
    211                 }
    212                 /*erase string, if we broke from the for() loop:*/
    213                 xfree((void**)&string);
     259                }
    214260        }
    215261        MPI_Bcast(&found,1,MPI_INT,0,MPI_COMM_WORLD);
    216262
    217         if(!found)_error_("%s %s ","could not find data with name",data_name);
     263        if(!found)_error_("%s %s ","could not find data with name",EnumToStringx(data_enum));
    218264
    219265        return fid;
  • issm/trunk/src/c/io/Disk/diskio.h

    r8913 r8926  
    1616void  pfclose(FILE* fid,char* filename);
    1717
    18 void  IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle,char* data_name);
    19 void  IoModelFetchData(char** pstring,FILE* model_handle,char* data_name);
    20 void  IoModelFetchData(double* pscalar,FILE* model_handle,char* data_name);
    21 void  IoModelFetchData(int* pinteger,FILE* model_handle,char* data_name);
    22 FILE* SetFilePointerToData(FILE* model_handle,char* data_name);
     18void  IoModelFetchData(double** pmatrix,int* pM,int* pN,FILE* model_handle,int data_enum);
     19void  IoModelFetchData(char** pstring,FILE* model_handle,int data_enum);
     20void  IoModelFetchData(double* pscalar,FILE* model_handle,int data_enum);
     21void  IoModelFetchData(int* pinteger,FILE* model_handle,int data_enum);
     22void  IoModelFetchData(char*** pstrings,int* pnumstrings,FILE* model_handle,int data_enum);
     23
     24FILE* SetFilePointerToData(FILE* model_handle,int data_enum);
    2325
    2426#endif  /* _IO_H_ */
  • issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp

    r8806 r8926  
    157157                case ControlTypeEnum : return "ControlType";
    158158                case ConvergedEnum : return "Converged";
    159                 case DhDtEnum : return "DhDt";
    160159                case DragCoefficientEnum : return "DragCoefficient";
    161160                case DragPEnum : return "DragP";
     
    169168                case ElementOnSurfaceEnum : return "ElementOnSurface";
    170169                case ElementOnWaterEnum : return "ElementOnWater";
    171                 case EpsVelEnum : return "EpsVel";
    172170                case FillEnum : return "Fill";
    173171                case FractionIncrementEnum : return "FractionIncrement";
    174172                case FrictionEnum : return "Friction";
    175                 case GeothermalFluxEnum : return "GeothermalFlux";
    176173                case HydrostaticAdjustmentEnum : return "HydrostaticAdjustment";
    177174                case InternalEnum : return "Internal";
     
    187184                case SurfaceAverageVelMisfitEnum : return "SurfaceAverageVelMisfit";
    188185                case MaxPenetrationEnum : return "MaxPenetration";
    189                 case MeanVelEnum : return "MeanVel";
    190186                case MeltingOffsetEnum : return "MeltingOffset";
    191187                case GroundingLineMeltingRateEnum : return "GroundingLineMeltingRate";
     
    210206                case ShelfDampeningEnum : return "ShelfDampening";
    211207                case StabilizeConstraintsEnum : return "StabilizeConstraints";
    212                 case StokesReconditioningEnum : return "StokesReconditioning";
    213208                case SurfaceAccumulationRateEnum : return "SurfaceAccumulationRate";
    214209                case SurfaceAblationRateEnum : return "SurfaceAblationRate";
     
    268263                case TimeEnum : return "Time";
    269264                case OutputFrequencyEnum : return "OutputFrequency";
    270                 case WaterColumnEnum : return "WaterColumn";
    271265                case WaterColumnOldEnum : return "WaterColumnOld";
    272266                case WaterColumnPicardEnum : return "WaterColumnPicard";
     
    293287                case RhoWaterEnum : return "RhoWater";
    294288                case GravityEnum : return "Gravity";
    295                 case ThermalConductivityEnum : return "ThermalConductivity";
    296289                case BasalMeltingRateCorrectionEnum : return "BasalMeltingRateCorrection";
    297290                case BasalMeltingRateCorrectionApplyEnum : return "BasalMeltingRateCorrectionApply";
     
    321314                case EpsRelEnum : return "EpsRel";
    322315                case EpsResEnum : return "EpsRes";
    323                 case HeatCapacityEnum : return "HeatCapacity";
    324                 case IsHutterEnum : return "IsHutter";
    325                 case IsMacAyealPattynEnum : return "IsMacAyealPattyn";
    326                 case IsStokesEnum : return "IsStokes";
    327                 case KffEnum : return "Kff";
    328                 case LatentHeatEnum : return "LatentHeat";
    329316                case LowmemEnum : return "Lowmem";
    330                 case MaxIterEnum : return "MaxIter";
    331317                case MaxNonlinearIterationsEnum : return "MaxNonlinearIterations";
    332                 case MeltingPointEnum : return "MeltingPoint";
    333318                case MinMechanicalConstraintsEnum : return "MinMechanicalConstraints";
    334319                case MinThermalConstraintsEnum : return "MinThermalConstraints";
    335                 case NStepsEnum : return "NSteps";
    336320                case NdtEnum : return "Ndt";
    337321                case NumOutputEnum : return "NumOutput";
     
    340324                case NumberOfNodesEnum : return "NumberOfNodes";
    341325                case NumberOfVerticesEnum : return "NumberOfVertices";
    342                 case OptScalEnum : return "OptScal";
    343326                case OutputFilePointerEnum : return "OutputFilePointer";
    344                 case OutputFileNameEnum : return "OutputFileName";
    345                 case ParameterOutputEnum : return "ParameterOutput";
    346327                case PenaltyMeltingEnum : return "PenaltyMelting";
    347328                case QmuAnalysisEnum : return "QmuAnalysis";
     
    362343                case PetscRcEnum : return "PetscRc";
    363344                case SparsityEnum : return "Sparsity";
    364                 case TolXEnum : return "TolX";
    365345                case VariableDescriptorsEnum : return "VariableDescriptors";
    366346                case VerboseEnum : return "Verbose";
    367                 case WaitOnLockEnum : return "WaitOnLock";
    368347                case PetscOptionsStringsEnum : return "PetscOptionsStrings";
    369348                case PetscOptionsAnalysesEnum : return "PetscOptionsAnalyses";
     
    385364                case PatersonEnum : return "Paterson";
    386365                case ArrheniusEnum : return "Arrhenius";
     366                case NumberOfElements2DEnum : return "NumberOfElements2D";
     367                case NumControlTypeEnum : return "NumControlType";
     368                case SpcvyEnum : return "Spcvy";
     369                case HydroQEnum : return "HydroQ";
     370                case VerboseBinaryEnum : return "VerboseBinary";
     371                case NodeOnWaterEnum : return "NodeOnWater";
     372                case YEnum : return "Y";
     373                case GlMeltingRateEnum : return "GlMeltingRate";
     374                case ElementsTypeEnum : return "ElementsType";
     375                case PenaltiesEnum : return "Penalties";
     376                case PrognosticDGEnum : return "PrognosticDG";
     377                case PressureloadEnum : return "Pressureload";
     378                case HydroCREnum : return "HydroCR";
     379                case NameEnum : return "Name";
     380                case VerticesTypeEnum : return "VerticesType";
     381                case HydroKnEnum : return "HydroKn";
     382                case GEnum : return "G";
     383                case InputfilenameEnum : return "Inputfilename";
     384                case SpcvzEnum : return "Spcvz";
     385                case NumberOfNodes2DEnum : return "NumberOfNodes2D";
     386                case NodeOnStokesEnum : return "NodeOnStokes";
     387                case NodeOnHutterEnum : return "NodeOnHutter";
     388                case ZEnum : return "Z";
     389                case GlMigrationEnum : return "GlMigration";
     390                case RiftinfoEnum : return "Riftinfo";
     391                case ElementOnIceSheetEnum : return "ElementOnIceSheet";
     392                case SpcthicknessEnum : return "Spcthickness";
     393                case SpctemperatureEnum : return "Spctemperature";
     394                case PenaltyLockEnum : return "PenaltyLock";
     395                case SpcvxEnum : return "Spcvx";
     396                case UpperelementsEnum : return "Upperelements";
     397                case HydroPEnum : return "HydroP";
     398                case NodeOnPattynEnum : return "NodeOnPattyn";
     399                case EdgesEnum : return "Edges";
     400                case Elements2DEnum : return "Elements2D";
     401                case XEnum : return "X";
     402                case NumCmResponsesEnum : return "NumCmResponses";
     403                case NodeOnMacayealEnum : return "NodeOnMacayeal";
     404                case ElementconnectivityEnum : return "Elementconnectivity";
     405                case SpcwatercolumnEnum : return "Spcwatercolumn";
     406                case ArtificialDiffusivityEnum : return "ArtificialDiffusivity";
     407                case HydroNEnum : return "HydroN";
     408                case BorderstokesEnum : return "Borderstokes";
     409                case NumlayersEnum : return "Numlayers";
     410                case DiagnosticRefEnum : return "DiagnosticRef";
     411                case IshutterEnum : return "Ishutter";
     412                case IsmacayealpattynEnum : return "Ismacayealpattyn";
     413                case IsstokesEnum : return "Isstokes";
     414                case StokesreconditioningEnum : return "Stokesreconditioning";
     415                case LowerelementsEnum : return "Lowerelements";
     416                case HeatcapacityEnum : return "Heatcapacity";
     417                case LatentheatEnum : return "Latentheat";
     418                case ThermalconductivityEnum : return "Thermalconductivity";
     419                case MeltingpointEnum : return "Meltingpoint";
     420                case ReferencetemperatureEnum : return "Referencetemperature";
     421                case DhdtEnum : return "Dhdt";
     422                case GeothermalfluxEnum : return "Geothermalflux";
     423                case IsprognosticEnum : return "Isprognostic";
     424                case IsdiagnosticEnum : return "Isdiagnostic";
     425                case IsthermalEnum : return "Isthermal";
     426                case NstepsEnum : return "Nsteps";
     427                case MaxiterEnum : return "Maxiter";
     428                case TolxEnum : return "Tolx";
     429                case OptscalEnum : return "Optscal";
     430                case EpsvelEnum : return "Epsvel";
     431                case MeanvelEnum : return "Meanvel";
     432                case ParameteroutputEnum : return "Parameteroutput";
     433                case OutputfilenameEnum : return "Outputfilename";
     434                case WaterfractionEnum : return "Waterfraction";
     435                case WatercolumnEnum : return "Watercolumn";
     436                case WaitonlockEnum : return "Waitonlock";
     437                case NumberOfVariablesEnum : return "NumberOfVariables";
     438                case NumvariabledescriptorsEnum : return "Numvariabledescriptors";
     439                case NumberOfResponsesEnum : return "NumberOfResponses";
     440                case NumresponsedescriptorsEnum : return "Numresponsedescriptors";
     441                case NpartEnum : return "Npart";
     442                case QmuMassFluxNumProfilesEnum : return "QmuMassFluxNumProfiles";
    387443                case VxMeshEnum : return "VxMesh";
    388444                case VyMeshEnum : return "VyMesh";
    389445                case VzMeshEnum : return "VzMesh";
    390                 case IsDiagnosticEnum : return "IsDiagnostic";
    391                 case IsPrognosticEnum : return "IsPrognostic";
    392                 case IsThermalEnum : return "IsThermal";
    393446                case EnthalpySolutionEnum : return "EnthalpySolution";
    394447                case EnthalpyAnalysisEnum : return "EnthalpyAnalysis";
    395448                case EnthalpyEnum : return "Enthalpy";
    396449                case EnthalpyPicardEnum : return "EnthalpyPicard";
    397                 case WaterFractionEnum : return "WaterFraction";
    398                 case ReferenceTemperatureEnum : return "ReferenceTemperature";
    399450                case ThicknessAbsGradientEnum : return "ThicknessAbsGradient";
    400451                case VelAbsGradientEnum : return "VelAbsGradient";
  • issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp

    r8330 r8926  
    3030
    3131                /*Fetch data: */
    32                 IoModelFetchData(&iomodel->spcthickness,NULL,NULL,iomodel_handle,"spcthickness");
     32                IoModelFetchData(&iomodel->spcthickness,NULL,NULL,iomodel_handle,SpcthicknessEnum);
    3333
    3434                /*Initialize counter*/
  • issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp

    r8330 r8926  
    3030
    3131                /*Get edges and elements*/
    32                 IoModelFetchData(&iomodel->edges,&iomodel->numberofedges,NULL,iomodel_handle,"edges");
    33                 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    34                 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness");
     32                IoModelFetchData(&iomodel->edges,&iomodel->numberofedges,NULL,iomodel_handle,EdgesEnum);
     33                IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     34                IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum);
    3535
    3636                /*First load data:*/
  • issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp

    r8330 r8926  
    3939
    4040        /*First fetch data: */
    41         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    42         IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    43         IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
    44         IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
    45         IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    46         IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    47         IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
     41        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     42        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum);
     43        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum);
     44        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum);
     45        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum);
     46        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum);
     47        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum);
    4848
    4949        if(continuous_galerkin){
  • issm/trunk/src/c/modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp

    r8399 r8926  
    2121
    2222        /*Fetch data needed: */
    23         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    24         IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness");
    25         IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
    26         IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
    27         IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,"elementoniceshelf");
    28         IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,"elementonwater");
    29         IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,"vx");
    30         IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,"vy");
    31         IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,"basal_melting_rate");
    32    IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,"surface_accumulation_rate");
    33         IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,"surface_ablation_rate");
    34         IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,"surface_mass_balance");
    35         IoModelFetchData(&iomodel->dhdt,NULL,NULL,iomodel_handle,"dhdt");
     23        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     24        IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum);
     25        IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum);
     26        IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum);
     27        IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum);
     28        IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum);
     29        IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum);
     30        IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum);
     31        IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,BasalMeltingRateEnum);
     32   IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,SurfaceAccumulationRateEnum);
     33        IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,SurfaceAblationRateEnum);
     34        IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,SurfaceMassBalanceEnum);
     35        IoModelFetchData(&iomodel->dhdt,NULL,NULL,iomodel_handle,DhdtEnum);
    3636        if (iomodel->dim==3){
    37                 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,"elementonbed");
    38                 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,"elementonsurface");
     37                IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum);
     38                IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum);
    3939        }
    4040
  • issm/trunk/src/c/modules/ModelProcessorx/Balancevelocities/CreateConstraintsBalancevelocities.cpp

    r8823 r8926  
    2828
    2929        /*Fetch data: */
    30         IoModelFetchData(&iomodel->spcvx,NULL,NULL,iomodel_handle,"spcvx");
    31         IoModelFetchData(&iomodel->spcvy,NULL,NULL,iomodel_handle,"spcvy");
     30        IoModelFetchData(&iomodel->spcvx,NULL,NULL,iomodel_handle,SpcvxEnum);
     31        IoModelFetchData(&iomodel->spcvy,NULL,NULL,iomodel_handle,SpcvyEnum);
    3232
    3333        count=1; //matlab indexing
  • issm/trunk/src/c/modules/ModelProcessorx/Balancevelocities/CreateNodesBalancevelocities.cpp

    r8330 r8926  
    3232
    3333        /*First fetch data: */
    34         IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    35         IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
    36         IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
    37         IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    38         IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    39         IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
     34        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum);
     35        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum);
     36        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum);
     37        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum);
     38        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum);
     39        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum);
    4040        for (i=0;i<iomodel->numberofvertices;i++){
    4141
  • issm/trunk/src/c/modules/ModelProcessorx/Balancevelocities/UpdateElementsBalancevelocities.cpp

    r8399 r8926  
    2121
    2222        /*Fetch data needed: */
    23         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    24         IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness");
    25         IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
    26         IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
    27         IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,"elementoniceshelf");
    28         IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,"elementonwater");
    29         IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,"vx");
    30         IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,"vy");
    31         IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,"basal_melting_rate");
    32         IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,"surface_accumulation_rate");
    33         IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,"surface_ablation_rate");
    34         IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,"surface_mass_balance");
     23        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     24        IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum);
     25        IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum);
     26        IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum);
     27        IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum);
     28        IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum);
     29        IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum);
     30        IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum);
     31        IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,BasalMeltingRateEnum);
     32        IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,SurfaceAccumulationRateEnum);
     33        IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,SurfaceAblationRateEnum);
     34        IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,SurfaceMassBalanceEnum);
    3535
    3636        if (iomodel->dim==3){
    37                 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,"elementonbed");
    38                 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,"elementonsurface");
     37                IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum);
     38                IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum);
    3939        }
    4040
  • issm/trunk/src/c/modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp

    r8330 r8926  
    3232       
    3333        /*First fetch data: */
    34         IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    35         IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
    36         IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
    37         IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    38         IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    39         IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
     34        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum);
     35        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum);
     36        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum);
     37        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum);
     38        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum);
     39        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum);
    4040
    4141        for (i=0;i<iomodel->numberofvertices;i++){
  • issm/trunk/src/c/modules/ModelProcessorx/BedSlope/UpdateElementsBedSlope.cpp

    r8330 r8926  
    2121
    2222        /*Fetch data needed: */
    23         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    24         IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
    25         IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
    26         IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,"elementonwater");
     23        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     24        IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum);
     25        IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum);
     26        IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum);
    2727
    2828        if (iomodel->dim==3){
    29                 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,"elementonbed");
    30                 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,"elementonsurface");
     29                IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum);
     30                IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum);
    3131        }
    3232
  • issm/trunk/src/c/modules/ModelProcessorx/Control/CreateParametersControl.cpp

    r8647 r8926  
    2828
    2929                /*What control type?*/
    30                 IoModelFetchData(&iomodel->control_type,NULL,NULL,iomodel_handle,"control_type");
     30                IoModelFetchData(&iomodel->control_type,NULL,NULL,iomodel_handle,ControlTypeEnum);
    3131                parameters->AddObject(new IntVecParam(ControlTypeEnum,iomodel->control_type,iomodel->num_control_type));
    3232                xfree((void**)&iomodel->control_type);
     
    3939                        parameters->AddObject(new BoolParam(ControlSteadyEnum,false));
    4040                }
    41                 parameters->AddObject(new IntParam(NStepsEnum,iomodel->nsteps));
    42                 parameters->AddObject(new DoubleParam(TolXEnum,iomodel->tolx));
     41                parameters->AddObject(new IntParam(NstepsEnum,iomodel->nsteps));
     42                parameters->AddObject(new DoubleParam(TolxEnum,iomodel->tolx));
    4343                parameters->AddObject(new DoubleParam(EpsCmEnum,iomodel->eps_cm));
    44                 parameters->AddObject(new DoubleParam(MeanVelEnum,iomodel->meanvel));
     44                parameters->AddObject(new DoubleParam(MeanvelEnum,iomodel->meanvel));
    4545
    4646                parameters->AddObject(new BoolParam(CmGradientEnum,iomodel->cm_gradient));
    4747
    4848                /*Now, recover fit, optscal and maxiter as vectors: */
    49                 IoModelFetchData(&iomodel->cm_responses,NULL,NULL,iomodel_handle,"cm_responses");
    50                 IoModelFetchData(&iomodel->cm_jump,NULL,NULL,iomodel_handle,"cm_jump");
    51                 IoModelFetchData(&iomodel->optscal,NULL,NULL,iomodel_handle,"optscal");
    52                 IoModelFetchData(&iomodel->maxiter,NULL,NULL,iomodel_handle,"maxiter");
     49                IoModelFetchData(&iomodel->cm_responses,NULL,NULL,iomodel_handle,CmResponsesEnum);
     50                IoModelFetchData(&iomodel->cm_jump,NULL,NULL,iomodel_handle,CmJumpEnum);
     51                IoModelFetchData(&iomodel->optscal,NULL,NULL,iomodel_handle,OptscalEnum);
     52                IoModelFetchData(&iomodel->maxiter,NULL,NULL,iomodel_handle,MaxiterEnum);
    5353
    54                 parameters->AddObject(new DoubleMatParam(OptScalEnum,iomodel->optscal,iomodel->nsteps,iomodel->num_control_type));
     54                parameters->AddObject(new DoubleMatParam(OptscalEnum,iomodel->optscal,iomodel->nsteps,iomodel->num_control_type));
    5555                parameters->AddObject(new DoubleMatParam(CmResponsesEnum,iomodel->cm_responses,iomodel->nsteps,iomodel->num_cm_responses));
    5656                parameters->AddObject(new DoubleVecParam(CmJumpEnum,iomodel->cm_jump,iomodel->nsteps));
    57                 parameters->AddObject(new DoubleVecParam(MaxIterEnum,iomodel->maxiter,iomodel->nsteps));
     57                parameters->AddObject(new DoubleVecParam(MaxiterEnum,iomodel->maxiter,iomodel->nsteps));
    5858
    5959                xfree((void**)&iomodel->cm_responses);
  • issm/trunk/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp

    r8635 r8926  
    2525
    2626        /*Fetch data needed: */
    27         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    28         IoModelFetchData(&iomodel->control_type,NULL,NULL,iomodel_handle,"control_type");
    29         IoModelFetchData(&iomodel->weights,NULL,NULL,iomodel_handle,"weights");
    30         IoModelFetchData(&iomodel->cm_min,NULL,NULL,iomodel_handle,"cm_min");
    31         IoModelFetchData(&iomodel->cm_max,NULL,NULL,iomodel_handle,"cm_max");
    32         IoModelFetchData(&iomodel->vx_obs,NULL,NULL,iomodel_handle,"vx_obs");
    33         IoModelFetchData(&iomodel->vy_obs,NULL,NULL,iomodel_handle,"vy_obs");
    34         IoModelFetchData(&iomodel->thickness_obs,NULL,NULL,iomodel_handle,"thickness_obs");
     27        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     28        IoModelFetchData(&iomodel->control_type,NULL,NULL,iomodel_handle,ControlTypeEnum);
     29        IoModelFetchData(&iomodel->weights,NULL,NULL,iomodel_handle,WeightsEnum);
     30        IoModelFetchData(&iomodel->cm_min,NULL,NULL,iomodel_handle,CmMinEnum);
     31        IoModelFetchData(&iomodel->cm_max,NULL,NULL,iomodel_handle,CmMaxEnum);
     32        IoModelFetchData(&iomodel->vx_obs,NULL,NULL,iomodel_handle,VxObsEnum);
     33        IoModelFetchData(&iomodel->vy_obs,NULL,NULL,iomodel_handle,VyObsEnum);
     34        IoModelFetchData(&iomodel->thickness_obs,NULL,NULL,iomodel_handle,ThicknessObsEnum);
    3535        for(i=0;i<iomodel->num_control_type;i++){
    3636                switch((int)iomodel->control_type[i]){
    37                         case DhDtEnum:
    38                                 IoModelFetchData(&iomodel->dhdt,NULL,NULL,iomodel_handle,"dhdt");
     37                        case DhdtEnum:
     38                                IoModelFetchData(&iomodel->dhdt,NULL,NULL,iomodel_handle,DhdtEnum);
    3939                                break;
    4040                        case VxEnum:
    41                                 IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,"vx");
     41                                IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum);
    4242                                break;
    4343                        case VyEnum:
    44                                 IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,"vy");
     44                                IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum);
    4545                                break;
    4646                        case DragCoefficientEnum:
    47                                 IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,"drag_coefficient");
     47                                IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,DragCoefficientEnum);
    4848                                break;
    4949                        case RheologyBbarEnum:
    50                                 IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,"rheology_B");
     50                                IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,RheologyBEnum);
    5151                                break;
    5252                        default:
  • issm/trunk/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp

    r8330 r8926  
    3535       
    3636        /*Fetch data needed: */
    37         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    38         IoModelFetchData(&iomodel->elementconnectivity,NULL,NULL,iomodel_handle,"elementconnectivity");
    39         IoModelFetchData(&iomodel->upperelements,NULL,NULL,iomodel_handle,"upperelements");
    40         IoModelFetchData(&iomodel->lowerelements,NULL,NULL,iomodel_handle,"lowerelements");
    41         IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,"rheology_B");
    42         IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,"rheology_n");
    43         IoModelFetchData(&iomodel->control_type,NULL,NULL,iomodel_handle,"control_type");
    44         IoModelFetchData(&iomodel->cm_min,NULL,NULL,iomodel_handle,"cm_min");
    45         IoModelFetchData(&iomodel->cm_max,NULL,NULL,iomodel_handle,"cm_max");
     37        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     38        IoModelFetchData(&iomodel->elementconnectivity,NULL,NULL,iomodel_handle,ElementconnectivityEnum);
     39        IoModelFetchData(&iomodel->upperelements,NULL,NULL,iomodel_handle,UpperelementsEnum);
     40        IoModelFetchData(&iomodel->lowerelements,NULL,NULL,iomodel_handle,LowerelementsEnum);
     41        IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,RheologyBEnum);
     42        IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,RheologyNEnum);
     43        IoModelFetchData(&iomodel->control_type,NULL,NULL,iomodel_handle,ControlTypeEnum);
     44        IoModelFetchData(&iomodel->cm_min,NULL,NULL,iomodel_handle,CmMinEnum);
     45        IoModelFetchData(&iomodel->cm_max,NULL,NULL,iomodel_handle,CmMaxEnum);
    4646       
    4747        /*Create elements and materials: */
     
    7474       
    7575        /*Create vertices: */
    76         IoModelFetchData(&iomodel->x,NULL,NULL,iomodel_handle,"x");
    77         IoModelFetchData(&iomodel->y,NULL,NULL,iomodel_handle,"y");
    78         IoModelFetchData(&iomodel->z,NULL,NULL,iomodel_handle,"z");
    79         IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
    80         IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness");
     76        IoModelFetchData(&iomodel->x,NULL,NULL,iomodel_handle,XEnum);
     77        IoModelFetchData(&iomodel->y,NULL,NULL,iomodel_handle,YEnum);
     78        IoModelFetchData(&iomodel->z,NULL,NULL,iomodel_handle,ZEnum);
     79        IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum);
     80        IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum);
    8181       
    8282        for (i=0;i<iomodel->numberofvertices;i++){
  • issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp

    r8799 r8926  
    1717       
    1818        Parameters* parameters = NULL;
     19
    1920        char**   parameteroutput=NULL;
    20         char*    descriptor=NULL;
    21         char*    tag=NULL;
    22         #ifdef _SERIAL_
    23         mxArray* pfield=NULL;
    24         mxArray* pfield2=NULL;
    25         #endif
    26         int dummy;
    27         int numpetscoptions;
    28 
    29         /*petsc options: */
    30         double*  analyses=NULL;
    31         char**   petscstrings=NULL;
    32 
     21        int      numparameters=0;
     22       
    3323        if(*pparameters)return; //do not create parameters twice!
    3424               
     
    4131
    4232        parameters->AddObject(new IntParam(DimEnum,iomodel->dim));
    43         parameters->AddObject(new BoolParam(IsHutterEnum,iomodel->ishutter));
    44         parameters->AddObject(new BoolParam(IsMacAyealPattynEnum,iomodel->ismacayealpattyn));
    45         parameters->AddObject(new BoolParam(IsStokesEnum,iomodel->isstokes));
     33        parameters->AddObject(new BoolParam(IshutterEnum,iomodel->ishutter));
     34        parameters->AddObject(new BoolParam(IsmacayealpattynEnum,iomodel->ismacayealpattyn));
     35        parameters->AddObject(new BoolParam(IsstokesEnum,iomodel->isstokes));
    4636        parameters->AddObject(new IntParam(OutputFrequencyEnum,iomodel->output_frequency));
    4737        parameters->AddObject(new DoubleParam(EpsResEnum,iomodel->eps_res));
     
    4939        parameters->AddObject(new DoubleParam(EpsAbsEnum,iomodel->eps_abs));
    5040        parameters->AddObject(new IntParam(MaxNonlinearIterationsEnum,(IssmInt)iomodel->max_nonlinear_iterations));
    51         parameters->AddObject(new DoubleParam(EpsVelEnum,iomodel->epsvel));
     41        parameters->AddObject(new DoubleParam(EpsvelEnum,iomodel->epsvel));
    5242        parameters->AddObject(new DoubleParam(YtsEnum,iomodel->yts));
    5343        parameters->AddObject(new DoubleParam(DtEnum,iomodel->dt*iomodel->yts));  //Ndt is in yeats in iomodel
     
    6151        parameters->AddObject(new IntParam(ConnectivityEnum,iomodel->connectivity));
    6252        parameters->AddObject(new DoubleParam(BetaEnum,iomodel->beta));
    63         parameters->AddObject(new DoubleParam(MeltingPointEnum,iomodel->meltingpoint));
    64         parameters->AddObject(new DoubleParam(ReferenceTemperatureEnum,iomodel->referencetemperature));
    65         parameters->AddObject(new DoubleParam(LatentHeatEnum,iomodel->latentheat));
    66         parameters->AddObject(new DoubleParam(HeatCapacityEnum,iomodel->heatcapacity));
     53        parameters->AddObject(new DoubleParam(MeltingpointEnum,iomodel->meltingpoint));
     54        parameters->AddObject(new DoubleParam(ReferencetemperatureEnum,iomodel->referencetemperature));
     55        parameters->AddObject(new DoubleParam(LatentheatEnum,iomodel->latentheat));
     56        parameters->AddObject(new DoubleParam(HeatcapacityEnum,iomodel->heatcapacity));
    6757        parameters->AddObject(new IntParam(ArtDiffEnum,iomodel->artdiff));
    6858        parameters->AddObject(new IntParam(BasalMeltingRateCorrectionApplyEnum,iomodel->basal_melting_rate_correction_apply));
     
    7262        parameters->AddObject(new IntParam(MinMechanicalConstraintsEnum,iomodel->min_mechanical_constraints));
    7363        parameters->AddObject(new IntParam(StabilizeConstraintsEnum,iomodel->stabilize_constraints));
    74         parameters->AddObject(new DoubleParam(StokesReconditioningEnum,iomodel->stokesreconditioning));
     64        parameters->AddObject(new DoubleParam(StokesreconditioningEnum,iomodel->stokesreconditioning));
    7565        parameters->AddObject(new IntParam(ShelfDampeningEnum,iomodel->shelf_dampening));
    7666        parameters->AddObject(new DoubleParam(ViscosityOvershootEnum,iomodel->viscosity_overshoot));
    77         parameters->AddObject(new BoolParam(WaitOnLockEnum,iomodel->waitonlock));
     67        parameters->AddObject(new BoolParam(WaitonlockEnum,iomodel->waitonlock));
    7868        parameters->AddObject(new IntParam(NumberOfElementsEnum,iomodel->numberofelements));
    7969        parameters->AddObject(new BoolParam(IoGatherEnum,iomodel->io_gather));
    8070        parameters->AddObject(new IntParam(GroundingLineMigrationEnum,iomodel->gl_migration));
    8171        parameters->AddObject(new IntParam(RheologyLawEnum,iomodel->rheology_law));
    82         parameters->AddObject(new BoolParam(IsDiagnosticEnum,iomodel->isdiagnostic));
    83         parameters->AddObject(new BoolParam(IsPrognosticEnum,iomodel->isprognostic));
    84         parameters->AddObject(new BoolParam(IsThermalEnum,iomodel->isthermal));
     72        parameters->AddObject(new BoolParam(IsdiagnosticEnum,iomodel->isdiagnostic));
     73        parameters->AddObject(new BoolParam(IsprognosticEnum,iomodel->isprognostic));
     74        parameters->AddObject(new BoolParam(IsthermalEnum,iomodel->isthermal));
    8575
    8676        /*Deal with more complex parameters*/
    87         IoModelFetchData(&iomodel->riftinfo,&iomodel->numrifts,NULL,iomodel_handle,"riftinfo");
     77        IoModelFetchData(&iomodel->riftinfo,&iomodel->numrifts,NULL,iomodel_handle,RiftinfoEnum);
    8878        parameters->AddObject(new IntParam(NumRiftsEnum,iomodel->numrifts));
    8979        xfree((void**)&iomodel->riftinfo);
    9080
    91         parameters->AddObject(new IntParam(NumOutputEnum,iomodel->numoutput));
    92         if(iomodel->numoutput){
    93                 parameteroutput=(char**)xmalloc(iomodel->numoutput*sizeof(char*));
    94 
    95                 tag=(char*)xmalloc((strlen("parameteroutput_i")+1)*sizeof(char));
    96                 for(i=0;i<iomodel->numoutput;i++){
    97                         sprintf(tag,"%s%i","parameteroutput_",i);
    98                         IoModelFetchData(&descriptor,iomodel_handle,tag);
    99                         parameteroutput[i]=descriptor;
    100                 }
    101 
    102                 /*Ok, we have all the parameter output  descriptors. Build a parameter with it: */
    103                 parameters->AddObject(new StringArrayParam(ParameterOutputEnum,parameteroutput,iomodel->numoutput));
    104         }
    105 
    106         /*Free data: {{{1*/
    107         xfree((void**)&tag);
    108         for(i=0;i<iomodel->numoutput;i++){
    109                 char* descriptor=parameteroutput[i];
    110                 xfree((void**)&descriptor);
    111         }
    112         xfree((void**)&parameteroutput);
    113         /*}}}*/
     81       
     82        /*Deal with parametr outputs: */
     83        IoModelFetchData(&parameteroutput,&numparameters,iomodel_handle,ParameteroutputEnum);
     84        if(numparameters) parameters->AddObject(new StringArrayParam(ParameteroutputEnum,parameteroutput,numparameters));
    11485
    11586        /*Before returning, create parameters in case we are running Qmu or control types runs: */
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp

    r8823 r8926  
    3232       
    3333        /*Spcs: fetch data: */
    34         IoModelFetchData(&iomodel->spcvx,NULL,NULL,iomodel_handle,"spcvx");
    35         IoModelFetchData(&iomodel->spcvy,NULL,NULL,iomodel_handle,"spcvy");
    36         IoModelFetchData(&iomodel->spcvz,NULL,NULL,iomodel_handle,"spcvz");
    37         IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,"nodeonhutter");
    38         IoModelFetchData(&iomodel->nodeonmacayeal,NULL,NULL,iomodel_handle,"nodeonmacayeal");
    39         if(iomodel->dim==3)IoModelFetchData(&iomodel->nodeonpattyn,NULL,NULL,iomodel_handle,"nodeonpattyn");
    40         if(iomodel->dim==3)IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,"nodeonstokes");
    41         IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    42         IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
    43         IoModelFetchData(&iomodel->z,NULL,NULL,iomodel_handle,"z");
     34        IoModelFetchData(&iomodel->spcvx,NULL,NULL,iomodel_handle,SpcvxEnum);
     35        IoModelFetchData(&iomodel->spcvy,NULL,NULL,iomodel_handle,SpcvyEnum);
     36        IoModelFetchData(&iomodel->spcvz,NULL,NULL,iomodel_handle,SpcvzEnum);
     37        IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,NodeOnHutterEnum);
     38        IoModelFetchData(&iomodel->nodeonmacayeal,NULL,NULL,iomodel_handle,NodeOnMacayealEnum);
     39        if(iomodel->dim==3)IoModelFetchData(&iomodel->nodeonpattyn,NULL,NULL,iomodel_handle,NodeOnPattynEnum);
     40        if(iomodel->dim==3)IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,NodeOnStokesEnum);
     41        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum);
     42        IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum);
     43        IoModelFetchData(&iomodel->z,NULL,NULL,iomodel_handle,ZEnum);
    4444
    4545        /*Initialize counter: */
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp

    r8823 r8926  
    3737        /*Create pressure loads as boundary conditions. Pay attention to the partitioning if we are running in parallel (the nodes
    3838         * referenced by a certain load must belong to the cluster node): */
    39         IoModelFetchData(&iomodel->pressureload,&iomodel->numberofpressureloads,NULL,iomodel_handle,"pressureload");
    40         IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,"elements_type");
    41         IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness");
    42         IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
     39        IoModelFetchData(&iomodel->pressureload,&iomodel->numberofpressureloads,NULL,iomodel_handle,PressureloadEnum);
     40        IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,ElementsTypeEnum);
     41        IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum);
     42        IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum);
    4343
    4444        /*Initialize counter: */
     
    103103
    104104        /*create penalties for nodes on the base of icesheet. We must have wb=ub*db/dx+vb*db/dy */
    105         IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    106         IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
    107         IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,"nodeonstokes");
    108         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    109         IoModelFetchData(&iomodel->spcvx,NULL,NULL,iomodel_handle,"spcvx");
    110         IoModelFetchData(&iomodel->spcvy,NULL,NULL,iomodel_handle,"spcvy");
    111         IoModelFetchData(&iomodel->spcvz,NULL,NULL,iomodel_handle,"spcvz");
    112         IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
     105        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum);
     106        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum);
     107        IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,NodeOnStokesEnum);
     108        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     109        IoModelFetchData(&iomodel->spcvx,NULL,NULL,iomodel_handle,SpcvxEnum);
     110        IoModelFetchData(&iomodel->spcvy,NULL,NULL,iomodel_handle,SpcvyEnum);
     111        IoModelFetchData(&iomodel->spcvz,NULL,NULL,iomodel_handle,SpcvzEnum);
     112        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum);
    113113        CreateSingleNodeToElementConnectivity(iomodel);
    114114       
     
    137137
    138138        /*Create Penpair for penalties: */
    139         IoModelFetchData(&iomodel->penalties,&iomodel->numpenalties,NULL,iomodel_handle,"penalties");
     139        IoModelFetchData(&iomodel->penalties,&iomodel->numpenalties,NULL,iomodel_handle,PenaltiesEnum);
    140140       
    141141        for(i=0;i<iomodel->numpenalties;i++){
     
    160160
    161161        /*Create Riffront loads for rifts: */
    162         IoModelFetchData(&iomodel->riftinfo,&iomodel->numrifts,NULL,iomodel_handle,"riftinfo");
    163         IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness");
    164         IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
    165         IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
    166         IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
     162        IoModelFetchData(&iomodel->riftinfo,&iomodel->numrifts,NULL,iomodel_handle,RiftinfoEnum);
     163        IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum);
     164        IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum);
     165        IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum);
     166        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum);
     167
    167168       
    168169        for(i=0;i<iomodel->numrifts;i++){
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp

    r8330 r8926  
    3535
    3636        /*Create nodes: */
    37         IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    38         IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
    39         IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,"nodeonhutter");
    40         IoModelFetchData(&iomodel->nodeonmacayeal,NULL,NULL,iomodel_handle,"nodeonmacayeal");
    41         IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,"nodeonstokes");
    42         IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
    43         IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    44         IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
    45         IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    46         IoModelFetchData(&iomodel->diagnostic_ref,NULL,NULL,iomodel_handle,"diagnostic_ref");
     37        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum);
     38        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum);
     39        IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,NodeOnHutterEnum);
     40        IoModelFetchData(&iomodel->nodeonmacayeal,NULL,NULL,iomodel_handle,NodeOnMacayealEnum);
     41        IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,NodeOnStokesEnum);
     42        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum);
     43        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum);
     44        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum);
     45        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum);
     46        IoModelFetchData(&iomodel->diagnostic_ref,NULL,NULL,iomodel_handle,DiagnosticRefEnum);
    4747       
    4848        for (i=0;i<iomodel->numberofvertices;i++){
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp

    r8399 r8926  
    2424
    2525        /*Fetch data needed: */
    26         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    27         IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,"elements_type");
    28         IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness");
    29         IoModelFetchData(&iomodel->thickness_coeff,NULL,NULL,iomodel_handle,"thickness_coeff");
    30         IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
    31         IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
    32         IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,"drag_coefficient");
    33         IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,"drag_p");
    34         IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,"drag_q");
    35         IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,"elementoniceshelf");
    36         IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,"elementonwater");
    37         IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,"rheology_B");
    38         IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,"rheology_n");
    39         IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,"vx");
    40         IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,"vy");
    41         if(iomodel->gl_migration!=NoneEnum) IoModelFetchData(&iomodel->bathymetry,NULL,NULL,iomodel_handle,"bathymetry");
     26        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     27        IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,ElementsTypeEnum);
     28        IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum);
     29        IoModelFetchData(&iomodel->thickness_coeff,NULL,NULL,iomodel_handle,ThicknessCoeffEnum);
     30        IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum);
     31        IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum);
     32        IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,DragCoefficientEnum);
     33        IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,DragPEnum);
     34        IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,DragQEnum);
     35        IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum);
     36        IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum);
     37        IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,RheologyBEnum);
     38        IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,RheologyNEnum);
     39        IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum);
     40        IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum);
     41        if(iomodel->gl_migration!=NoneEnum) IoModelFetchData(&iomodel->bathymetry,NULL,NULL,iomodel_handle,BathymetryEnum);
    4242
    4343        if (iomodel->dim==3){
    44                 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,"elementonbed");
    45                 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,"elementonsurface");
    46                 IoModelFetchData(&iomodel->vz,NULL,NULL,iomodel_handle,"vz");
    47                 IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,"surface_accumulation_rate");
    48                 IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,"surface_ablation_rate");
    49                 IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,"surface_mass_balance");
    50                 IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,"basal_melting_rate");
    51                 IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,"nodeonstokes");
     44                IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum);
     45                IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum);
     46                IoModelFetchData(&iomodel->vz,NULL,NULL,iomodel_handle,VzEnum);
     47                IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,SurfaceAccumulationRateEnum);
     48                IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,SurfaceAblationRateEnum);
     49                IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,SurfaceMassBalanceEnum);
     50                IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,BasalMeltingRateEnum);
     51                IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,NodeOnStokesEnum);
    5252        }
    5353        if(iomodel->control_analysis){
    54                 IoModelFetchData(&iomodel->vx_obs,NULL,NULL,iomodel_handle,"vx_obs");
    55                 IoModelFetchData(&iomodel->vy_obs,NULL,NULL,iomodel_handle,"vy_obs");
     54                IoModelFetchData(&iomodel->vx_obs,NULL,NULL,iomodel_handle,VxObsEnum);
     55                IoModelFetchData(&iomodel->vy_obs,NULL,NULL,iomodel_handle,VyObsEnum);
    5656        }
    5757
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp

    r8823 r8926  
    3131
    3232        /*Fetch data: */
    33         IoModelFetchData(&iomodel->spcvx,NULL,NULL,iomodel_handle,"spcvx");
    34         IoModelFetchData(&iomodel->spcvy,NULL,NULL,iomodel_handle,"spcvy");
    35         IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,"nodeonhutter");
     33        IoModelFetchData(&iomodel->spcvx,NULL,NULL,iomodel_handle,SpcvxEnum);
     34        IoModelFetchData(&iomodel->spcvy,NULL,NULL,iomodel_handle,SpcvyEnum);
     35        IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,NodeOnHutterEnum);
    3636
    3737        /*Initialize conunter*/
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp

    r8330 r8926  
    3535
    3636        /*First fetch data: */
    37         IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    38         IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
    39         IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,"nodeonhutter");
    40         IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
    41         IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    42         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    43         IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    44         IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
     37        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum);
     38        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum);
     39        IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,NodeOnHutterEnum);
     40        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum);
     41        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum);
     42        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     43        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum);
     44        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum);
    4545
    4646        CreateNumberNodeToElementConnectivity(iomodel);
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHutter/UpdateElementsDiagnosticHutter.cpp

    r8330 r8926  
    2424
    2525        /*Fetch data needed: */
    26         IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,"nodeonhutter");
    27         IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness");
    28         IoModelFetchData(&iomodel->thickness_coeff,NULL,NULL,iomodel_handle,"thickness_coeff");
    29         IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
    30         IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
    31         IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
    32         IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    33         IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,"drag_coefficient");
    34         IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,"rheology_B");
    35         IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,"rheology_n");
    36         IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,"elements_type");
    37         IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,"elementonbed");
    38         IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,"elementonsurface");
    39         IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,"elementonwater");
    40         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
     26        IoModelFetchData(&iomodel->nodeonhutter,NULL,NULL,iomodel_handle,NodeOnHutterEnum);
     27        IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum);
     28        IoModelFetchData(&iomodel->thickness_coeff,NULL,NULL,iomodel_handle,ThicknessCoeffEnum);
     29        IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum);
     30        IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum);
     31        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum);
     32        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum);
     33        IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,DragCoefficientEnum);
     34        IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,RheologyBEnum);
     35        IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,RheologyNEnum);
     36        IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,ElementsTypeEnum);
     37        IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum);
     38        IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum);
     39        IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum);
     40        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
    4141
    4242        /*Update elements: */
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp

    r8823 r8926  
    3030
    3131        /*Fetch data: */
    32         IoModelFetchData(&iomodel->spcvz,NULL,NULL,iomodel_handle,"spcvz");
    33         IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,"nodeonstokes");
     32        IoModelFetchData(&iomodel->spcvz,NULL,NULL,iomodel_handle,SpcvzEnum);
     33        IoModelFetchData(&iomodel->nodeonstokes,NULL,NULL,iomodel_handle,NodeOnStokesEnum);
    3434
    3535        /*Initialize counter*/
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp

    r8330 r8926  
    3535       
    3636        /*First fetch data: */
    37         IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    38         IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
    39         IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
    40         IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    41         IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    42         IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
     37        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum);
     38        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum);
     39        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum);
     40        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum);
     41        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum);
     42        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum);
    4343
    4444        for (i=0;i<iomodel->numberofvertices;i++){
  • issm/trunk/src/c/modules/ModelProcessorx/DiagnosticVert/UpdateElementsDiagnosticVert.cpp

    r8399 r8926  
    2424
    2525        /*Fetch data needed: */
    26         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    27         IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness");
    28         IoModelFetchData(&iomodel->thickness_coeff,NULL,NULL,iomodel_handle,"thickness_coeff");
    29         IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
    30         IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
    31         IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,"elementoniceshelf");
    32         IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,"elementonbed");
    33         IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,"elementonsurface");
    34         IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,"elementonwater");
    35         IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,"basal_melting_rate");
    36         IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,"surface_accumulation_rate");
    37         IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,"surface_ablation_rate");
    38         IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,"surface_mass_balance");
    39         IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,"vx");
    40         IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,"vy");
     26        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     27        IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum);
     28        IoModelFetchData(&iomodel->thickness_coeff,NULL,NULL,iomodel_handle,ThicknessCoeffEnum);
     29        IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum);
     30        IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum);
     31        IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum);
     32        IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum);
     33        IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum);
     34        IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum);
     35        IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,BasalMeltingRateEnum);
     36        IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,SurfaceAccumulationRateEnum);
     37        IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,SurfaceAblationRateEnum);
     38        IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,SurfaceMassBalanceEnum);
     39        IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum);
     40        IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum);
    4141
    4242        /*Update elements: */
  • issm/trunk/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp

    r8330 r8926  
    4646        if(iomodel->dim==2){
    4747                /*load elements: */
    48                 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
     48                IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
    4949        }
    5050        else{
    5151                /*load elements2d: */
    52                 IoModelFetchData(&iomodel->elements2d,NULL,NULL,iomodel_handle,"elements2d");
     52                IoModelFetchData(&iomodel->elements2d,NULL,NULL,iomodel_handle,Elements2DEnum);
    5353        }
    5454
     
    6565
    6666        /*Deal with rifts, they have to be included into one partition only, not several: */
    67         IoModelFetchData(&iomodel->riftinfo,&iomodel->numrifts,NULL,iomodel_handle,"riftinfo");
     67        IoModelFetchData(&iomodel->riftinfo,&iomodel->numrifts,NULL,iomodel_handle,RiftinfoEnum);
    6868
    6969        for(i=0;i<iomodel->numrifts;i++){
     
    8181
    8282        /*Start figuring out, out of the partition, which elements belong to this cpu: */
    83         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
     83        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
    8484        for (i=0;i<iomodel->numberofelements;i++){
    8585
     
    110110         * penpair has 2 nodes that are poointing toward 2 vertices.
    111111         * The 2 vertices must be in the same cpu as the penpair*/
    112         IoModelFetchData(&iomodel->penalties,&iomodel->numpenalties,NULL,iomodel_handle,"penalties");
     112        IoModelFetchData(&iomodel->penalties,&iomodel->numpenalties,NULL,iomodel_handle,PenaltiesEnum);
    113113        for(i=0;i<iomodel->numpenalties;i++){
    114114                if(my_vertices[(int)iomodel->penalties[2*i+0]-1] && !my_vertices[(int)iomodel->penalties[2*i+1]-1]){
  • issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/CreateConstraintsEnthalpy.cpp

    r8498 r8926  
    3131
    3232        /*Fetch data: */
    33         IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle,"spctemperature");
     33        IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle,SpctemperatureEnum);
    3434
    3535        /*Initialize counter*/
  • issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/CreateNodesEnthalpy.cpp

    r8483 r8926  
    3232
    3333        /*Create nodes and vertices: */
    34         IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    35         IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
    36         IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
    37         IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    38         IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    39         IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
     34        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum);
     35        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum);
     36        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum);
     37        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum);
     38        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum);
     39        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum);
    4040
    4141        for (i=0;i<iomodel->numberofvertices;i++){
  • issm/trunk/src/c/modules/ModelProcessorx/Enthalpy/UpdateElementsEnthalpy.cpp

    r8487 r8926  
    2424
    2525        /*Fetch data needed: */
    26         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    27         IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness");
    28         IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
    29         IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
    30         IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,"drag_coefficient");
    31         IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,"drag_p");
    32         IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,"drag_q");
    33         IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,"elementoniceshelf");
    34         IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,"elementonbed");
    35         IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,"elementonsurface");
    36         IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,"elementonwater");
    37         IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,"elements_type");
    38         IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,"rheology_B");
    39         IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,"rheology_n");
    40         IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle,"pressure");
    41         IoModelFetchData(&iomodel->temperature,NULL,NULL,iomodel_handle,"temperature");
    42         IoModelFetchData(&iomodel->waterfraction,NULL,NULL,iomodel_handle,"waterfraction");
    43         IoModelFetchData(&iomodel->geothermalflux,NULL,NULL,iomodel_handle,"geothermalflux");
    44         IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,"vx");
    45         IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,"vy");
    46         IoModelFetchData(&iomodel->vz,NULL,NULL,iomodel_handle,"vz");
     26        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     27        IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum);
     28        IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum);
     29        IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum);
     30        IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,DragCoefficientEnum);
     31        IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,DragPEnum);
     32        IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,DragQEnum);
     33        IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum);
     34        IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum);
     35        IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum);
     36        IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum);
     37        IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,ElementsTypeEnum);
     38        IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,RheologyBEnum);
     39        IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,RheologyNEnum);
     40        IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle,PressureEnum);
     41        IoModelFetchData(&iomodel->temperature,NULL,NULL,iomodel_handle,TemperatureEnum);
     42        IoModelFetchData(&iomodel->waterfraction,NULL,NULL,iomodel_handle,WaterfractionEnum);
     43        IoModelFetchData(&iomodel->geothermalflux,NULL,NULL,iomodel_handle,GeothermalfluxEnum);
     44        IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum);
     45        IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum);
     46        IoModelFetchData(&iomodel->vz,NULL,NULL,iomodel_handle,VzEnum);
    4747
    4848        /*Update elements: */
  • issm/trunk/src/c/modules/ModelProcessorx/Hydrology/CreateConstraintsHydrology.cpp

    r8330 r8926  
    2828
    2929        /*Fetch data: */
    30         IoModelFetchData(&iomodel->spcwatercolumn,NULL,NULL,iomodel_handle,"spcwatercolumn");
     30        IoModelFetchData(&iomodel->spcwatercolumn,NULL,NULL,iomodel_handle,SpcwatercolumnEnum);
    3131
    3232        /*Initialize counter*/
  • issm/trunk/src/c/modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp

    r8330 r8926  
    3232
    3333        /*Create nodes and vertices: */
    34         IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    35         IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
    36         IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
    37         IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    38         IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    39         IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
     34        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum);
     35        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum);
     36        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum);
     37        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum);
     38        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum);
     39        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum);
    4040
    4141        for (i=0;i<iomodel->numberofvertices;i++){
  • issm/trunk/src/c/modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp

    r8392 r8926  
    2121
    2222        /*Fetch data needed: */
    23         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    24         IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness");
    25         IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
    26         IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
    27         IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,"drag_coefficient");
    28         IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,"drag_p");
    29         IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,"drag_q");
    30         IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,"elementoniceshelf");
    31         IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,"elementonbed");
    32         IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,"elementonsurface");
    33         IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,"elementonwater");
    34         IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,"elements_type");
    35         IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,"rheology_B");
    36         IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,"rheology_n");
    37         IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle,"pressure");
    38         IoModelFetchData(&iomodel->temperature,NULL,NULL,iomodel_handle,"temperature");
    39         IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,"basal_melting_rate");
    40         IoModelFetchData(&iomodel->watercolumn,NULL,NULL,iomodel_handle,"watercolumn");
    41         IoModelFetchData(&iomodel->geothermalflux,NULL,NULL,iomodel_handle,"geothermalflux");
    42         IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,"vx");
    43         IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,"vy");
    44         IoModelFetchData(&iomodel->vz,NULL,NULL,iomodel_handle,"vz");
     23        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     24        IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum);
     25        IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum);
     26        IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum);
     27        IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,DragCoefficientEnum);
     28        IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,DragPEnum);
     29        IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,DragQEnum);
     30        IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum);
     31        IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum);
     32        IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum);
     33        IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum);
     34        IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,ElementsTypeEnum);
     35        IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,RheologyBEnum);
     36        IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,RheologyNEnum);
     37        IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle,PressureEnum);
     38        IoModelFetchData(&iomodel->temperature,NULL,NULL,iomodel_handle,TemperatureEnum);
     39        IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,BasalMeltingRateEnum);
     40        IoModelFetchData(&iomodel->watercolumn,NULL,NULL,iomodel_handle,WatercolumnEnum);
     41        IoModelFetchData(&iomodel->geothermalflux,NULL,NULL,iomodel_handle,GeothermalfluxEnum);
     42        IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum);
     43        IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum);
     44        IoModelFetchData(&iomodel->vz,NULL,NULL,iomodel_handle,VzEnum);
    4545
    4646        /*Update elements: */
  • issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp

    r8330 r8926  
    2929
    3030        //create penalties for nodes: no node can have a temperature over the melting point
    31         IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    32         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
     31        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum);
     32        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
    3333        CreateSingleNodeToElementConnectivity(iomodel);
    3434
  • issm/trunk/src/c/modules/ModelProcessorx/Melting/CreateNodesMelting.cpp

    r8330 r8926  
    3232
    3333        /*First fetch data: */
    34         IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    35         IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
    36         IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
    37         IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    38         IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    39         IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
     34        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum);
     35        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum);
     36        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum);
     37        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum);
     38        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum);
     39        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum);
    4040
    4141        for (i=0;i<iomodel->numberofvertices;i++){
  • issm/trunk/src/c/modules/ModelProcessorx/Melting/UpdateElementsMelting.cpp

    r8399 r8926  
    2424
    2525        /*Fetch data needed: */
    26         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    27         IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness");
    28         IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
    29         IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
    30         IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,"drag_coefficient");
    31         IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,"drag_p");
    32         IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,"drag_q");
    33         IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,"elementoniceshelf");
    34         IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,"elementonbed");
    35         IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,"elementonsurface");
    36         IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,"elementonwater");
    37         IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,"elements_type");
    38         IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,"rheology_B");
    39         IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,"rheology_n");
    40    IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,"surface_accumulation_rate");
    41         IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,"surface_ablation_rate");
    42         IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,"surface_mass_balance");
    43         IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,"basal_melting_rate");
    44         IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle,"pressure");
     26        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     27        IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum);
     28        IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum);
     29        IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum);
     30        IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,DragCoefficientEnum);
     31        IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,DragPEnum);
     32        IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,DragQEnum);
     33        IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum);
     34        IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum);
     35        IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum);
     36        IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum);
     37        IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,ElementsTypeEnum);
     38        IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,RheologyBEnum);
     39        IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,RheologyNEnum);
     40   IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,SurfaceAccumulationRateEnum);
     41        IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,SurfaceAblationRateEnum);
     42        IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,SurfaceMassBalanceEnum);
     43        IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,BasalMeltingRateEnum);
     44        IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle,PressureEnum);
    4545
    4646        /*Update elements: */
  • issm/trunk/src/c/modules/ModelProcessorx/NodesPartitioning.cpp

    r8330 r8926  
    9393
    9494        /*Get edges and elements*/
    95         IoModelFetchData(&iomodel->edges,&iomodel->numberofedges,&cols,iomodel_handle,"edges");
    96         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
     95        IoModelFetchData(&iomodel->edges,&iomodel->numberofedges,&cols,iomodel_handle,EdgesEnum);
     96        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
    9797        if (cols!=4) _error_("field edges should have 4 columns");
    9898
  • issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp

    r8330 r8926  
    3131
    3232                /*Fetch data: */
    33                 IoModelFetchData(&iomodel->spcthickness,NULL,NULL,iomodel_handle,"spcthickness");
     33                IoModelFetchData(&iomodel->spcthickness,NULL,NULL,iomodel_handle,SpcthicknessEnum);
    3434
    3535                /*Initialize counter*/
  • issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp

    r8330 r8926  
    3232
    3333                /*Get edges and elements*/
    34                 IoModelFetchData(&iomodel->edges,&iomodel->numberofedges,NULL,iomodel_handle,"edges");
    35                 IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    36                 IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness");
     34                IoModelFetchData(&iomodel->edges,&iomodel->numberofedges,NULL,iomodel_handle,EdgesEnum);
     35                IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     36                IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum);
    3737
    3838                /*First load data:*/
     
    5757
    5858        /*Create Penpair for penalties: */
    59         IoModelFetchData(&iomodel->penalties,&iomodel->numpenalties,NULL,iomodel_handle,"penalties");
    60         IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
     59        IoModelFetchData(&iomodel->penalties,&iomodel->numpenalties,NULL,iomodel_handle,PenaltiesEnum);
     60        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum);
    6161
    6262        for(i=0;i<iomodel->numpenalties;i++){
  • issm/trunk/src/c/modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp

    r8330 r8926  
    3939
    4040        /*First fetch data: */
    41         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    42         IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    43         IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
    44         IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
    45         IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    46         IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    47         IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
     41        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     42        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum);
     43        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum);
     44        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum);
     45        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum);
     46        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum);
     47        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum);
    4848
    4949        if(continuous_galerkin){
  • issm/trunk/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp

    r8399 r8926  
    2121
    2222        /*Fetch data needed: */
    23         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    24         IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness");
    25         IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
    26         IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
    27         IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,"elementoniceshelf");
    28         IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,"elementonwater");
    29    IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,"surface_accumulation_rate");
    30         IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,"surface_ablation_rate");
    31         IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,"surface_mass_balance");
    32         IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,"basal_melting_rate");
    33         if(iomodel->basal_melting_rate_correction_apply)IoModelFetchData(&iomodel->basal_melting_rate_correction,NULL,NULL,iomodel_handle,"basal_melting_rate_correction");
    34         IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,"vx");
    35         IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,"vy");
     23        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     24        IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum);
     25        IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum);
     26        IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum);
     27        IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum);
     28        IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum);
     29        IoModelFetchData(&iomodel->surface_accumulation_rate,NULL,NULL,iomodel_handle,SurfaceAccumulationRateEnum);
     30        IoModelFetchData(&iomodel->surface_ablation_rate,NULL,NULL,iomodel_handle,SurfaceAblationRateEnum);
     31        IoModelFetchData(&iomodel->surface_mass_balance,NULL,NULL,iomodel_handle,SurfaceMassBalanceEnum);
     32        IoModelFetchData(&iomodel->basal_melting_rate,NULL,NULL,iomodel_handle,BasalMeltingRateEnum);
     33        if(iomodel->basal_melting_rate_correction_apply)IoModelFetchData(&iomodel->basal_melting_rate_correction,NULL,NULL,iomodel_handle,BasalMeltingRateCorrectionEnum);
     34        IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum);
     35        IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum);
    3636
    3737        if (iomodel->dim==3){
    38                 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,"elementonbed");
    39                 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,"elementonsurface");
    40                 IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle,"pressure");
    41                 IoModelFetchData(&iomodel->temperature,NULL,NULL,iomodel_handle,"temperature");
     38                IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum);
     39                IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum);
     40                IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle,PressureEnum);
     41                IoModelFetchData(&iomodel->temperature,NULL,NULL,iomodel_handle,TemperatureEnum);
    4242        }
    4343
  • issm/trunk/src/c/modules/ModelProcessorx/Qmu/CreateParametersQmu.cpp

    r8330 r8926  
    7979                for(i=0;i<iomodel->numvariabledescriptors;i++){
    8080                        sprintf(tag,"%s%i","variabledescriptor",i+1);
    81                         IoModelFetchData(&descriptor,iomodel_handle,tag);
     81                        _error_("not yet");
     82                        //IoModelFetchData(&descriptor,iomodel_handle,tag);
    8283                        variabledescriptors[i]=descriptor;
    8384                }
     
    9394                for(i=0;i<iomodel->numresponsedescriptors;i++){
    9495                        sprintf(tag,"%s%i","responsedescriptor",i+1);
    95                         IoModelFetchData(&descriptor,iomodel_handle,tag);
     96                        _error_("not yet");
     97                        //IoModelFetchData(&descriptor,iomodel_handle,tag);
    9698                        responsedescriptors[i]=descriptor;
    9799                }
     
    105107                parameters->AddObject(new    IntParam(QmuNPartEnum,iomodel->qmu_npart));
    106108               
    107                 IoModelFetchData(&dpart,NULL,NULL,iomodel_handle,"part");
     109                //IoModelFetchData(&dpart,NULL,NULL,iomodel_handle,PartEnum);
     110                _error_("not yet");
    108111
    109112                if(!dpart){
     
    126129                               
    127130                                /*Recover data: */
    128                                 IoModelFetchData(&dakota_parameter,NULL,NULL,iomodel_handle,EnumToModelField(StringToEnumx(tag)));
     131                                //IoModelFetchData(&dakota_parameter,NULL,NULL,iomodel_handle,StringToEnumx(tag));
     132                                _error_("not yet");
    129133
    130134                                /*Convert units: */
     
    162166                        for(i=0;i<M;i++){
    163167                                sprintf(tag,"%s%i","qmu_mass_flux_segments",i+1); //names were created using Matlab indexing convention
    164                                 IoModelFetchData(&temp_matrix,&temp_m,&temp_n,iomodel_handle,tag);
     168                                //IoModelFetchData(&temp_matrix,&temp_m,&temp_n,iomodel_handle,tag);
     169                                _error_("not yet");
    165170
    166171                                /*This temp_matrix represents all the segments, for all elements. On this cpu, we only have a subset of these
  • issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp

    r8330 r8926  
    3232       
    3333        /*First fetch data: */
    34         IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    35         IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
    36         IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
    37         IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    38         IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    39         IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
     34        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum);
     35        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum);
     36        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum);
     37        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum);
     38        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum);
     39        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum);
    4040
    4141        for (i=0;i<iomodel->numberofvertices;i++){
  • issm/trunk/src/c/modules/ModelProcessorx/SurfaceSlope/UpdateElementsSurfaceSlope.cpp

    r8330 r8926  
    2121
    2222        /*Fetch data needed: */
    23         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    24         IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
    25         IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
    26         IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,"elementonwater");
     23        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     24        IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum);
     25        IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum);
     26        IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum);
    2727
    2828        if (iomodel->dim==3){
    29                 IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,"elementonbed");
    30                 IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,"elementonsurface");
     29                IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum);
     30                IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum);
    3131        }
    3232
  • issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateConstraintsThermal.cpp

    r8330 r8926  
    3131
    3232        /*Fetch data: */
    33         IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle,"spctemperature");
     33        IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle,SpctemperatureEnum);
    3434
    3535        /*Initialize counter*/
  • issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateLoadsThermal.cpp

    r8330 r8926  
    3030
    3131        //create penalties for nodes: no node can have a temperature over the melting point
    32         IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle,"spctemperature");
    33         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
     32        IoModelFetchData(&iomodel->spctemperature,NULL,NULL,iomodel_handle,SpctemperatureEnum);
     33        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
    3434        CreateSingleNodeToElementConnectivity(iomodel);
    3535
  • issm/trunk/src/c/modules/ModelProcessorx/Thermal/CreateNodesThermal.cpp

    r8330 r8926  
    3232
    3333        /*Create nodes and vertices: */
    34         IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,"nodeonbed");
    35         IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,"nodeonsurface");
    36         IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,"nodeonicesheet");
    37         IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,"nodeoniceshelf");
    38         IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,"vertices_type");
    39         IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,"nodeonwater");
     34        IoModelFetchData(&iomodel->nodeonbed,NULL,NULL,iomodel_handle,NodeOnBedEnum);
     35        IoModelFetchData(&iomodel->nodeonsurface,NULL,NULL,iomodel_handle,NodeOnSurfaceEnum);
     36        IoModelFetchData(&iomodel->nodeonicesheet,NULL,NULL,iomodel_handle,NodeOnIceSheetEnum);
     37        IoModelFetchData(&iomodel->nodeoniceshelf,NULL,NULL,iomodel_handle,NodeOnIceShelfEnum);
     38        IoModelFetchData(&iomodel->vertices_type,NULL,NULL,iomodel_handle,VerticesTypeEnum);
     39        IoModelFetchData(&iomodel->nodeonwater,NULL,NULL,iomodel_handle,NodeOnWaterEnum);
    4040
    4141        for (i=0;i<iomodel->numberofvertices;i++){
  • issm/trunk/src/c/modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp

    r8330 r8926  
    2424
    2525        /*Fetch data needed: */
    26         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    27         IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,"thickness");
    28         IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,"surface");
    29         IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,"bed");
    30         IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,"drag_coefficient");
    31         IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,"drag_p");
    32         IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,"drag_q");
    33         IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,"elementoniceshelf");
    34         IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,"elementonbed");
    35         IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,"elementonsurface");
    36         IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,"elementonwater");
    37         IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,"elements_type");
    38         IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,"rheology_B");
    39         IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,"rheology_n");
    40         IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle,"pressure");
    41         IoModelFetchData(&iomodel->temperature,NULL,NULL,iomodel_handle,"temperature");
    42         IoModelFetchData(&iomodel->geothermalflux,NULL,NULL,iomodel_handle,"geothermalflux");
    43         IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,"vx");
    44         IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,"vy");
    45         IoModelFetchData(&iomodel->vz,NULL,NULL,iomodel_handle,"vz");
     26        IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,ElementsEnum);
     27        IoModelFetchData(&iomodel->thickness,NULL,NULL,iomodel_handle,ThicknessEnum);
     28        IoModelFetchData(&iomodel->surface,NULL,NULL,iomodel_handle,SurfaceEnum);
     29        IoModelFetchData(&iomodel->bed,NULL,NULL,iomodel_handle,BedEnum);
     30        IoModelFetchData(&iomodel->drag_coefficient,NULL,NULL,iomodel_handle,DragCoefficientEnum);
     31        IoModelFetchData(&iomodel->drag_p,NULL,NULL,iomodel_handle,DragPEnum);
     32        IoModelFetchData(&iomodel->drag_q,NULL,NULL,iomodel_handle,DragQEnum);
     33        IoModelFetchData(&iomodel->elementoniceshelf,NULL,NULL,iomodel_handle,ElementOnIceShelfEnum);
     34        IoModelFetchData(&iomodel->elementonbed,NULL,NULL,iomodel_handle,ElementOnBedEnum);
     35        IoModelFetchData(&iomodel->elementonsurface,NULL,NULL,iomodel_handle,ElementOnSurfaceEnum);
     36        IoModelFetchData(&iomodel->elementonwater,NULL,NULL,iomodel_handle,ElementOnWaterEnum);
     37        IoModelFetchData(&iomodel->elements_type,NULL,NULL,iomodel_handle,ElementsTypeEnum);
     38        IoModelFetchData(&iomodel->rheology_B,NULL,NULL,iomodel_handle,RheologyBEnum);
     39        IoModelFetchData(&iomodel->rheology_n,NULL,NULL,iomodel_handle,RheologyNEnum);
     40        IoModelFetchData(&iomodel->pressure,NULL,NULL,iomodel_handle,PressureEnum);
     41        IoModelFetchData(&iomodel->temperature,NULL,NULL,iomodel_handle,TemperatureEnum);
     42        IoModelFetchData(&iomodel->geothermalflux,NULL,NULL,iomodel_handle,GeothermalfluxEnum);
     43        IoModelFetchData(&iomodel->vx,NULL,NULL,iomodel_handle,VxEnum);
     44        IoModelFetchData(&iomodel->vy,NULL,NULL,iomodel_handle,VyEnum);
     45        IoModelFetchData(&iomodel->vz,NULL,NULL,iomodel_handle,VzEnum);
    4646
    4747        /*Update elements: */
  • issm/trunk/src/c/modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp

    r8548 r8926  
    1515void    UpdateElementsTransient(Elements* elements, Parameters* parameters,IoModel* iomodel,FILE* iomodel_handle,int analysis_counter,int analysis_type){
    1616
    17         /*Intermediary*/
    18         int      i,j,k;
    19         int      counter;
    20         Element *element = NULL;
    21         char     fetchstring[100];
    22         double   time;
    23         double   forcingenum;
     17        /*nothing for now: */
    2418
    25         /*if no forcings, bail out: */
    26         if(!iomodel->numforcings)return;
    27 
    28         /*download whatever data will persist through forcing loop: */
    29         IoModelFetchData(&iomodel->elements,NULL,NULL,iomodel_handle,"elements");
    30        
    31         /*download forcing types: */
    32         IoModelFetchData(&iomodel->forcingtypes,NULL,NULL,iomodel_handle,"forcingtypes");
    33 
    34         /*loop over forcings: */
    35         for(i=0;i<iomodel->numforcings;i++){
    36 
    37                 forcingenum=iomodel->forcingtypes[i];
    38                
    39                 sprintf(&fetchstring[0],"forcing_%s_num_time_steps",EnumToStringx(forcingenum));
    40                 IoModelFetchData(&iomodel->forcing_numtimesteps,iomodel_handle,fetchstring);
    41                 sprintf(&fetchstring[0],"forcing_%s_time_steps",EnumToStringx(forcingenum));
    42                 IoModelFetchData(&iomodel->timesteps,NULL,NULL,iomodel_handle,fetchstring);
    43 
    44                 for(j=0;j<iomodel->forcing_numtimesteps;j++){
    45                
    46                         time=iomodel->timesteps[j]*iomodel->yts;
    47                         sprintf(&fetchstring[0],"forcing_%s_%i",EnumToStringx(forcingenum),j+1);
    48                         IoModelFetchData(&iomodel->forcing,NULL,NULL,iomodel_handle,fetchstring);
    49 
    50                         /*we now have the forcing for the corresponding time step, for all the nodes. Use this
    51                          *to write over the existing smb input: */
    52                         counter=0;
    53                         for (k=0;k<iomodel->numberofelements;k++){
    54                                 if(iomodel->my_elements[k]){
    55                                         element=(Element*)elements->GetObjectByOffset(counter);
    56                                         element->UpdateForcing(k,iomodel,j,time,forcingenum,parameters);
    57                                         counter++;
    58                                 }
    59                         }
    60                         /*Free ressources:*/
    61                         xfree((void**)&iomodel->forcing);
    62                 }
    63 
    64                 /*Free ressources:*/
    65                 xfree((void**)&iomodel->timesteps);
    66         }
    67 
    68         /*Free ressources:*/
    69         xfree((void**)&iomodel->forcing);
    70         xfree((void**)&iomodel->timesteps);
    71         xfree((void**)&iomodel->elements);
    72         xfree((void**)&iomodel->forcingtypes);
    7319}
  • issm/trunk/src/c/modules/OutputResultsx/OutputResultsx.cpp

    r8263 r8926  
    5353               
    5454                /*We don't have a file pointer. Retrieve the output file name and open it for writing:*/
    55                 parameters->FindParam(&outputfilename,OutputFileNameEnum);
     55                parameters->FindParam(&outputfilename,OutputfilenameEnum);
    5656
    5757                /*What strategy? : */
  • issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp

    r8806 r8926  
    155155        else if (strcmp(name,"ControlType")==0) return ControlTypeEnum;
    156156        else if (strcmp(name,"Converged")==0) return ConvergedEnum;
    157         else if (strcmp(name,"DhDt")==0) return DhDtEnum;
    158157        else if (strcmp(name,"DragCoefficient")==0) return DragCoefficientEnum;
    159158        else if (strcmp(name,"DragP")==0) return DragPEnum;
     
    167166        else if (strcmp(name,"ElementOnSurface")==0) return ElementOnSurfaceEnum;
    168167        else if (strcmp(name,"ElementOnWater")==0) return ElementOnWaterEnum;
    169         else if (strcmp(name,"EpsVel")==0) return EpsVelEnum;
    170168        else if (strcmp(name,"Fill")==0) return FillEnum;
    171169        else if (strcmp(name,"FractionIncrement")==0) return FractionIncrementEnum;
    172170        else if (strcmp(name,"Friction")==0) return FrictionEnum;
    173         else if (strcmp(name,"GeothermalFlux")==0) return GeothermalFluxEnum;
    174171        else if (strcmp(name,"HydrostaticAdjustment")==0) return HydrostaticAdjustmentEnum;
    175172        else if (strcmp(name,"Internal")==0) return InternalEnum;
     
    185182        else if (strcmp(name,"SurfaceAverageVelMisfit")==0) return SurfaceAverageVelMisfitEnum;
    186183        else if (strcmp(name,"MaxPenetration")==0) return MaxPenetrationEnum;
    187         else if (strcmp(name,"MeanVel")==0) return MeanVelEnum;
    188184        else if (strcmp(name,"MeltingOffset")==0) return MeltingOffsetEnum;
    189185        else if (strcmp(name,"GroundingLineMeltingRate")==0) return GroundingLineMeltingRateEnum;
     
    208204        else if (strcmp(name,"ShelfDampening")==0) return ShelfDampeningEnum;
    209205        else if (strcmp(name,"StabilizeConstraints")==0) return StabilizeConstraintsEnum;
    210         else if (strcmp(name,"StokesReconditioning")==0) return StokesReconditioningEnum;
    211206        else if (strcmp(name,"SurfaceAccumulationRate")==0) return SurfaceAccumulationRateEnum;
    212207        else if (strcmp(name,"SurfaceAblationRate")==0) return SurfaceAblationRateEnum;
     
    266261        else if (strcmp(name,"Time")==0) return TimeEnum;
    267262        else if (strcmp(name,"OutputFrequency")==0) return OutputFrequencyEnum;
    268         else if (strcmp(name,"WaterColumn")==0) return WaterColumnEnum;
    269263        else if (strcmp(name,"WaterColumnOld")==0) return WaterColumnOldEnum;
    270264        else if (strcmp(name,"WaterColumnPicard")==0) return WaterColumnPicardEnum;
     
    291285        else if (strcmp(name,"RhoWater")==0) return RhoWaterEnum;
    292286        else if (strcmp(name,"Gravity")==0) return GravityEnum;
    293         else if (strcmp(name,"ThermalConductivity")==0) return ThermalConductivityEnum;
    294287        else if (strcmp(name,"BasalMeltingRateCorrection")==0) return BasalMeltingRateCorrectionEnum;
    295288        else if (strcmp(name,"BasalMeltingRateCorrectionApply")==0) return BasalMeltingRateCorrectionApplyEnum;
     
    319312        else if (strcmp(name,"EpsRel")==0) return EpsRelEnum;
    320313        else if (strcmp(name,"EpsRes")==0) return EpsResEnum;
    321         else if (strcmp(name,"HeatCapacity")==0) return HeatCapacityEnum;
    322         else if (strcmp(name,"IsHutter")==0) return IsHutterEnum;
    323         else if (strcmp(name,"IsMacAyealPattyn")==0) return IsMacAyealPattynEnum;
    324         else if (strcmp(name,"IsStokes")==0) return IsStokesEnum;
    325         else if (strcmp(name,"Kff")==0) return KffEnum;
    326         else if (strcmp(name,"LatentHeat")==0) return LatentHeatEnum;
    327314        else if (strcmp(name,"Lowmem")==0) return LowmemEnum;
    328         else if (strcmp(name,"MaxIter")==0) return MaxIterEnum;
    329315        else if (strcmp(name,"MaxNonlinearIterations")==0) return MaxNonlinearIterationsEnum;
    330         else if (strcmp(name,"MeltingPoint")==0) return MeltingPointEnum;
    331316        else if (strcmp(name,"MinMechanicalConstraints")==0) return MinMechanicalConstraintsEnum;
    332317        else if (strcmp(name,"MinThermalConstraints")==0) return MinThermalConstraintsEnum;
    333         else if (strcmp(name,"NSteps")==0) return NStepsEnum;
    334318        else if (strcmp(name,"Ndt")==0) return NdtEnum;
    335319        else if (strcmp(name,"NumOutput")==0) return NumOutputEnum;
     
    338322        else if (strcmp(name,"NumberOfNodes")==0) return NumberOfNodesEnum;
    339323        else if (strcmp(name,"NumberOfVertices")==0) return NumberOfVerticesEnum;
    340         else if (strcmp(name,"OptScal")==0) return OptScalEnum;
    341324        else if (strcmp(name,"OutputFilePointer")==0) return OutputFilePointerEnum;
    342         else if (strcmp(name,"OutputFileName")==0) return OutputFileNameEnum;
    343         else if (strcmp(name,"ParameterOutput")==0) return ParameterOutputEnum;
    344325        else if (strcmp(name,"PenaltyMelting")==0) return PenaltyMeltingEnum;
    345326        else if (strcmp(name,"QmuAnalysis")==0) return QmuAnalysisEnum;
     
    360341        else if (strcmp(name,"PetscRc")==0) return PetscRcEnum;
    361342        else if (strcmp(name,"Sparsity")==0) return SparsityEnum;
    362         else if (strcmp(name,"TolX")==0) return TolXEnum;
    363343        else if (strcmp(name,"VariableDescriptors")==0) return VariableDescriptorsEnum;
    364344        else if (strcmp(name,"Verbose")==0) return VerboseEnum;
    365         else if (strcmp(name,"WaitOnLock")==0) return WaitOnLockEnum;
    366345        else if (strcmp(name,"PetscOptionsStrings")==0) return PetscOptionsStringsEnum;
    367346        else if (strcmp(name,"PetscOptionsAnalyses")==0) return PetscOptionsAnalysesEnum;
     
    383362        else if (strcmp(name,"Paterson")==0) return PatersonEnum;
    384363        else if (strcmp(name,"Arrhenius")==0) return ArrheniusEnum;
     364        else if (strcmp(name,"NumberOfElements2D")==0) return NumberOfElements2DEnum;
     365        else if (strcmp(name,"NumControlType")==0) return NumControlTypeEnum;
     366        else if (strcmp(name,"Spcvy")==0) return SpcvyEnum;
     367        else if (strcmp(name,"HydroQ")==0) return HydroQEnum;
     368        else if (strcmp(name,"VerboseBinary")==0) return VerboseBinaryEnum;
     369        else if (strcmp(name,"NodeOnWater")==0) return NodeOnWaterEnum;
     370        else if (strcmp(name,"Y")==0) return YEnum;
     371        else if (strcmp(name,"GlMeltingRate")==0) return GlMeltingRateEnum;
     372        else if (strcmp(name,"ElementsType")==0) return ElementsTypeEnum;
     373        else if (strcmp(name,"Penalties")==0) return PenaltiesEnum;
     374        else if (strcmp(name,"PrognosticDG")==0) return PrognosticDGEnum;
     375        else if (strcmp(name,"Pressureload")==0) return PressureloadEnum;
     376        else if (strcmp(name,"HydroCR")==0) return HydroCREnum;
     377        else if (strcmp(name,"Name")==0) return NameEnum;
     378        else if (strcmp(name,"VerticesType")==0) return VerticesTypeEnum;
     379        else if (strcmp(name,"HydroKn")==0) return HydroKnEnum;
     380        else if (strcmp(name,"G")==0) return GEnum;
     381        else if (strcmp(name,"Inputfilename")==0) return InputfilenameEnum;
     382        else if (strcmp(name,"Spcvz")==0) return SpcvzEnum;
     383        else if (strcmp(name,"NumberOfNodes2D")==0) return NumberOfNodes2DEnum;
     384        else if (strcmp(name,"NodeOnStokes")==0) return NodeOnStokesEnum;
     385        else if (strcmp(name,"NodeOnHutter")==0) return NodeOnHutterEnum;
     386        else if (strcmp(name,"Z")==0) return ZEnum;
     387        else if (strcmp(name,"GlMigration")==0) return GlMigrationEnum;
     388        else if (strcmp(name,"Riftinfo")==0) return RiftinfoEnum;
     389        else if (strcmp(name,"ElementOnIceSheet")==0) return ElementOnIceSheetEnum;
     390        else if (strcmp(name,"Spcthickness")==0) return SpcthicknessEnum;
     391        else if (strcmp(name,"Spctemperature")==0) return SpctemperatureEnum;
     392        else if (strcmp(name,"PenaltyLock")==0) return PenaltyLockEnum;
     393        else if (strcmp(name,"Spcvx")==0) return SpcvxEnum;
     394        else if (strcmp(name,"Upperelements")==0) return UpperelementsEnum;
     395        else if (strcmp(name,"HydroP")==0) return HydroPEnum;
     396        else if (strcmp(name,"NodeOnPattyn")==0) return NodeOnPattynEnum;
     397        else if (strcmp(name,"Edges")==0) return EdgesEnum;
     398        else if (strcmp(name,"Elements2D")==0) return Elements2DEnum;
     399        else if (strcmp(name,"X")==0) return XEnum;
     400        else if (strcmp(name,"NumCmResponses")==0) return NumCmResponsesEnum;
     401        else if (strcmp(name,"NodeOnMacayeal")==0) return NodeOnMacayealEnum;
     402        else if (strcmp(name,"Elementconnectivity")==0) return ElementconnectivityEnum;
     403        else if (strcmp(name,"Spcwatercolumn")==0) return SpcwatercolumnEnum;
     404        else if (strcmp(name,"ArtificialDiffusivity")==0) return ArtificialDiffusivityEnum;
     405        else if (strcmp(name,"HydroN")==0) return HydroNEnum;
     406        else if (strcmp(name,"Borderstokes")==0) return BorderstokesEnum;
     407        else if (strcmp(name,"Numlayers")==0) return NumlayersEnum;
     408        else if (strcmp(name,"DiagnosticRef")==0) return DiagnosticRefEnum;
     409        else if (strcmp(name,"Ishutter")==0) return IshutterEnum;
     410        else if (strcmp(name,"Ismacayealpattyn")==0) return IsmacayealpattynEnum;
     411        else if (strcmp(name,"Isstokes")==0) return IsstokesEnum;
     412        else if (strcmp(name,"Stokesreconditioning")==0) return StokesreconditioningEnum;
     413        else if (strcmp(name,"Lowerelements")==0) return LowerelementsEnum;
     414        else if (strcmp(name,"Heatcapacity")==0) return HeatcapacityEnum;
     415        else if (strcmp(name,"Latentheat")==0) return LatentheatEnum;
     416        else if (strcmp(name,"Thermalconductivity")==0) return ThermalconductivityEnum;
     417        else if (strcmp(name,"Meltingpoint")==0) return MeltingpointEnum;
     418        else if (strcmp(name,"Referencetemperature")==0) return ReferencetemperatureEnum;
     419        else if (strcmp(name,"Dhdt")==0) return DhdtEnum;
     420        else if (strcmp(name,"Geothermalflux")==0) return GeothermalfluxEnum;
     421        else if (strcmp(name,"Isprognostic")==0) return IsprognosticEnum;
     422        else if (strcmp(name,"Isdiagnostic")==0) return IsdiagnosticEnum;
     423        else if (strcmp(name,"Isthermal")==0) return IsthermalEnum;
     424        else if (strcmp(name,"Nsteps")==0) return NstepsEnum;
     425        else if (strcmp(name,"Maxiter")==0) return MaxiterEnum;
     426        else if (strcmp(name,"Tolx")==0) return TolxEnum;
     427        else if (strcmp(name,"Optscal")==0) return OptscalEnum;
     428        else if (strcmp(name,"Epsvel")==0) return EpsvelEnum;
     429        else if (strcmp(name,"Meanvel")==0) return MeanvelEnum;
     430        else if (strcmp(name,"Parameteroutput")==0) return ParameteroutputEnum;
     431        else if (strcmp(name,"Outputfilename")==0) return OutputfilenameEnum;
     432        else if (strcmp(name,"Waterfraction")==0) return WaterfractionEnum;
     433        else if (strcmp(name,"Watercolumn")==0) return WatercolumnEnum;
     434        else if (strcmp(name,"Waitonlock")==0) return WaitonlockEnum;
     435        else if (strcmp(name,"NumberOfVariables")==0) return NumberOfVariablesEnum;
     436        else if (strcmp(name,"Numvariabledescriptors")==0) return NumvariabledescriptorsEnum;
     437        else if (strcmp(name,"NumberOfResponses")==0) return NumberOfResponsesEnum;
     438        else if (strcmp(name,"Numresponsedescriptors")==0) return NumresponsedescriptorsEnum;
     439        else if (strcmp(name,"Npart")==0) return NpartEnum;
     440        else if (strcmp(name,"QmuMassFluxNumProfiles")==0) return QmuMassFluxNumProfilesEnum;
    385441        else if (strcmp(name,"VxMesh")==0) return VxMeshEnum;
    386442        else if (strcmp(name,"VyMesh")==0) return VyMeshEnum;
    387443        else if (strcmp(name,"VzMesh")==0) return VzMeshEnum;
    388         else if (strcmp(name,"IsDiagnostic")==0) return IsDiagnosticEnum;
    389         else if (strcmp(name,"IsPrognostic")==0) return IsPrognosticEnum;
    390         else if (strcmp(name,"IsThermal")==0) return IsThermalEnum;
    391444        else if (strcmp(name,"EnthalpySolution")==0) return EnthalpySolutionEnum;
    392445        else if (strcmp(name,"EnthalpyAnalysis")==0) return EnthalpyAnalysisEnum;
    393446        else if (strcmp(name,"Enthalpy")==0) return EnthalpyEnum;
    394447        else if (strcmp(name,"EnthalpyPicard")==0) return EnthalpyPicardEnum;
    395         else if (strcmp(name,"WaterFraction")==0) return WaterFractionEnum;
    396         else if (strcmp(name,"ReferenceTemperature")==0) return ReferenceTemperatureEnum;
    397448        else if (strcmp(name,"ThicknessAbsGradient")==0) return ThicknessAbsGradientEnum;
    398449        else if (strcmp(name,"VelAbsGradient")==0) return VelAbsGradientEnum;
  • issm/trunk/src/c/objects/Elements/Element.h

    r8800 r8926  
    5959                virtual void   DeleteResults(void)=0;
    6060                virtual void   Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type)=0;
    61                 virtual void   UpdateForcing(int index, IoModel* iomodel,int step,double time, int FieldEnum,Parameters* parameters)=0;
    6261                virtual void   InputToResult(int enum_type,int step,double time)=0;
    6362                virtual void   ControlInputGetGradient(Vec gradient,int enum_type)=0;
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r8800 r8926  
    374374
    375375        /*retrieve some parameters: */
    376         this->parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
     376        this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum);
    377377       
    378378        if(!IsOnBed()){
     
    917917        /* Get node coordinates and dof list: */
    918918        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    919         parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
     919        parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum);
    920920        Input* vx_input=inputs->GetInput(VxEnum);       _assert_(vx_input);
    921921        Input* vy_input=inputs->GetInput(VyEnum);       _assert_(vy_input);
     
    10081008        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    10091009        parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    1010         parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
     1010        parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum);
    10111011        Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
    10121012        Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
     
    15741574        /*Retrieve all inputs and parameters*/
    15751575        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    1576         parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
     1576        parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum);
    15771577        Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
    15781578        Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
     
    16431643        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    16441644        parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    1645         parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
     1645        parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum);
    16461646        Input* vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
    16471647        Input* vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
     
    18731873        this->parameters->FindParam(&dt,DtEnum);
    18741874        this->parameters->FindParam(&artdiff,ArtDiffEnum);
    1875         this->parameters->FindParam(&epsvel,EpsVelEnum);
     1875        this->parameters->FindParam(&epsvel,EpsvelEnum);
    18761876        Input* pressure_input=inputs->GetInput(PressureEnum);      _assert_(pressure_input);
    18771877        Input* enthalpy_input=inputs->GetInput(EnthalpyEnum);      _assert_(enthalpy_input);
     
    21622162        this->parameters->FindParam(&dt,DtEnum);
    21632163        this->parameters->FindParam(&artdiff,ArtDiffEnum);
    2164         this->parameters->FindParam(&epsvel,EpsVelEnum);
     2164        this->parameters->FindParam(&epsvel,EpsvelEnum);
    21652165        Input* vx_input=inputs->GetInput(VxEnum);      _assert_(vx_input);
    21662166        Input* vy_input=inputs->GetInput(VyEnum);      _assert_(vy_input);
     
    25332533        /*Retrieve all inputs and parameters*/
    25342534        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    2535         this->parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
     2535        this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum);
    25362536        Input* vx_input=inputs->GetInput(VxEnum);               _assert_(vx_input);
    25372537        Input* vy_input=inputs->GetInput(VyEnum);               _assert_(vy_input);
     
    25982598        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    25992599        parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    2600         this->parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
     2600        this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum);
    26012601        Input* vx_input=inputs->GetInput(VxEnum);               _assert_(vx_input);
    26022602        Input* vy_input=inputs->GetInput(VyEnum);               _assert_(vy_input);
     
    26782678        /*Retrieve all inputs and parameters*/
    26792679        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    2680         this->parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
     2680        this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum);
    26812681        Input* vx_input=inputs->GetInput(VxEnum);               _assert_(vx_input);
    26822682        Input* vy_input=inputs->GetInput(VyEnum);               _assert_(vy_input);
     
    27432743        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    27442744        parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    2745         this->parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
     2745        this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum);
    27462746        Input* vx_input=inputs->GetInput(VxEnum);               _assert_(vx_input);
    27472747        Input* vy_input=inputs->GetInput(VyEnum);               _assert_(vy_input);
     
    30493049
    30503050        /*Retrieve all inputs and parameters*/
    3051         this->parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
     3051        this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum);
    30523052        rho_ice=matpar->GetRhoIce();
    30533053        gravity=matpar->GetG();
     
    35063506        Input* vy_input=inputs->GetInput(VyEnum);                         _assert_(vy_input);
    35073507        Input* vz_input=inputs->GetInput(VzEnum);                         _assert_(vz_input);
    3508         Input* geothermalflux_input=inputs->GetInput(GeothermalFluxEnum); _assert_(geothermalflux_input);
     3508        Input* geothermalflux_input=inputs->GetInput(GeothermalfluxEnum); _assert_(geothermalflux_input);
    35093509
    35103510        /*Build frictoin element, needed later: */
     
    37753775        Input* vy_input=inputs->GetInput(VyEnum);                         _assert_(vy_input);
    37763776        Input* vz_input=inputs->GetInput(VzEnum);                         _assert_(vz_input);
    3777         Input* geothermalflux_input=inputs->GetInput(GeothermalFluxEnum); _assert_(geothermalflux_input);
     3777        Input* geothermalflux_input=inputs->GetInput(GeothermalfluxEnum); _assert_(geothermalflux_input);
    37783778
    37793779        /*Build frictoin element, needed later: */
     
    42474247
    42484248        /*Recondition pressure: */
    4249         this->parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
     4249        this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum);
    42504250
    42514251        /*Ok, we have vx vy vz and P in values, fill in vx vy vz P arrays: */
     
    51435143        if (iomodel->geothermalflux) {
    51445144                for(i=0;i<6;i++)nodeinputs[i]=iomodel->geothermalflux[penta_vertex_ids[i]-1];
    5145                 this->inputs->AddInput(new PentaVertexInput(GeothermalFluxEnum,nodeinputs));
     5145                this->inputs->AddInput(new PentaVertexInput(GeothermalfluxEnum,nodeinputs));
    51465146        }       
    51475147        if (iomodel->pressure) {
     
    51555155        if (iomodel->waterfraction) {
    51565156                for(i=0;i<6;i++)nodeinputs[i]=iomodel->waterfraction[penta_vertex_ids[i]-1];
    5157                 this->inputs->AddInput(new PentaVertexInput(WaterFractionEnum,nodeinputs));
     5157                this->inputs->AddInput(new PentaVertexInput(WaterfractionEnum,nodeinputs));
    51585158        }
    51595159        if (iomodel->dhdt) {
    51605160                for(i=0;i<6;i++)nodeinputs[i]=iomodel->dhdt[penta_vertex_ids[i]-1]/iomodel->yts;
    5161                 this->inputs->AddInput(new PentaVertexInput(DhDtEnum,nodeinputs));
     5161                this->inputs->AddInput(new PentaVertexInput(DhdtEnum,nodeinputs));
    51625162        }
    51635163        /*vx,vy and vz: */
     
    52015201                for(i=0;i<iomodel->num_control_type;i++){
    52025202                        switch((int)iomodel->control_type[i]){
    5203                                 case DhDtEnum:
     5203                                case DhdtEnum:
    52045204                                        if (iomodel->dhdt){
    52055205                                                for(j=0;j<6;j++)nodeinputs[j]=iomodel->dhdt[penta_vertex_ids[j]-1]/iomodel->yts;
    52065206                                                for(j=0;j<6;j++)cmmininputs[j]=iomodel->cm_min[(penta_vertex_ids[j]-1)*iomodel->num_control_type+i]/iomodel->yts;
    52075207                                                for(j=0;j<6;j++)cmmaxinputs[j]=iomodel->cm_max[(penta_vertex_ids[j]-1)*iomodel->num_control_type+i]/iomodel->yts;
    5208                                                 this->inputs->AddInput(new ControlInput(DhDtEnum,PentaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
     5208                                                this->inputs->AddInput(new ControlInput(DhdtEnum,PentaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
    52095209                                        }
    52105210                                        break;
     
    55955595        penta->GetDofList(&doflistm,MacAyealApproximationEnum,GsetEnum);
    55965596        GetDofList(&doflists,StokesApproximationEnum,GsetEnum);
    5597         this->parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
     5597        this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum);
    55985598
    55995599        /*Get node data: */
     
    57685768        GetDofList(&doflistp,PattynApproximationEnum,GsetEnum);
    57695769        GetDofList(&doflists,StokesApproximationEnum,GsetEnum);
    5770         this->parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
     5770        this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum);
    57715771
    57725772        /*Get node data: */
     
    60656065
    60666066        /*Recondition pressure and compute vel: */
    6067         this->parameters->FindParam(&stokesreconditioning,StokesReconditioningEnum);
     6067        this->parameters->FindParam(&stokesreconditioning,StokesreconditioningEnum);
    60686068        for(i=0;i<NUMVERTICES;i++) pressure[i]=pressure[i]*stokesreconditioning;
    60696069        for(i=0;i<NUMVERTICES;i++) vel[i]=pow( pow(vx[i],2.0) + pow(vy[i],2.0) + pow(vz[i],2.0) , 0.5);
     
    63566356                       
    63576357                this->inputs->AddInput(new PentaVertexInput(EnthalpyEnum,values));
    6358                 this->inputs->AddInput(new PentaVertexInput(WaterFractionEnum,waterfraction));
     6358                this->inputs->AddInput(new PentaVertexInput(WaterfractionEnum,waterfraction));
    63596359                this->inputs->AddInput(new PentaVertexInput(TemperatureEnum,temperatures));
    63606360
     
    65296529                                name==BasalMeltingRateEnum ||
    65306530                                name==SurfaceMassBalanceEnum ||
    6531                                 name==GeothermalFluxEnum ||
     6531                                name==GeothermalfluxEnum ||
    65326532                                name==SurfaceAreaEnum||
    65336533                                name==PressureEnum ||
     
    74717471}
    74727472/*}}}*/
    7473 /*FUNCTION Penta::UpdateForcing(int index,IoModel* iomodel,int step,double time, int FieldEnum){{{1*/
    7474 void Penta::UpdateForcing(int index,IoModel* iomodel,int step,double time, int FieldEnum,Parameters* parameters){
    7475 
    7476         /*Intermediaries*/
    7477         int i,j;
    7478         int penta_vertex_ids[6];
    7479         double  nodeinputs[6];
    7480 
    7481         /*Recover vertices ids needed to initialize inputs*/
    7482         for(i=0;i<6;i++) penta_vertex_ids[i]=(int)iomodel->elements[6*index+i]; //ids for vertices are in the elements array from Matlab
    7483 
    7484         /*recover forcing for this time step: */
    7485         for(i=0;i<6;i++)nodeinputs[i]=iomodel->forcing[penta_vertex_ids[i]-1];
    7486 
    7487         /*process units: */
    7488         UnitConversion(&nodeinputs[0],6,ExtToIuEnum, FieldEnum, parameters);
    7489 
    7490         if(step==0){
    7491 
    7492                 /*This is the first time we are trying to replace the smb tria vertex input by a smb triav vertex
    7493                  *forcing, which is essentially a tria vertex input that can vary with time. So first, if there is already
    7494                  *an input with enum FieldEnum, squash it: */
    7495                 TransientInput* transientinput = new TransientInput(FieldEnum);
    7496 
    7497                 PentaVertexInput* pentavertexinput = new PentaVertexInput(FieldEnum,&nodeinputs[0]);
    7498                 transientinput->AddTimeInput(pentavertexinput,time);
    7499                 this->inputs->AddInput(transientinput);
    7500 
    7501         }
    7502         else{
    7503 
    7504                 /*Ok, we can't write over the existing forcing that was created in previous step 0. Find the input, and add
    7505                  *values for this time step: */
    7506                 TransientInput* transientinput=(TransientInput*)inputs->GetInput(FieldEnum); _assert_(transientinput);
    7507 
    7508                 PentaVertexInput* pentavertexinput = new PentaVertexInput(FieldEnum,&nodeinputs[0]);
    7509                 transientinput->AddTimeInput(pentavertexinput,time);
    7510 
    7511         }
    7512 
    7513 }
    7514 /*}}}*/
    75157473/*FUNCTION Penta::UpdateShelfStatus{{{1*/
    75167474int Penta::UpdateShelfStatus(Vec new_shelf_nodes){
  • issm/trunk/src/c/objects/Elements/Penta.h

    r8800 r8926  
    135135                double SurfaceArea(void);
    136136                void   Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type);
    137                 void   UpdateForcing(int index, IoModel* iomodel,int step,double time, int FieldEnum,Parameters* parameters);
    138137                int    UpdateShelfStatus(Vec new_shelf_nodes);
    139138                void   UpdateShelfFlags(double* new_shelf_nodes);
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r8800 r8926  
    14071407        Input* surface_mass_balance_input=inputs->GetInput(SurfaceMassBalanceEnum); _assert_(surface_mass_balance_input);
    14081408        Input* basal_melting_input=inputs->GetInput(BasalMeltingRateEnum);           _assert_(basal_melting_input);
    1409         Input* dhdt_input=inputs->GetInput(DhDtEnum);                     _assert_(dhdt_input);
     1409        Input* dhdt_input=inputs->GetInput(DhdtEnum);                     _assert_(dhdt_input);
    14101410       
    14111411        /* Start  looping on the number of gaussian points: */
     
    14501450        Input* surface_mass_balance_input=inputs->GetInput(SurfaceMassBalanceEnum); _assert_(surface_mass_balance_input);
    14511451        Input* basal_melting_input=inputs->GetInput(BasalMeltingRateEnum);           _assert_(basal_melting_input);
    1452         Input* dhdt_input=inputs->GetInput(DhDtEnum);                     _assert_(dhdt_input);
     1452        Input* dhdt_input=inputs->GetInput(DhdtEnum);                     _assert_(dhdt_input);
    14531453
    14541454        /* Start  looping on the number of gaussian points: */
     
    16711671        this->parameters->FindParam(&num_responses,NumResponsesEnum);
    16721672        this->parameters->FindParam(&responses,NULL,NULL,StepResponsesEnum);
    1673         this->parameters->FindParam(&meanvel,MeanVelEnum);
    1674         this->parameters->FindParam(&epsvel,EpsVelEnum);
     1673        this->parameters->FindParam(&meanvel,MeanvelEnum);
     1674        this->parameters->FindParam(&epsvel,EpsvelEnum);
    16751675        Input* weights_input=inputs->GetInput(WeightsEnum);   _assert_(weights_input);
    16761676        Input* vx_input     =inputs->GetInput(VxEnum);        _assert_(vx_input);
     
    18471847        this->parameters->FindParam(&num_responses,NumResponsesEnum);
    18481848        this->parameters->FindParam(&responses,NULL,NULL,StepResponsesEnum);
    1849         this->parameters->FindParam(&meanvel,MeanVelEnum);
    1850         this->parameters->FindParam(&epsvel,EpsVelEnum);
     1849        this->parameters->FindParam(&meanvel,MeanvelEnum);
     1850        this->parameters->FindParam(&epsvel,EpsvelEnum);
    18511851        Input* weights_input = inputs->GetInput(WeightsEnum);   _assert_(weights_input);
    18521852        Input* vx_input      = inputs->GetInput(VxEnum);        _assert_(vx_input);
     
    27682768
    27692769        /*Get inputs*/
    2770         Input* watercolumn_input=inputs->GetInput(WaterColumnEnum); _assert_(watercolumn_input);
     2770        Input* watercolumn_input=inputs->GetInput(WatercolumnEnum); _assert_(watercolumn_input);
    27712771
    27722772        /*Ok, we have watercolumn values, fill in watercolumn array: */
     
    28512851        Input* bedslopex_input=inputs->GetInput(BedSlopeXEnum);         _assert_(bedslopex_input);
    28522852        Input* bedslopey_input=inputs->GetInput(BedSlopeYEnum);         _assert_(bedslopey_input);
    2853         Input* watercolumn_input=inputs->GetInput(WaterColumnEnum);     _assert_(watercolumn_input);
     2853        Input* watercolumn_input=inputs->GetInput(WatercolumnEnum);     _assert_(watercolumn_input);
    28542854
    28552855        /*recover slopes: */
     
    28882888                        GradjBMacAyeal(gradient);
    28892889                        break;
    2890                 case DhDtEnum:
     2890                case DhdtEnum:
    28912891                        GradjDhDtBalancedthickness(gradient);
    28922892                        break;
     
    34953495        if (iomodel->watercolumn){
    34963496                for(i=0;i<3;i++)nodeinputs[i]=iomodel->watercolumn[tria_vertex_ids[i]-1];
    3497                 this->inputs->AddInput(new TriaVertexInput(WaterColumnEnum,nodeinputs));
     3497                this->inputs->AddInput(new TriaVertexInput(WatercolumnEnum,nodeinputs));
    34983498                this->inputs->AddInput(new TriaVertexInput(WaterColumnOldEnum,nodeinputs));
    34993499        }
     
    35123512        if (iomodel->geothermalflux) {
    35133513                for(i=0;i<3;i++)nodeinputs[i]=iomodel->geothermalflux[tria_vertex_ids[i]-1];
    3514                 this->inputs->AddInput(new TriaVertexInput(GeothermalFluxEnum,nodeinputs));
     3514                this->inputs->AddInput(new TriaVertexInput(GeothermalfluxEnum,nodeinputs));
    35153515        }
    35163516        if (iomodel->dhdt){
    35173517                for(i=0;i<3;i++)nodeinputs[i]=iomodel->dhdt[tria_vertex_ids[i]-1]/iomodel->yts;
    3518                 this->inputs->AddInput(new TriaVertexInput(DhDtEnum,nodeinputs));
     3518                this->inputs->AddInput(new TriaVertexInput(DhdtEnum,nodeinputs));
    35193519        }
    35203520        if (iomodel->pressure){
     
    35673567                for(i=0;i<iomodel->num_control_type;i++){
    35683568                        switch((int)iomodel->control_type[i]){
    3569                                 case DhDtEnum:
     3569                                case DhdtEnum:
    35703570                                        if (iomodel->dhdt){
    35713571                                                for(j=0;j<3;j++)nodeinputs[j]=iomodel->dhdt[tria_vertex_ids[j]-1]/iomodel->yts;
    35723572                                                for(j=0;j<3;j++)cmmininputs[j]=iomodel->cm_min[(tria_vertex_ids[j]-1)*iomodel->num_control_type+i]/iomodel->yts;
    35733573                                                for(j=0;j<3;j++)cmmaxinputs[j]=iomodel->cm_max[(tria_vertex_ids[j]-1)*iomodel->num_control_type+i]/iomodel->yts;
    3574                                                 this->inputs->AddInput(new ControlInput(DhDtEnum,TriaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
     3574                                                this->inputs->AddInput(new ControlInput(DhdtEnum,TriaVertexInputEnum,nodeinputs,cmmininputs,cmmaxinputs,i+1));
    35753575                                        }
    35763576                                        break;
     
    39893989        /*Now, we have to move the previous WaterColumn input  to Picard
    39903990         * status, otherwise, we'll wipe them off: */
    3991         this->inputs->ChangeEnum(WaterColumnEnum,WaterColumnPicardEnum);
     3991        this->inputs->ChangeEnum(WatercolumnEnum,WaterColumnPicardEnum);
    39923992
    39933993        /*Add input to the element: */
    3994         this->inputs->AddInput(new TriaVertexInput(WaterColumnEnum,values));
     3994        this->inputs->AddInput(new TriaVertexInput(WatercolumnEnum,values));
    39953995
    39963996        /*Free ressources:*/
     
    41614161                                name==SurfaceSlopeYEnum ||
    41624162                                name==BasalMeltingRateEnum ||
    4163                                 name==WaterColumnEnum ||
     4163                                name==WatercolumnEnum ||
    41644164                                name==SurfaceMassBalanceEnum ||
    41654165                                name==SurfaceAreaEnum||
     
    49934993
    49944994        /*Retrieve all inputs we will be needing: */
    4995         this->parameters->FindParam(&meanvel,MeanVelEnum);
    4996         this->parameters->FindParam(&epsvel,EpsVelEnum);
     4995        this->parameters->FindParam(&meanvel,MeanvelEnum);
     4996        this->parameters->FindParam(&epsvel,EpsvelEnum);
    49974997        Input* weights_input=inputs->GetInput(WeightsEnum);   _assert_(weights_input);
    49984998        Input* vx_input     =inputs->GetInput(VxEnum);        _assert_(vx_input);
     
    50585058
    50595059        /*Retrieve all inputs we will be needing: */
    5060         this->parameters->FindParam(&meanvel,MeanVelEnum);
    5061         this->parameters->FindParam(&epsvel,EpsVelEnum);
     5060        this->parameters->FindParam(&meanvel,MeanvelEnum);
     5061        this->parameters->FindParam(&epsvel,EpsvelEnum);
    50625062        Input* weights_input=inputs->GetInput(WeightsEnum);   _assert_(weights_input);
    50635063        Input* vx_input     =inputs->GetInput(VxEnum);        _assert_(vx_input);
     
    51475147
    51485148        /*Retrieve all inputs we will be needing: */
    5149         this->parameters->FindParam(&meanvel,MeanVelEnum);
    5150         this->parameters->FindParam(&epsvel,EpsVelEnum);
     5149        this->parameters->FindParam(&meanvel,MeanvelEnum);
     5150        this->parameters->FindParam(&epsvel,EpsvelEnum);
    51515151        Input* weights_input=inputs->GetInput(WeightsEnum);   _assert_(weights_input);
    51525152        Input* vx_input     =inputs->GetInput(VxEnum);        _assert_(vx_input);
     
    54205420}
    54215421/*}}}*/
    5422 /*FUNCTION Tria::UpdateForcing(int index,IoModel* iomodel,int step,double time, int FieldEnum){{{1*/
    5423 void Tria::UpdateForcing(int index,IoModel* iomodel,int step,double time, int FieldEnum,Parameters* parameters){
    5424                
    5425         /*Intermediaries*/
    5426         int i,j;
    5427         int tria_vertex_ids[3];
    5428         double  nodeinputs[3];
    5429 
    5430         /*Recover vertices ids needed to initialize inputs*/
    5431         for(i=0;i<3;i++) tria_vertex_ids[i]=(int)iomodel->elements[3*index+i]; //ids for vertices are in the elements array from Matlab
    5432 
    5433         /*recover forcing for this time step: */
    5434         for(i=0;i<3;i++) nodeinputs[i]=iomodel->forcing[tria_vertex_ids[i]-1];
    5435 
    5436         /*process units: */
    5437         UnitConversion(&nodeinputs[0], 3 ,ExtToIuEnum, FieldEnum, parameters);
    5438 
    5439         if(step==0){
    5440 
    5441                 /*This is the first time we are trying to replace the smb tria vertex input by a smb triav vertex
    5442                  *forcing, which is essentially a tria vertex input that can vary with time. So first, if there is already
    5443                  * an input with enum FieldEnum, squash it: */
    5444                 TransientInput* transientinput = new TransientInput(FieldEnum);
    5445 
    5446                 TriaVertexInput* triavertexinput = new TriaVertexInput(FieldEnum,&nodeinputs[0]);
    5447                 transientinput->AddTimeInput(triavertexinput,time);
    5448                 this->inputs->AddInput(transientinput);
    5449 
    5450         }
    5451         else{
    5452 
    5453                 /*Ok, we can't write over the existing forcing that was created in previous step 0. Find the input, and add
    5454                  *values for this time step: */
    5455                 TransientInput* transientinput=(TransientInput*)inputs->GetInput(FieldEnum); _assert_(transientinput);
    5456 
    5457                 TriaVertexInput* triavertexinput = new TriaVertexInput(FieldEnum,&nodeinputs[0]);
    5458                 transientinput->AddTimeInput(triavertexinput,time);
    5459 
    5460         }
    5461 
    5462 }
    5463 /*}}}*/
    54645422/*FUNCTION Tria::UpdateShelfStatus{{{1*/
    54655423int  Tria::UpdateShelfStatus(Vec new_shelf_nodes){
  • issm/trunk/src/c/objects/Elements/Tria.h

    r8800 r8926  
    139139                double SurfaceArea(void);
    140140                void   Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type);
    141                 void   UpdateForcing(int index, IoModel* iomodel,int step,double time, int FieldEnum,Parameters* parameters);
    142141                int    UpdateShelfStatus(Vec new_shelf_nodes);
    143142                int    UpdatePotentialSheetUngrounding(double* potential_sheet_ungrounding,Vec vec_nodes_on_iceshelf,double* nodes_on_iceshelf);
  • issm/trunk/src/c/objects/FemModel.cpp

    r8800 r8926  
    7272
    7373        /*Add output file name to parameters: */
    74         this->parameters->AddObject(new StringParam(OutputFileNameEnum,outputfilename));
     74        this->parameters->AddObject(new StringParam(OutputfilenameEnum,outputfilename));
    7575
    7676#endif
  • issm/trunk/src/c/objects/IoModel.cpp

    r8823 r8926  
    9494        xfree((void**)&this->surface_ablation_rate);
    9595        xfree((void**)&this->surface_mass_balance);
    96         xfree((void**)&this->forcingtypes);
    97         xfree((void**)&this->forcing);
    98         xfree((void**)&this->timesteps);
    9996        xfree((void**)&this->dhdt);
    10097        xfree((void**)&this->rheology_B);
     
    137134        /*Get all the data that consists of scalars, integers and strings: */
    138135
    139         IoModelFetchData(&this->name,iomodel_handle,"name");
    140         IoModelFetchData(&this->inputfilename,iomodel_handle,"inputfilename");
    141         IoModelFetchData(&this->outputfilename,iomodel_handle,"outputfilename");
    142         IoModelFetchData(&this->qmu_analysis,iomodel_handle,"qmu_analysis");
    143         IoModelFetchData(&this->control_analysis,iomodel_handle,"control_analysis");
    144         IoModelFetchData(&this->dim,iomodel_handle,"dim");
     136        IoModelFetchData(&this->name,iomodel_handle,NameEnum);
     137        IoModelFetchData(&this->inputfilename,iomodel_handle,InputfilenameEnum);
     138        IoModelFetchData(&this->outputfilename,iomodel_handle,OutputfilenameEnum);
     139        IoModelFetchData(&this->qmu_analysis,iomodel_handle,QmuAnalysisEnum);
     140        IoModelFetchData(&this->control_analysis,iomodel_handle,ControlAnalysisEnum);
     141        IoModelFetchData(&this->dim,iomodel_handle,DimEnum);
    145142        /*!Get numberofelements and numberofvertices: */
    146         IoModelFetchData(&this->numberofvertices,iomodel_handle,"numberofnodes");
    147         IoModelFetchData(&this->numberofelements,iomodel_handle,"numberofelements");
     143        IoModelFetchData(&this->numberofvertices,iomodel_handle,NumberOfNodesEnum);
     144        IoModelFetchData(&this->numberofelements,iomodel_handle,NumberOfElementsEnum);
    148145        /*!In case we are running 3d, we are going to need the collapsed and non-collapsed 2d meshes, from which the 3d mesh was extruded: */
    149146        if (this->dim==3){
    150147       
    151148                /*!Deal with 2d mesh: */
    152                 IoModelFetchData(&this->numberofelements2d,iomodel_handle,"numberofelements2d");
    153                 IoModelFetchData(&this->numberofvertices2d,iomodel_handle,"numberofnodes2d");
    154                 IoModelFetchData(&this->numlayers,iomodel_handle,"numlayers");
     149                IoModelFetchData(&this->numberofelements2d,iomodel_handle,NumberOfElements2DEnum);
     150                IoModelFetchData(&this->numberofvertices2d,iomodel_handle,NumberOfNodes2DEnum);
     151                IoModelFetchData(&this->numlayers,iomodel_handle,NumlayersEnum);
    155152        }
    156153
    157154
    158155        /*elements type: */
    159         IoModelFetchData(&this->ishutter,iomodel_handle,"ishutter");
    160         IoModelFetchData(&this->ismacayealpattyn,iomodel_handle,"ismacayealpattyn");
    161         IoModelFetchData(&this->isstokes,iomodel_handle,"isstokes");
     156        IoModelFetchData(&this->ishutter,iomodel_handle,IshutterEnum);
     157        IoModelFetchData(&this->ismacayealpattyn,iomodel_handle,IsmacayealpattynEnum);
     158        IoModelFetchData(&this->isstokes,iomodel_handle,IsstokesEnum);
    162159
    163160        /*!Get drag_type, drag and p,q: */
    164         IoModelFetchData(&this->drag_type,iomodel_handle,"drag_type");
     161        IoModelFetchData(&this->drag_type,iomodel_handle,DragTypeEnum);
    165162
    166163        /*!Get materials: */
    167         IoModelFetchData(&this->rho_water,iomodel_handle,"rho_water");
    168         IoModelFetchData(&this->rho_ice,iomodel_handle,"rho_ice");
    169         IoModelFetchData(&this->g,iomodel_handle,"g");
     164        IoModelFetchData(&this->rho_water,iomodel_handle,RhoWaterEnum);
     165        IoModelFetchData(&this->rho_ice,iomodel_handle,RhoIceEnum);
     166        IoModelFetchData(&this->g,iomodel_handle,GEnum);
    170167
    171168        /*Get control parameters: */
    172         IoModelFetchData(&this->num_control_type,iomodel_handle,"num_control_type");
    173         IoModelFetchData(&this->num_cm_responses,iomodel_handle,"num_cm_responses");
     169        IoModelFetchData(&this->num_control_type,iomodel_handle,NumControlTypeEnum);
     170        IoModelFetchData(&this->num_cm_responses,iomodel_handle,NumCmResponsesEnum);
    174171
    175172        /*!Get solution parameters: */
    176         IoModelFetchData(&this->yts,iomodel_handle,"yts");
    177         IoModelFetchData(&this->meanvel,iomodel_handle,"meanvel");
    178         IoModelFetchData(&this->epsvel,iomodel_handle,"epsvel");
    179         IoModelFetchData(&this->verbose,iomodel_handle,"verbose_binary");
    180         IoModelFetchData(&this->output_frequency,iomodel_handle,"output_frequency");
    181         IoModelFetchData(&this->prognostic_DG,iomodel_handle,"prognostic_DG");
    182         IoModelFetchData(&this->nsteps,iomodel_handle,"nsteps");
    183         IoModelFetchData(&this->eps_cm,iomodel_handle,"eps_cm");
    184         IoModelFetchData(&this->tolx,iomodel_handle,"tolx");
    185         IoModelFetchData(&this->cm_gradient,iomodel_handle,"cm_gradient");
    186         IoModelFetchData(&this->eps_res,iomodel_handle,"eps_res");
    187         IoModelFetchData(&this->eps_rel,iomodel_handle,"eps_rel");
    188         IoModelFetchData(&this->eps_abs,iomodel_handle,"eps_abs");
    189         IoModelFetchData(&this->max_nonlinear_iterations,iomodel_handle,"max_nonlinear_iterations");
    190         IoModelFetchData(&this->dt,iomodel_handle,"dt");
    191         IoModelFetchData(&this->ndt,iomodel_handle,"ndt");
    192         IoModelFetchData(&this->time_adapt,iomodel_handle,"time_adapt");
    193         IoModelFetchData(&this->cfl_coefficient,iomodel_handle,"cfl_coefficient");
    194         IoModelFetchData(&this->hydrostatic_adjustment,iomodel_handle,"hydrostatic_adjustment");
    195         IoModelFetchData(&this->penalty_offset,iomodel_handle,"penalty_offset");
    196         IoModelFetchData(&this->penalty_melting,iomodel_handle,"penalty_melting");
    197         IoModelFetchData(&this->penalty_lock,iomodel_handle,"penalty_lock");
    198         IoModelFetchData(&this->sparsity,iomodel_handle,"sparsity");
    199         IoModelFetchData(&this->connectivity,iomodel_handle,"connectivity");
    200         IoModelFetchData(&this->lowmem,iomodel_handle,"lowmem");
    201         IoModelFetchData(&this->viscosity_overshoot,iomodel_handle,"viscosity_overshoot");
    202         IoModelFetchData(&this->artdiff,iomodel_handle,"artificial_diffusivity");
    203         IoModelFetchData(&this->prognostic_DG,iomodel_handle,"prognostic_DG");
    204         IoModelFetchData(&this->stokesreconditioning,iomodel_handle,"stokesreconditioning");
    205         IoModelFetchData(&this->shelf_dampening,iomodel_handle,"shelf_dampening");
    206         IoModelFetchData(&this->waitonlock,iomodel_handle,"waitonlock");
    207         IoModelFetchData(&this->gl_migration,iomodel_handle,"gl_migration");
    208         IoModelFetchData(&this->isdiagnostic,iomodel_handle,"isdiagnostic");
    209         IoModelFetchData(&this->isprognostic,iomodel_handle,"isprognostic");
    210         IoModelFetchData(&this->isthermal,iomodel_handle,"isthermal");
     173        IoModelFetchData(&this->yts,iomodel_handle,YtsEnum);
     174        IoModelFetchData(&this->meanvel,iomodel_handle,MeanvelEnum);
     175        IoModelFetchData(&this->epsvel,iomodel_handle,EpsvelEnum);
     176        IoModelFetchData(&this->verbose,iomodel_handle,VerboseBinaryEnum);
     177        IoModelFetchData(&this->output_frequency,iomodel_handle,OutputFrequencyEnum);
     178        IoModelFetchData(&this->prognostic_DG,iomodel_handle,PrognosticDGEnum);
     179        IoModelFetchData(&this->nsteps,iomodel_handle,NstepsEnum);
     180        IoModelFetchData(&this->eps_cm,iomodel_handle,EpsCmEnum);
     181        IoModelFetchData(&this->tolx,iomodel_handle,TolxEnum);
     182        IoModelFetchData(&this->cm_gradient,iomodel_handle,CmGradientEnum);
     183        IoModelFetchData(&this->eps_res,iomodel_handle,EpsResEnum);
     184        IoModelFetchData(&this->eps_rel,iomodel_handle,EpsRelEnum);
     185        IoModelFetchData(&this->eps_abs,iomodel_handle,EpsAbsEnum);
     186        IoModelFetchData(&this->max_nonlinear_iterations,iomodel_handle,MaxNonlinearIterationsEnum);
     187        IoModelFetchData(&this->dt,iomodel_handle,DtEnum);
     188        IoModelFetchData(&this->ndt,iomodel_handle,NdtEnum);
     189        IoModelFetchData(&this->time_adapt,iomodel_handle,TimeAdaptEnum);
     190        IoModelFetchData(&this->cfl_coefficient,iomodel_handle,CflCoefficientEnum);
     191        IoModelFetchData(&this->hydrostatic_adjustment,iomodel_handle,HydrostaticAdjustmentEnum);
     192        IoModelFetchData(&this->penalty_offset,iomodel_handle,PenaltyOffsetEnum);
     193        IoModelFetchData(&this->penalty_melting,iomodel_handle,PenaltyMeltingEnum);
     194        IoModelFetchData(&this->penalty_lock,iomodel_handle,PenaltyLockEnum);
     195        IoModelFetchData(&this->sparsity,iomodel_handle,SparsityEnum);
     196        IoModelFetchData(&this->connectivity,iomodel_handle,ConnectivityEnum);
     197        IoModelFetchData(&this->lowmem,iomodel_handle,LowmemEnum);
     198        IoModelFetchData(&this->viscosity_overshoot,iomodel_handle,ViscosityOvershootEnum);
     199        IoModelFetchData(&this->artdiff,iomodel_handle,ArtificialDiffusivityEnum);
     200        IoModelFetchData(&this->prognostic_DG,iomodel_handle,PrognosticDGEnum);
     201        IoModelFetchData(&this->stokesreconditioning,iomodel_handle,StokesreconditioningEnum);
     202        IoModelFetchData(&this->shelf_dampening,iomodel_handle,ShelfDampeningEnum);
     203        IoModelFetchData(&this->waitonlock,iomodel_handle,WaitonlockEnum);
     204        IoModelFetchData(&this->gl_migration,iomodel_handle,GlMigrationEnum);
     205        IoModelFetchData(&this->isdiagnostic,iomodel_handle,IsdiagnosticEnum);
     206        IoModelFetchData(&this->isprognostic,iomodel_handle,IsprognosticEnum);
     207        IoModelFetchData(&this->isthermal,iomodel_handle,IsthermalEnum);
    211208
    212209        /*!Get thermal parameters: */
    213         IoModelFetchData(&this->beta,iomodel_handle,"beta");
    214         IoModelFetchData(&this->meltingpoint,iomodel_handle,"meltingpoint");
    215         IoModelFetchData(&this->referencetemperature,iomodel_handle,"referencetemperature");
    216         IoModelFetchData(&this->latentheat,iomodel_handle,"latentheat");
    217         IoModelFetchData(&this->heatcapacity,iomodel_handle,"heatcapacity");
    218         IoModelFetchData(&this->thermalconductivity,iomodel_handle,"thermalconductivity");
    219         IoModelFetchData(&this->min_thermal_constraints,iomodel_handle,"min_thermal_constraints");
    220         IoModelFetchData(&this->min_mechanical_constraints,iomodel_handle,"min_mechanical_constraints");
    221         IoModelFetchData(&this->stabilize_constraints,iomodel_handle,"stabilize_constraints");
    222         IoModelFetchData(&this->mixed_layer_capacity,iomodel_handle,"mixed_layer_capacity");
    223         IoModelFetchData(&this->thermal_exchange_velocity,iomodel_handle,"thermal_exchange_velocity");
    224         IoModelFetchData(&this->basal_melting_rate_correction_apply,iomodel_handle,"basal_melting_rate_correction_apply");
    225         IoModelFetchData(&this->gl_melting_rate,iomodel_handle,"gl_melting_rate");
    226         IoModelFetchData(&this->rheology_law,iomodel_handle,"rheology_law");
    227         IoModelFetchData(&this->numforcings,iomodel_handle,"numforcings");
     210        IoModelFetchData(&this->beta,iomodel_handle,BetaEnum);
     211        IoModelFetchData(&this->meltingpoint,iomodel_handle,MeltingpointEnum);
     212        IoModelFetchData(&this->referencetemperature,iomodel_handle,ReferencetemperatureEnum);
     213        IoModelFetchData(&this->latentheat,iomodel_handle,LatentheatEnum);
     214        IoModelFetchData(&this->heatcapacity,iomodel_handle,HeatcapacityEnum);
     215        IoModelFetchData(&this->thermalconductivity,iomodel_handle,ThermalconductivityEnum);
     216        IoModelFetchData(&this->min_thermal_constraints,iomodel_handle,MinThermalConstraintsEnum);
     217        IoModelFetchData(&this->min_mechanical_constraints,iomodel_handle,MinMechanicalConstraintsEnum);
     218        IoModelFetchData(&this->stabilize_constraints,iomodel_handle,StabilizeConstraintsEnum);
     219        IoModelFetchData(&this->mixed_layer_capacity,iomodel_handle,MixedLayerCapacityEnum);
     220        IoModelFetchData(&this->thermal_exchange_velocity,iomodel_handle,ThermalExchangeVelocityEnum);
     221        IoModelFetchData(&this->basal_melting_rate_correction_apply,iomodel_handle,BasalMeltingRateCorrectionApplyEnum);
     222        IoModelFetchData(&this->gl_melting_rate,iomodel_handle,GlMeltingRateEnum);
     223        IoModelFetchData(&this->rheology_law,iomodel_handle,RheologyLawEnum);
    228224       
    229225        /*!Get hydrology parameters: */
    230         IoModelFetchData(&this->hydro_kn,iomodel_handle,"hydro_kn");
    231         IoModelFetchData(&this->hydro_p,iomodel_handle,"hydro_p");
    232         IoModelFetchData(&this->hydro_q,iomodel_handle,"hydro_q");
    233         IoModelFetchData(&this->hydro_CR,iomodel_handle,"hydro_CR");
    234         IoModelFetchData(&this->hydro_n,iomodel_handle,"hydro_n");
     226        IoModelFetchData(&this->hydro_kn,iomodel_handle,HydroKnEnum);
     227        IoModelFetchData(&this->hydro_p,iomodel_handle,HydroPEnum);
     228        IoModelFetchData(&this->hydro_q,iomodel_handle,HydroQEnum);
     229        IoModelFetchData(&this->hydro_CR,iomodel_handle,HydroCREnum);
     230        IoModelFetchData(&this->hydro_n,iomodel_handle,HydroNEnum);
    235231
    236232        /*qmu: */
    237233        if(this->qmu_analysis){
    238                 IoModelFetchData(&this->numberofvariables,iomodel_handle,"numberofvariables");
    239                 IoModelFetchData(&this->numvariabledescriptors,iomodel_handle,"numvariabledescriptors");
    240                 IoModelFetchData(&this->numberofresponses,iomodel_handle,"numberofresponses");
    241                 IoModelFetchData(&this->numresponsedescriptors,iomodel_handle,"numresponsedescriptors");
    242                 IoModelFetchData(&this->qmu_npart,iomodel_handle,"npart");
    243                 IoModelFetchData(&this->qmu_mass_flux_num_profiles,iomodel_handle,"qmu_mass_flux_num_profiles");
    244                 IoModelFetchData(&this->qmu_save_femmodel,iomodel_handle,"qmu_save_femmodel");
     234                IoModelFetchData(&this->numberofvariables,iomodel_handle,NumberOfVariablesEnum);
     235                IoModelFetchData(&this->numvariabledescriptors,iomodel_handle,NumvariabledescriptorsEnum);
     236                IoModelFetchData(&this->numberofresponses,iomodel_handle,NumberOfResponsesEnum);
     237                IoModelFetchData(&this->numresponsedescriptors,iomodel_handle,NumresponsedescriptorsEnum);
     238                IoModelFetchData(&this->qmu_npart,iomodel_handle,NpartEnum);
     239                IoModelFetchData(&this->qmu_mass_flux_num_profiles,iomodel_handle,QmuMassFluxNumProfilesEnum);
     240                IoModelFetchData(&this->qmu_save_femmodel,iomodel_handle,QmuSaveFemmodelEnum);
    245241        }
    246242
    247243        /*i/o: */
    248         IoModelFetchData(&this->io_gather,iomodel_handle,"io_gather");
    249        
    250         /*parameter output : */
    251         IoModelFetchData(&this->numoutput,iomodel_handle,"numoutput");
     244        IoModelFetchData(&this->io_gather,iomodel_handle,IoGatherEnum);
    252245}
    253246/*}}}*/
     
    416409        this->dhdt=NULL;
    417410
    418         /*forcings: */
    419         this->numforcings=0;
    420         this->forcingtypes=NULL;
    421         this->forcing_numtimesteps=0;
    422         this->forcing=NULL;
    423         this->timesteps=NULL;
    424 
    425         /*parameter output: */
    426         this->numoutput=0;
    427 
    428411        /*elements type: */
    429412        this->ishutter=0;
  • issm/trunk/src/c/objects/IoModel.h

    r8823 r8926  
    199199                double*  dhdt;
    200200
    201                 /*forcings: */
    202                 int      numforcings;
    203                 double*  forcingtypes;
    204                 int      forcing_numtimesteps;
    205                 double*  forcing;
    206                 double*  timesteps;
    207 
    208                 /*parameter output: */
    209                 int      numoutput;
    210 
    211201                /*qmu: */
    212202                int      qmu_mass_flux_num_profiles;
  • issm/trunk/src/c/objects/Materials/Matpar.cpp

    r8581 r8926  
    239239                        break;
    240240
    241                 case  HeatCapacityEnum:
     241                case  HeatcapacityEnum:
    242242                        this->heatcapacity=constant;
    243243                        break;
    244244
    245                 case  ThermalConductivityEnum:
     245                case  ThermalconductivityEnum:
    246246                        this->thermalconductivity=constant;
    247247                        break;
    248248
    249                 case  LatentHeatEnum:
     249                case  LatentheatEnum:
    250250                        this->latentheat=constant;
    251251                        break;
     
    255255                        break;
    256256
    257                 case  MeltingPointEnum:
     257                case  MeltingpointEnum:
    258258                        this->meltingpoint=constant;
    259259                        break;
    260260
    261                 case  ReferenceTemperatureEnum:
     261                case  ReferencetemperatureEnum:
    262262                        this->referencetemperature=constant;
    263263                        break;
  • issm/trunk/src/c/objects/Params/StringArrayParam.cpp

    r8224 r8926  
    3030
    3131        int i;
    32                 int size;
     32        int size;
    3333
    3434        enum_type=in_enum_type;
    3535        numstrings=in_numstrings;
    3636
    37         value=(char**)xmalloc(numstrings*sizeof(char*));
    38         for(i=0;i<numstrings;i++){
    39                 char* string=NULL;
    40                 size=strlen(in_values[i])+1;
    41                 string=(char*)xmalloc(size*sizeof(char));
    42                 memcpy(string,in_values[i],size*sizeof(char));
    43                 value[i]=string;
    44         }
     37        if(numstrings){
     38                value=(char**)xmalloc(numstrings*sizeof(char*));
     39                for(i=0;i<numstrings;i++){
     40                        char* string=NULL;
     41                        size=strlen(in_values[i])+1;
     42                        string=(char*)xmalloc(size*sizeof(char));
     43                        memcpy(string,in_values[i],size*sizeof(char));
     44                        value[i]=string;
     45                }
     46        }
     47        else value=NULL;
    4548       
    4649}
     
    160163
    161164        memcpy(&numstrings,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
    162         this->value=(char**)xmalloc(numstrings*sizeof(char*));
    163 
    164         for(i=0;i<numstrings;i++){
    165                 memcpy(&stringsize,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
    166        
    167                 string=(char*)xmalloc(stringsize*sizeof(char));
    168                 memcpy(string,marshalled_dataset,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);
    169 
    170                 this->value[i]=string;
    171         }
     165        if(numstrings){
     166                this->value=(char**)xmalloc(numstrings*sizeof(char*));
     167
     168                for(i=0;i<numstrings;i++){
     169                        memcpy(&stringsize,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
     170
     171                        string=(char*)xmalloc(stringsize*sizeof(char));
     172                        memcpy(string,marshalled_dataset,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);
     173
     174                        this->value[i]=string;
     175                }
     176        }
     177        else this->value=NULL;
    172178
    173179        /*return: */
     
    203209
    204210        M=this->numstrings;
    205         outstrings=(char**)xmalloc(this->numstrings*sizeof(char*));
    206 
    207         for(i=0;i<this->numstrings;i++){
    208                 string=this->value[i];
    209                 stringsize=strlen(string)+1;
    210 
    211                 string2=(char*)xmalloc(stringsize*sizeof(char));
    212                 memcpy(string2,string,stringsize*sizeof(char));
    213 
    214                 outstrings[i]=string2;
    215         }
     211        if(this->numstrings){
     212                outstrings=(char**)xmalloc(this->numstrings*sizeof(char*));
     213
     214                for(i=0;i<this->numstrings;i++){
     215                        string=this->value[i];
     216                        stringsize=strlen(string)+1;
     217
     218                        string2=(char*)xmalloc(stringsize*sizeof(char));
     219                        memcpy(string2,string,stringsize*sizeof(char));
     220
     221                        outstrings[i]=string2;
     222                }
     223        }
     224        else outstrings=NULL;
    216225
    217226        /*Assign output pointers:*/
  • issm/trunk/src/c/shared/Numerics/UnitConversion.cpp

    r8399 r8926  
    6767                case VelEnum:         scale=yts;break; //m/yr
    6868                case VelObsEnum:      scale=yts;break; //m/yr
    69                 case DhDtEnum:        scale=yts;break; //m/yr
     69                case DhdtEnum:        scale=yts;break; //m/yr
    7070                case BasalMeltingRateEnum:        scale=yts;break; //m/yr
    7171                case SurfaceAccumulationRateEnum: scale=yts;break; //m/yr
  • issm/trunk/src/c/solutions/adjointdiagnostic_core.cpp

    r7638 r8926  
    2121
    2222        /*retrieve parameters:*/
    23         femmodel->parameters->FindParam(&isstokes,IsStokesEnum);
     23        femmodel->parameters->FindParam(&isstokes,IsstokesEnum);
    2424        femmodel->parameters->FindParam(&control_analysis,ControlAnalysisEnum);
    2525        femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum);
  • issm/trunk/src/c/solutions/control_core.cpp

    r8601 r8926  
    5050        femmodel->parameters->FindParam(&control_type,NULL,ControlTypeEnum);
    5151        femmodel->parameters->FindParam(&responses,NULL,NULL,CmResponsesEnum);
    52         femmodel->parameters->FindParam(&nsteps,NStepsEnum);
    53         femmodel->parameters->FindParam(&maxiter,NULL,MaxIterEnum);
     52        femmodel->parameters->FindParam(&nsteps,NstepsEnum);
     53        femmodel->parameters->FindParam(&maxiter,NULL,MaxiterEnum);
    5454        femmodel->parameters->FindParam(&cm_jump,NULL,CmJumpEnum);
    5555        femmodel->parameters->FindParam(&eps_cm,EpsCmEnum);
    56         femmodel->parameters->FindParam(&tolx,TolXEnum);
     56        femmodel->parameters->FindParam(&tolx,TolxEnum);
    5757        femmodel->parameters->FindParam(&cm_gradient,CmGradientEnum);
    5858        femmodel->parameters->FindParam(&dim,DimEnum);
    5959        femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum);
    60         femmodel->parameters->FindParam(&isstokes,IsStokesEnum);
     60        femmodel->parameters->FindParam(&isstokes,IsstokesEnum);
    6161        femmodel->parameters->FindParam(&qmu_analysis,QmuAnalysisEnum);
    6262        /*}}}*/
  • issm/trunk/src/c/solutions/controlrestart.cpp

    r8224 r8926  
    1717        femmodel->parameters->FindParam(&num_controls,NumControlsEnum);
    1818        femmodel->parameters->FindParam(&control_type,NULL,ControlTypeEnum);
    19         femmodel->parameters->FindParam(&nsteps,NStepsEnum);
     19        femmodel->parameters->FindParam(&nsteps,NstepsEnum);
    2020        femmodel->parameters->FindParam(&qmu_analysis,QmuAnalysisEnum);
    2121
  • issm/trunk/src/c/solutions/diagnostic_core.cpp

    r8803 r8926  
    2828        /* recover parameters:*/
    2929        femmodel->parameters->FindParam(&dim,DimEnum);
    30         femmodel->parameters->FindParam(&ishutter,IsHutterEnum);
    31         femmodel->parameters->FindParam(&ismacayealpattyn,IsMacAyealPattynEnum);
    32         femmodel->parameters->FindParam(&isstokes,IsStokesEnum);
     30        femmodel->parameters->FindParam(&ishutter,IshutterEnum);
     31        femmodel->parameters->FindParam(&ismacayealpattyn,IsmacayealpattynEnum);
     32        femmodel->parameters->FindParam(&isstokes,IsstokesEnum);
    3333        femmodel->parameters->FindParam(&qmu_analysis,QmuAnalysisEnum);
    3434        femmodel->parameters->FindParam(&control_analysis,ControlAnalysisEnum);
  • issm/trunk/src/c/solutions/enthalpy_core.cpp

    r8500 r8926  
    5252                        InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,TemperatureEnum,i+1,time);
    5353                        InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,EnthalpyEnum,i+1,time);
    54                         InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,WaterFractionEnum,i+1,time);
     54                        InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,WaterfractionEnum,i+1,time);
    5555                }
    5656
  • issm/trunk/src/c/solutions/gradient_core.cpp

    r8224 r8926  
    3131        femmodel->parameters->FindParam(&num_controls,NumControlsEnum);
    3232        femmodel->parameters->FindParam(&control_type,NULL,ControlTypeEnum);
    33         femmodel->parameters->FindParam(&optscal_list,NULL,NULL,OptScalEnum);
     33        femmodel->parameters->FindParam(&optscal_list,NULL,NULL,OptscalEnum);
    3434
    3535        /*Compute and norm gradient of all controls*/
  • issm/trunk/src/c/solutions/hydrology_core.cpp

    r8561 r8926  
    5151                if(solution_type==HydrologySolutionEnum && !control_analysis){
    5252                        _printf_(VerboseSolution(),"   saving results\n");
    53                         InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,WaterColumnEnum,i+1,time);
     53                        InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,WatercolumnEnum,i+1,time);
    5454                }
    5555
  • issm/trunk/src/c/solutions/hydrology_core_step.cpp

    r8073 r8926  
    2222
    2323        /*transfer water column thickness to old water column thickness: */
    24         InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,WaterColumnEnum,WaterColumnOldEnum);
     24        InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,WatercolumnEnum,WaterColumnOldEnum);
    2525
    2626}
  • issm/trunk/src/c/solutions/issm.cpp

    r8539 r8926  
    7575        femmodel->parameters->FindParam(&qmu_analysis,QmuAnalysisEnum);
    7676        femmodel->parameters->FindParam(&control_analysis,ControlAnalysisEnum);
    77         femmodel->parameters->FindParam(&waitonlock,WaitOnLockEnum);
     77        femmodel->parameters->FindParam(&waitonlock,WaitonlockEnum);
    7878
    7979        MPI_Barrier(MPI_COMM_WORLD); finish_init=MPI_Wtime();
  • issm/trunk/src/c/solutions/objectivefunctionC.cpp

    r8607 r8926  
    3737
    3838        /*Recover parameters: */
    39         femmodel->parameters->FindParam(&isstokes,IsStokesEnum);
     39        femmodel->parameters->FindParam(&isstokes,IsstokesEnum);
    4040        femmodel->parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    4141        femmodel->parameters->FindParam(&solution_type,SolutionTypeEnum);
  • issm/trunk/src/c/solutions/transient_core.cpp

    r8658 r8926  
    3737        femmodel->parameters->FindParam(&time_adapt,TimeAdaptEnum);
    3838        femmodel->parameters->FindParam(&gl_migration,GroundingLineMigrationEnum);
    39         femmodel->parameters->FindParam(&isdiagnostic,IsDiagnosticEnum);
    40         femmodel->parameters->FindParam(&isprognostic,IsPrognosticEnum);
    41         femmodel->parameters->FindParam(&isthermal,IsThermalEnum);
     39        femmodel->parameters->FindParam(&isdiagnostic,IsdiagnosticEnum);
     40        femmodel->parameters->FindParam(&isprognostic,IsprognosticEnum);
     41        femmodel->parameters->FindParam(&isthermal,IsthermalEnum);
    4242
    4343        /*initialize: */
  • issm/trunk/src/m/enum/EnumToModelField.m

    r8518 r8926  
    1515                case RheologyBEnum(), string='rheology_B'; return
    1616                case RheologyBbarEnum(), string='rheology_B'; return
    17                 case DhDtEnum(), string='dhdt'; return
     17                case DhdtEnum(), string='dhdt'; return
    1818                case VxEnum(), string='vx'; return
    1919                case VxObsEnum(), string='vx_obs'; return
  • issm/trunk/src/m/model/WriteData.m

    r4448 r8926  
    1 function WriteData(fid,data,data_type,name)
     1function WriteData(fid,data,data_type,enum)
    22%WRITEDATA - ...
    33%
    44%   Usage:
    5 %      WriteData(fid,data,data_type)
     5%      WriteData(fid,data,data_type,enum)
     6%
     7%   Eg: WriteData(fid,md.elementoniceshelf,'Mat',ElementOnIceShelfEnum);
    68
    79if issparse(data),
     
    1012
    1113%Ok! put the length of the name, and the "name" string first!
    12 fwrite(fid,length(name),'int');
    13 fwrite(fid,name,'char');
     14fwrite(fid,enum,'int');
    1415
    1516if strcmpi(data_type,'String'),
     
    4647        %now write double
    4748        fwrite(fid,data,'double');
     49elseif strcmpi(data_type,'StringArray'),
     50
     51        %first get length of string array:
     52        num=length(data);
     53
     54        %now get length of record:
     55        recordlength=4; %for length of array
     56        for i=1:num,
     57                string=data{i};
     58                recordlength=recordlength+4+length(string); %for each string
     59        end
     60
     61        %write length of record
     62        fwrite(fid,recordlength,'int');
     63
     64        %now write length of string array
     65        fwrite(fid,num,'int');
     66       
     67        %now write the strings
     68        for i=1:num,
     69                string=data{i};
     70                fwrite(fid,length(string),'int');
     71                fwrite(fid,string,'char');
     72        end
    4873else
    4974        error('WriteData error message: data type not supported yet!');
  • issm/trunk/src/m/model/ismodelselfconsistent.m

    r8823 r8926  
    165165if ~ismember(md.rheology_law,[NoneEnum PatersonEnum ArrheniusEnum]),
    166166        message(['model not consistent: model ' md.name ' rheology_law field should be NoneEnum, PatersonEnum or ArrheniusEnum']);
    167 end
    168 %}}}
    169 %PARAMETEROUTPUT {{{1
    170 if md.numoutput~=length(md.parameteroutput),
    171         message('model not consistent: numoutput should be the same size as parameteroutput');
    172167end
    173168%}}}
  • issm/trunk/src/m/model/marshall.m

    r8823 r8926  
    2222end
    2323
    24 WriteData(fid,md.dim,'Integer','dim');
    25 WriteData(fid,md.numberofnodes,'Integer','numberofnodes');
    26 WriteData(fid,md.numberofelements,'Integer','numberofelements');
    27 WriteData(fid,md.x,'Mat','x');
    28 WriteData(fid,md.y,'Mat','y');
    29 WriteData(fid,md.z,'Mat','z');
    30 WriteData(fid,md.elements,'Mat','elements');
    31 WriteData(fid,md.elementconnectivity,'Mat','elementconnectivity');
    32 WriteData(fid,md.elements_type,'Mat','elements_type');
    33 WriteData(fid,md.vertices_type,'Mat','vertices_type');
    34 WriteData(fid,md.nodeonhutter,'Mat','nodeonhutter');
    35 WriteData(fid,md.nodeonmacayeal,'Mat','nodeonmacayeal');
    36 if md.dim==3,
    37         WriteData(fid,md.numberofelements2d,'Integer','numberofelements2d');
    38         WriteData(fid,md.numberofnodes2d,'Integer','numberofnodes2d');
    39         WriteData(fid,md.elements2d,'Mat','elements2d');
    40         WriteData(fid,md.numlayers,'Integer','numlayers');
    41         WriteData(fid,md.nodeonpattyn,'Mat','nodeonpattyn');
    42 end
    43 WriteData(fid,md.upperelements,'Mat','upperelements');
    44 WriteData(fid,md.lowerelements,'Mat','lowerelements');
    45 WriteData(fid,md.elementonbed,'Mat','elementonbed');
    46 WriteData(fid,md.elementonsurface,'Mat','elementonsurface');
    47 WriteData(fid,md.nodeonbed,'Mat','nodeonbed');
    48 WriteData(fid,md.nodeonsurface,'Mat','nodeonsurface');
    49 WriteData(fid,md.nodeonstokes,'Mat','nodeonstokes');
    50 WriteData(fid,md.borderstokes,'Mat','borderstokes');
    51 
    52 WriteData(fid,md.thickness,'Mat','thickness');
    53 WriteData(fid,md.thickness_coeff,'Mat','thickness_coeff');
    54 WriteData(fid,md.surface,'Mat','surface');
    55 WriteData(fid,md.bed,'Mat','bed');
    56 
    57 WriteData(fid,md.vx_obs,'Mat','vx_obs');
    58 WriteData(fid,md.vy_obs,'Mat','vy_obs');
    59 WriteData(fid,md.thickness_obs,'Mat','thickness_obs');
    60 
    61 WriteData(fid,md.vx,'Mat','vx');
    62 WriteData(fid,md.vy,'Mat','vy');
    63 WriteData(fid,md.vz,'Mat','vz');
    64 WriteData(fid,md.pressure,'Mat','pressure');
    65 WriteData(fid,md.temperature,'Mat','temperature');
    66 WriteData(fid,md.waterfraction,'Mat','waterfraction');
    67 
    68 WriteData(fid,md.drag_type,'Integer','drag_type');
    69 WriteData(fid,md.drag_coefficient,'Mat','drag_coefficient');
    70 WriteData(fid,md.drag_p,'Mat','drag_p');
    71 WriteData(fid,md.drag_q,'Mat','drag_q');
    72 
    73 WriteData(fid,md.elementoniceshelf,'Mat','elementoniceshelf');
    74 WriteData(fid,md.elementonwater,'Mat','elementonwater');
    75 WriteData(fid,md.nodeonicesheet,'Mat','nodeonicesheet');
    76 WriteData(fid,md.nodeoniceshelf,'Mat','nodeoniceshelf');
    77 WriteData(fid,md.nodeonwater,'Mat','nodeonwater');
    78 
    79 WriteData(fid,md.spcvx,'Mat','spcvx');
    80 WriteData(fid,md.spcvy,'Mat','spcvy');
    81 WriteData(fid,md.spcvz,'Mat','spcvz');
    82 WriteData(fid,md.spctemperature,'Mat','spctemperature');
    83 WriteData(fid,md.spcthickness,'Mat','spcthickness');
    84 WriteData(fid,md.spcwatercolumn,'Mat','spcwatercolumn');
    85 WriteData(fid,md.diagnostic_ref,'Mat','diagnostic_ref');
    86 
    87 WriteData(fid,md.pressureload,'Mat','pressureload');
    88 WriteData(fid,md.edges,'Mat','edges');
    89 
    90 WriteData(fid,md.geothermalflux,'Mat','geothermalflux');
    91 WriteData(fid,md.surface_accumulation_rate,'Mat','surface_accumulation_rate');
    92 WriteData(fid,md.surface_ablation_rate,'Mat','surface_ablation_rate');
    93 WriteData(fid,md.surface_mass_balance,'Mat','surface_mass_balance');
    94 WriteData(fid,md.gl_melting_rate,'Scalar','gl_melting_rate');
    95 WriteData(fid,md.basal_melting_rate,'Mat','basal_melting_rate');
    96 WriteData(fid,md.basal_melting_rate_correction_apply,'Integer','basal_melting_rate_correction_apply');
    97 
    98 %deal with forcings
    99 if ~isempty(md.forcings),
    100         forcingnames=fieldnames(md.forcings);
    101         numforcings=length(forcingnames);
    102         forcingtypes=zeros(numforcings,1);
    103         for i=1:numforcings,
    104                 switch (forcingnames{i})
    105                         case 'surface_accumulation_rate'
    106                                 forcingtypes(i)=SurfaceAccumulationRateEnum;
    107                         case 'surface_ablation_rate'
    108                                 forcingtypes(i)=SurfaceAblationRateEnum;
    109                         case 'surface_mass_balance'
    110                                 forcingtypes(i)=SurfaceMassBalanceEnum;
    111                         case 'basal_melting_rate'
    112                                 forcingtypes(i)=BasalMeltingRateEnum;
    113                         otherwise
    114                                 error(['forcing ' forcingnames{i} ' not supported yet']);
    115                 end
    116         end
    117         WriteData(fid,numforcings,'Integer','numforcings');
    118         WriteData(fid,forcingtypes,'Mat','forcingtypes');
    119 
    120         for i=1:numforcings,
    121                 forcing=md.forcings.(forcingnames{i});
    122                 forcingname=EnumToString(forcingtypes(i));
    123 
    124                 WriteData(fid,size(forcing,2),'Integer',['forcing_' forcingname '_num_time_steps']);
    125                 WriteData(fid,forcing(end,:),'Mat',['forcing_' forcingname '_time_steps']);
    126                 for j=1:size(forcing,2),
    127                         WriteData(fid,forcing(1:end-1,j),'Mat',['forcing_' forcingname '_' num2str(j)]);
    128                 end
    129         end
    130 else
    131         WriteData(fid,0,'Integer','numforcings');
    132 end
    133 
    134 if md.basal_melting_rate_correction_apply,
    135         WriteData(fid,md.basal_melting_rate_correction,'Mat','basal_melting_rate_correction');
    136 end
    137 WriteData(fid,md.dhdt,'Mat','dhdt');
    138 WriteData(fid,md.watercolumn,'Mat','watercolumn');
    139 
    140 %Transient
    141 WriteData(fid,md.isdiagnostic,'Integer','isdiagnostic');
    142 WriteData(fid,md.isprognostic,'Integer','isprognostic');
    143 WriteData(fid,md.isthermal,'Integer','isthermal');
    144 
    145 %Get materials
    146 WriteData(fid,md.rho_water,'Scalar','rho_water');
    147 WriteData(fid,md.rho_ice,'Scalar','rho_ice');
    148 WriteData(fid,md.g,'Scalar','g');
    149 WriteData(fid,md.rheology_B,'Mat','rheology_B');
    150 WriteData(fid,md.rheology_n,'Mat','rheology_n');
    151 WriteData(fid,md.rheology_law,'Integer','rheology_law');
    152 
    153 %Control methods
    154 WriteData(fid,md.control_analysis,'Integer','control_analysis');
    155 WriteData(fid,numel(md.control_type),'Integer','num_control_type');
    156 WriteData(fid,size(md.cm_responses,2),'Integer','num_cm_responses');
    157 WriteData(fid,md.control_type,'Mat','control_type');
    158 
    159 %Write solution parameters
    160 WriteData(fid,md.cm_responses,'Mat','cm_responses');
    161 WriteData(fid,md.weights,'Mat','weights');
    162 WriteData(fid,md.cm_jump,'Mat','cm_jump');
    163 WriteData(fid,md.yts,'Scalar','yts');
    164 WriteData(fid,md.meanvel,'Scalar','meanvel');
    165 WriteData(fid,md.epsvel,'Scalar','epsvel');
    166 WriteData(fid,VerboseToBinary(md.verbose),'Integer','verbose_binary');
    167 WriteData(fid,md.output_frequency,'Integer','output_frequency');
    168 WriteData(fid,md.artificial_diffusivity,'Integer','artificial_diffusivity');
    169 WriteData(fid,md.prognostic_DG,'Integer','prognostic_DG');
    170 WriteData(fid,md.nsteps,'Integer','nsteps');
    171 WriteData(fid,md.eps_cm,'Scalar','eps_cm');
    172 WriteData(fid,md.tolx,'Scalar','tolx');
    173 WriteData(fid,md.maxiter,'Mat','maxiter');
    174 WriteData(fid,md.cm_min,'Mat','cm_min');
    175 WriteData(fid,md.cm_max,'Mat','cm_max');
    176 WriteData(fid,md.cm_gradient,'Integer','cm_gradient');
    177 WriteData(fid,md.eps_res,'Scalar','eps_res');
    178 WriteData(fid,md.eps_rel,'Scalar','eps_rel');
    179 WriteData(fid,md.eps_abs,'Scalar','eps_abs');
    180 WriteData(fid,md.max_nonlinear_iterations,'Scalar','max_nonlinear_iterations');
    181 WriteData(fid,md.dt,'Scalar','dt');
    182 WriteData(fid,md.ndt,'Scalar','ndt');
    183 WriteData(fid,md.time_adapt,'Integer','time_adapt');
    184 WriteData(fid,md.cfl_coefficient,'Scalar','cfl_coefficient');
    185 WriteData(fid,md.hydrostatic_adjustment,'Integer','hydrostatic_adjustment');
    186 WriteData(fid,md.penalty_offset,'Scalar','penalty_offset');
    187 WriteData(fid,md.penalty_melting,'Scalar','penalty_melting');
    188 WriteData(fid,md.penalty_lock,'Integer','penalty_lock');
    189 WriteData(fid,md.sparsity,'Scalar','sparsity');
    190 WriteData(fid,md.connectivity,'Integer','connectivity');
    191 WriteData(fid,md.lowmem,'Integer','lowmem');
    192 WriteData(fid,md.optscal,'Mat','optscal');
    193 WriteData(fid,md.viscosity_overshoot,'Scalar','viscosity_overshoot');
    194 WriteData(fid,md.stokesreconditioning,'Scalar','stokesreconditioning');
    195 WriteData(fid,md.shelf_dampening,'Integer','shelf_dampening');
    196 WriteData(fid,md.waitonlock,'Scalar','waitonlock');
    197 
    198 %Thermal parameters
    199 WriteData(fid,md.beta,'Scalar','beta');
    200 WriteData(fid,md.meltingpoint,'Scalar','meltingpoint');
    201 WriteData(fid,md.referencetemperature,'Scalar','referencetemperature');
    202 WriteData(fid,md.latentheat,'Scalar','latentheat');
    203 WriteData(fid,md.heatcapacity,'Scalar','heatcapacity');
    204 WriteData(fid,md.thermalconductivity,'Scalar','thermalconductivity');
    205 WriteData(fid,md.min_thermal_constraints,'Integer','min_thermal_constraints');
    206 WriteData(fid,md.min_mechanical_constraints,'Integer','min_mechanical_constraints');
    207 WriteData(fid,md.mixed_layer_capacity,'Scalar','mixed_layer_capacity');
    208 WriteData(fid,md.thermal_exchange_velocity,'Scalar','thermal_exchange_velocity');
    209 WriteData(fid,md.stabilize_constraints,'Integer','stabilize_constraints');
    210 
    211 %Hydrology parameters
    212 WriteData(fid,md.hydro_kn,'Scalar','hydro_kn');
    213 WriteData(fid,md.hydro_p,'Scalar','hydro_p');
    214 WriteData(fid,md.hydro_q,'Scalar','hydro_q');
    215 WriteData(fid,md.hydro_CR,'Scalar','hydro_CR');
    216 WriteData(fid,md.hydro_n,'Scalar','hydro_n');
    217 
    218 %elements type
    219 WriteData(fid,md.ishutter,'Integer','ishutter');
    220 WriteData(fid,md.ismacayealpattyn,'Integer','ismacayealpattyn');
    221 WriteData(fid,md.isstokes,'Integer','isstokes');
    222 
    223 %grounding line migration:
    224 WriteData(fid,md.gl_migration,'Integer','gl_migration');
    225 if(md.gl_migration~=NoneEnum),
    226         WriteData(fid,md.bathymetry,'Mat','bathymetry');
    227 end
    228 
    229 %Rifts
    230 WriteData(fid,md.riftinfo,'Mat','riftinfo');
    231 
    232 %parameter output.
    233 md.numoutput=length(md.parameteroutput);
    234 WriteData(fid,md.numoutput,'Integer','numoutput');
    235 if(md.numoutput),
    236         for i=1:md.numoutput,
    237                 WriteData(fid,md.parameteroutput{i},'String',['parameteroutput_' num2str(i-1)]);
     24%automatically marshall model md, using template information available from an empty model class.
     25template=struct(model(0));
     26fields=fieldnames(template);
     27for i=1:length(fields),
     28        field=fields{i};
     29        marshall=template.(field){2};
     30        if marshall,
     31                enum=BuildEnum(field);
     32                type=template.(field){3};
     33                WriteData(fid,md.(field),type,enum);
    23834        end
    23935end
    240 
    241 %Qmu: the rest will be handle by qmumarshall
    242 WriteData(fid,md.qmu_analysis,'Integer','qmu_analysis');
    243 WriteData(fid,md.name,'String','name');
    244 
    245 %Get penalties
    246 WriteData(fid,md.penalties,'Mat','penalties');
    247 
    248 %input and output file names
    249 WriteData(fid,md.inputfilename,'String','inputfilename');
    250 WriteData(fid,md.outputfilename,'String','outputfilename');
    251 
    252 %i/o:
    253 WriteData(fid,md.io_gather,'Integer','io_gather');
    254 
    25536
    25637%close file
  • issm/trunk/src/m/model/presolve.m

    r8592 r8926  
    3636
    3737
     38%resolve some fields at solution time
     39md.verbose_binary=VerboseToBinary(md.verbose);
     40
     41%Control methods
     42md.num_control_type=numel(md.control_type);
     43md.num_cm_responses=size(md.cm_responses,2);
  • issm/trunk/src/m/solutions/diagnostic_core.m

    r8576 r8926  
    1212        %recover parameters common to all solutions
    1313        dim=femmodel.parameters.Dim;
    14         ishutter=femmodel.parameters.IsHutter;
    15         ismacayealpattyn=femmodel.parameters.IsMacAyealPattyn;
    16         isstokes=femmodel.parameters.IsStokes;
     14        ishutter=femmodel.parameters.Ishutter;
     15        ismacayealpattyn=femmodel.parameters.Ismacayealpattyn;
     16        isstokes=femmodel.parameters.Isstokes;
    1717        qmu_analysis=femmodel.parameters.QmuAnalysis;
    1818        control_analysis=femmodel.parameters.ControlAnalysis;
  • issm/trunk/src/m/solutions/transient_core.m

    r8559 r8926  
    1414        output_frequency=femmodel.parameters.OutputFrequency;
    1515        time_adapt=femmodel.parameters.TimeAdapt;
    16         isdiagnostic=femmodel.parameters.IsDiagnostic;
    17         isprognostic=femmodel.parameters.IsPrognostic;
    18         isthermal=femmodel.parameters.IsThermal;
     16        isdiagnostic=femmodel.parameters.Isdiagnostic;
     17        isprognostic=femmodel.parameters.Isprognostic;
     18        isthermal=femmodel.parameters.Isthermal;
    1919
    2020        %Initialize
Note: See TracChangeset for help on using the changeset viewer.