Changeset 16388


Ignore:
Timestamp:
10/11/13 12:45:40 (11 years ago)
Author:
Eric.Larour
Message:

NEW: new capbility to request outputs that can be defined very widely in the outputdefinition field
of the model. For now, we have implemented the massfluxatgate definition, which can be referred to
inthe requested_outputs field of stressbalance, transient and masstransport solutions.

Location:
issm/trunk-jpl
Files:
15 added
40 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/Makefile.am

    r16382 r16388  
    576576                                    ./modules/ConstraintsStatex/RiftConstraintsState.cpp
    577577#}}}
     578#Responses sources  {{{
     579responses_sources= ./classes/Massfluxatgate.h \
     580                                   ./modules/ModelProcessorx/CreateOutputDefinitions.cpp\
     581                                   ./modules/OutputDefinitionsResponsex/OutputDefinitionsResponsex.h\
     582                                   ./modules/OutputDefinitionsResponsex/OutputDefinitionsResponsex.cpp
     583#}}}
    578584#Android sources  {{{
    579585android_sources =
     
    957963endif
    958964
     965if RESPONSES
     966issm_sources +=  $(responses_sources)
     967endif
     968
    959969if ANDROID
    960970issm_sources +=  $(android_sources)
  • issm/trunk-jpl/src/c/classes/Elements/Element.h

    r16314 r16388  
    9494                virtual void   MaxAbsVz(IssmDouble* pmaxabsvz)=0;
    9595                virtual IssmDouble MassFlux(IssmDouble* segment)=0;
     96                virtual IssmDouble MassFlux(IssmDouble x1,IssmDouble y1, IssmDouble x2, IssmDouble y2,int segment_id)=0;
    9697                virtual void   ElementResponse(IssmDouble* presponse,int response_enum)=0;
    9798                virtual IssmDouble IceVolume(void)=0;
  • issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r16373 r16388  
    37393739        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    37403740        mass_flux=tria->MassFlux(segment);
     3741        delete tria->material; delete tria;
     3742
     3743        /*Delete Vx and Vy averaged*/
     3744        this->inputs->DeleteInput(VxAverageEnum);
     3745        this->inputs->DeleteInput(VyAverageEnum);
     3746
     3747        /*clean up and return*/
     3748        return mass_flux;
     3749}
     3750/*}}}*/
     3751/*FUNCTION Penta::MassFlux {{{*/
     3752IssmDouble Penta::MassFlux( IssmDouble x1, IssmDouble y1, IssmDouble x2, IssmDouble y2,int segment_id){
     3753
     3754        IssmDouble mass_flux=0;
     3755
     3756        if(!IsOnBed()) return mass_flux;
     3757
     3758        /*Depth Averaging Vx and Vy*/
     3759        this->InputDepthAverageAtBase(VxEnum,VxAverageEnum);
     3760        this->InputDepthAverageAtBase(VyEnum,VyAverageEnum);
     3761
     3762        /*Spawn Tria element from the base of the Penta: */
     3763        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
     3764        mass_flux=tria->MassFlux(x1,y1,x2,y2,segment_id);
    37413765        delete tria->material; delete tria;
    37423766
  • issm/trunk-jpl/src/c/classes/Elements/Penta.h

    r16314 r16388  
    122122                void   MinVz(IssmDouble* pminvz);
    123123                IssmDouble MassFlux(IssmDouble* segment);
     124                IssmDouble MassFlux(IssmDouble x1,IssmDouble y1, IssmDouble x2, IssmDouble y2,int segment_id);
    124125                void   MaxAbsVx(IssmDouble* pmaxabsvx);
    125126                void   MaxAbsVy(IssmDouble* pmaxabsvy);
  • issm/trunk-jpl/src/c/classes/Elements/Seg.h

    r16382 r16388  
    135135                void       MinVz(IssmDouble* pminvz){_error_("not implemented yet");};
    136136                IssmDouble MassFlux(IssmDouble* segment){_error_("not implemented yet");};
     137                IssmDouble MassFlux(IssmDouble x1,IssmDouble y1, IssmDouble x2, IssmDouble y2,int segment_id){_error_("not implemented yet");}
    137138                void       MaxAbsVx(IssmDouble* pmaxabsvx){_error_("not implemented yet");};
    138139                void       MaxAbsVy(IssmDouble* pmaxabsvy){_error_("not implemented yet");};
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r16387 r16388  
    28892889        /*Return: */
    28902890        return base*(surface-bed+min(rho_water/rho_ice*bathymetry,0.));
     2891}
     2892/*}}}*/
     2893/*FUNCTION Tria::MassFlux {{{*/
     2894IssmDouble Tria::MassFlux( IssmDouble x1, IssmDouble y1, IssmDouble x2, IssmDouble y2,int segment_id){
     2895
     2896        int        meshtype;
     2897        IssmDouble mass_flux=0.;
     2898        IssmDouble xyz_list[NUMVERTICES][3];
     2899        IssmDouble normal[2];
     2900        IssmDouble length,rho_ice;
     2901        IssmDouble h1,h2;
     2902        IssmDouble vx1,vx2,vy1,vy2;
     2903        GaussTria* gauss_1=NULL;
     2904        GaussTria* gauss_2=NULL;
     2905
     2906        /*Get material parameters :*/
     2907        rho_ice=matpar->GetRhoIce();
     2908
     2909        /*First off, check that this segment belongs to this element: */
     2910        if (segment_id!=this->id)_error_("error message: segment with id " << segment_id << " does not belong to element with id:" << this->id);
     2911
     2912        /*Get xyz list: */
     2913        GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
     2914
     2915        /*get area coordinates of 0 and 1 locations: */
     2916        gauss_1=new GaussTria();
     2917        gauss_1->GaussFromCoords(x1,y1,&xyz_list[0][0]);
     2918        gauss_2=new GaussTria();
     2919        gauss_2->GaussFromCoords(x2,y2,&xyz_list[0][0]);
     2920
     2921        normal[0]=cos(atan2(x1-x2,y2-y1));
     2922        normal[1]=sin(atan2(x1-x2,y2-y1));
     2923
     2924        length=sqrt(pow(x2-x1,2)+pow(y2-y1,2));
     2925
     2926        Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input);
     2927        this->parameters->FindParam(&meshtype,MeshTypeEnum);
     2928        Input* vx_input=NULL;
     2929        Input* vy_input=NULL;
     2930        if(meshtype==Mesh2DhorizontalEnum){
     2931                vx_input=inputs->GetInput(VxEnum); _assert_(vx_input);
     2932                vy_input=inputs->GetInput(VyEnum); _assert_(vy_input);
     2933        }
     2934        else{
     2935                vx_input=inputs->GetInput(VxAverageEnum); _assert_(vx_input);
     2936                vy_input=inputs->GetInput(VyAverageEnum); _assert_(vy_input);
     2937        }
     2938
     2939        thickness_input->GetInputValue(&h1, gauss_1);
     2940        thickness_input->GetInputValue(&h2, gauss_2);
     2941        vx_input->GetInputValue(&vx1,gauss_1);
     2942        vx_input->GetInputValue(&vx2,gauss_2);
     2943        vy_input->GetInputValue(&vy1,gauss_1);
     2944        vy_input->GetInputValue(&vy2,gauss_2);
     2945
     2946        mass_flux= rho_ice*length*( 
     2947                                (ONETHIRD*(h1-h2)*(vx1-vx2)+0.5*h2*(vx1-vx2)+0.5*(h1-h2)*vx2+h2*vx2)*normal[0]+
     2948                                (ONETHIRD*(h1-h2)*(vy1-vy2)+0.5*h2*(vy1-vy2)+0.5*(h1-h2)*vy2+h2*vy2)*normal[1]
     2949                                );
     2950
     2951        /*clean up and return:*/
     2952        delete gauss_1;
     2953        delete gauss_2;
     2954        return mass_flux;
    28912955}
    28922956/*}}}*/
  • issm/trunk-jpl/src/c/classes/Elements/Tria.h

    r16387 r16388  
    123123                void       MinVz(IssmDouble* pminvz);
    124124                IssmDouble MassFlux(IssmDouble* segment);
     125                IssmDouble MassFlux(IssmDouble x1,IssmDouble y1, IssmDouble x2, IssmDouble y2,int segment_id);
    125126                void       MaxAbsVx(IssmDouble* pmaxabsvx);
    126127                void       MaxAbsVy(IssmDouble* pmaxabsvy);
  • issm/trunk-jpl/src/c/classes/ExternalResults/GenericExternalResult.h

    r16149 r16388  
    2323        private:
    2424                int        id;
    25                 int        enum_type;
     25                int        enum_type; //in case we have an identifiable enum for this result
     26                char*      enum_string;  //in case this result is only identifiable by a unique string, though arbitrary.
    2627                ResultType value;
    2728                int        M;
     
    3435                void GenericEcho(void){/*{{{*/
    3536                        _printf_("   id: " << this->id << "\n");
    36                         _printf_("   enum:  " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")\n");
     37                        if(this->enum_type!=-1)_printf_("   enum:  " << this->enum_type << " (" << EnumToStringx(this->enum_type) << ")\n");
     38                        else _printf_("   string identified:  " << this->enum_string );
    3739                        _printf_("   step: " << this->step << "\n");
    3840                        _printf_("   time: " << this->time << "\n");
     
    4648
    4749                        /*First write enum: */
    48                         EnumToStringx(&name,this->enum_type);
     50                        if(this->enum_type!=-1)EnumToStringx(&name,this->enum_type);
     51                        else{
     52                                name=xNew<char>(strlen(this->enum_string)+1); xMemCpy<char>(name,enum_string,strlen(this->enum_string)+1);
     53                        }
    4954                        length=(strlen(name)+1)*sizeof(char);
    5055                        fwrite(&length,sizeof(int),1,fid);
     
    6166                GenericExternalResult(){ /*{{{*/
    6267                        id        = 0;
    63                         enum_type = NoneEnum;
     68                        enum_type = -1;
     69                        enum_string= NULL;
    6470                        M         = 0;
    6571                        N         = 0;
     
    6975                GenericExternalResult(int in_id, int in_enum_type,ResultType in_values, int in_M,int in_N,int in_step,IssmDouble in_time){/*{{{*/
    7076                        id        = 0;
    71                         enum_type = NoneEnum;
     77                        enum_type = -1;
     78                        enum_string=NULL;
    7279                        M         = 0;
    7380                        N         = 0;
     
    8087                        id        = in_id;
    8188                        enum_type = in_enum_type;
     89                        enum_string = NULL;
    8290                        value     = in_value;
    8391                        step      = in_step;
     
    8593                }
    8694                /*}}}*/
     95                GenericExternalResult(int in_id, char* in_enum_string,ResultType in_value,int in_step, IssmDouble in_time){ /*{{{*/
     96                        id        = in_id;
     97                        enum_type = -1;
     98                        enum_string = xNew<char>(strlen(in_enum_string)+1); xMemCpy<char>(enum_string,in_enum_string,strlen(in_enum_string)+1);
     99                        value     = in_value;
     100                        step      = in_step;
     101                        time      = in_time;
     102                }
     103                /*}}}*/
    87104                ~GenericExternalResult(){ /*{{{*/
     105                        if(enum_string)xDelete<char>(enum_string);
    88106                } /*}}}*/
    89107
     
    104122                } /*}}}*/
    105123                Object* copy(void) { /*{{{*/
    106                         return new GenericExternalResult<ResultType>(this->id,this->enum_type,this->value,this->step,this->time);
     124                        if(enum_type!=-1) return new GenericExternalResult<ResultType>(this->id,this->enum_type,this->value,this->step,this->time);
     125                        else              return new GenericExternalResult<ResultType>(this->id,this->enum_string,this->value,this->step,this->time);
    107126                } /*}}}*/
    108127
     
    136155} /*}}}*/
    137156void GetResultName(char** pname){ /*{{{*/
    138         EnumToStringx(pname,this->enum_type);
     157        if(this->enum_type!=-1)EnumToStringx(pname,this->enum_type);
     158        else{
     159                char* name=xNew<char>(strlen(enum_string)+1); xMemCpy<char>(name,enum_string,strlen(enum_string)+1);
     160                *pname=name;
     161        }
    139162} /*}}}*/
    140163int GetStep(void){ /*{{{*/
  • issm/trunk-jpl/src/c/classes/FemModel.cpp

    r16374 r16388  
    1313#include "../shared/io/io.h"
    1414#include "./classes.h"
     15#include "./modules/modules.h"
    1516#include "../shared/Enum/Enum.h"
    1617
     
    503504                                results->AddObject(new GenericExternalResult<double>(results->Size()+1,MaxVelEnum,reCast<IssmPDouble>(output_value),step,time));
    504505                        }
     506                        else if (StringToEnumx(output_string,false)==-1){
     507                                /*This response can only be computed by going into the output definitions: */
     508                                output_value=OutputDefinitionsResponsex(this,output_string);
     509                                results->AddObject(new GenericExternalResult<double>(results->Size()+1,output_string,reCast<IssmPDouble>(output_value),step,time));
     510                        }
    505511                        else{
    506512                                /*create this output in the element inputs, and then transfer to results:*/
  • issm/trunk-jpl/src/c/classes/IoModel.cpp

    r16363 r16388  
    10801080}
    10811081/*}}}*/
     1082/*FUNCTION IoModel::FetchMultipleData(char***       pstrings,int* pnumstrings,int data_enum){{{*/
     1083void  IoModel::FetchMultipleData(char*** pstrings,int* pnumstrings,int data_enum){
     1084
     1085        int my_rank;
     1086
     1087        int i;
     1088        int num_instances;
     1089        int* codes=NULL;
     1090
     1091        /*output: */
     1092        int   numstrings=0;
     1093        char** strings=NULL;
     1094
     1095        /*intermediary: */
     1096        char* string=NULL;
     1097        int   string_size;
     1098        int*   code=NULL;
     1099        fpos_t* file_positions=NULL;
     1100
     1101        /*recover my_rank:*/
     1102        my_rank=IssmComm::GetRank();
     1103
     1104        /*Get file pointers to beginning of the data (multiple instances of it): */
     1105        file_positions=this->SetFilePointersToData(&codes,NULL,&num_instances,data_enum);
     1106
     1107        if(num_instances){
     1108
     1109                strings=xNew<char*>(num_instances);
     1110
     1111
     1112                for(i=0;i<num_instances;i++){
     1113
     1114                        fsetpos(fid,file_positions+i);
     1115
     1116                        /*check we are indeed finding a string, not something else: */
     1117                        if(codes[i]!=4)_error_("expecting a string for enum " << EnumToStringx(data_enum));
     1118
     1119                        /*We have to read a string from disk. First read the dimensions of the string, then the string: */
     1120                        if(my_rank==0){ 
     1121                                if(fread(&string_size,sizeof(int),1,fid)!=1) _error_("could not read length of string ");
     1122                        }
     1123
     1124
     1125                        ISSM_MPI_Bcast(&string_size,1,ISSM_MPI_INT,0,IssmComm::GetComm());
     1126
     1127                        /*Now allocate string: */
     1128                        if(string_size){
     1129                                string=xNew<char>((string_size+1));
     1130                                string[string_size]='\0';
     1131
     1132                                /*Read string on node 0, then broadcast: */
     1133                                if(my_rank==0){ 
     1134                                        if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_(" could not read string ");
     1135                                }
     1136                                ISSM_MPI_Bcast(string,string_size,ISSM_MPI_CHAR,0,IssmComm::GetComm());
     1137                        }
     1138                        else{
     1139                                string=xNew<char>(1);
     1140                                string[0]='\0';
     1141                        }
     1142                        strings[i]=string;
     1143                }
     1144
     1145        }
     1146        /*Free ressources:*/
     1147        xDelete<int>(codes);
     1148       
     1149        /*Assign output pointers: */
     1150        *pstrings=strings;
     1151        *pnumstrings=num_instances;
     1152}
     1153/*}}}*/
     1154/*FUNCTION IoModel::FetchMultipleData(IssmDouble*** pmatrices,int** pmdims,int** pndims, int* pM,int data_enum){{{*/
     1155void  IoModel::FetchMultipleData(IssmDouble*** pmatrices,int** pmdims,int** pndims, int* pnumrecords,int data_enum){
     1156
     1157        int i;
     1158        int num_instances;
     1159        int my_rank;
     1160       
     1161        fpos_t* file_positions=NULL;
     1162
     1163        /*output: */
     1164        IssmDouble** matrices=NULL;
     1165        int*     mdims=NULL;
     1166        int*     ndims=NULL;
     1167
     1168        /*intermediary: */
     1169        int     M, N;
     1170        IssmPDouble *pmatrix = NULL;
     1171        IssmDouble *matrix = NULL;
     1172        int*    codes=NULL;
     1173        int     code;
     1174
     1175        /*recover my_rank:*/
     1176        my_rank=IssmComm::GetRank();
     1177       
     1178        /*Get file pointers to beginning of the data (multiple instances of it): */
     1179        file_positions=this->SetFilePointersToData(&codes,NULL,&num_instances,data_enum);
     1180
     1181        if(num_instances){
     1182
     1183                /*Allocate matrices :*/
     1184                matrices=xNew<IssmDouble*>(num_instances);
     1185                mdims=xNew<int>(num_instances);
     1186                ndims=xNew<int>(num_instances);
     1187
     1188                for(i=0;i<num_instances;i++){
     1189
     1190                        fsetpos(fid,file_positions+i);
     1191                        code=codes[i];
     1192
     1193                        if((code!=5) && (code!=6) && (code!=7))_error_("expecting a IssmDouble, integer or boolean matrix for enum " << EnumToStringx(data_enum));
     1194                       
     1195                        /*We have to read a matrix from disk. First read the dimensions of the matrix, then the whole matrix: */
     1196                        /*numberofelements: */
     1197                        if(my_rank==0){ 
     1198                                if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
     1199                        }
     1200                        ISSM_MPI_Bcast(&M,1,ISSM_MPI_INT,0,IssmComm::GetComm());
     1201
     1202                        if(my_rank==0){ 
     1203                                if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
     1204                        }
     1205                        ISSM_MPI_Bcast(&N,1,ISSM_MPI_INT,0,IssmComm::GetComm());
     1206
     1207
     1208                        /*Now allocate matrix: */
     1209                        if(M*N){
     1210                                pmatrix=xNew<IssmPDouble>(M*N);
     1211
     1212                                /*Read matrix on node 0, then broadcast: */
     1213                                if(my_rank==0){ 
     1214                                        if(fread(pmatrix,M*N*sizeof(IssmPDouble),1,fid)!=1) _error_("could not read matrix ");
     1215                                }
     1216                                ISSM_MPI_Bcast(pmatrix,M*N,ISSM_MPI_PDOUBLE,0,IssmComm::GetComm());
     1217
     1218                                _assert_(this->independents);
     1219                                if (this->independents[data_enum]){
     1220                                        /*this data has already been checked out! So cancel all that we've done here, and return
     1221                                         * the data[data_enum] directly: */
     1222                                        matrix=this->data[data_enum];
     1223                                }
     1224                                else{
     1225                                        matrix=xNew<IssmDouble>(M*N);
     1226                                        for (int i=0;i<M*N;++i) matrix[i]=pmatrix[i];
     1227                                }
     1228                                xDelete<IssmPDouble>(pmatrix);
     1229                        }
     1230                        else
     1231                                matrix=NULL;
     1232                       
     1233                       
     1234                        /*Assign: */
     1235                        mdims[i]=M;
     1236                        matrices[i]=matrix;
     1237                        ndims[i]=N;
     1238                }
     1239        }
     1240                       
     1241        /*Free ressources:*/
     1242        xDelete<int>(codes);
     1243
     1244        /*Assign output pointers: */
     1245        *pmatrices=matrices;
     1246        if(pmdims)*pmdims=mdims;
     1247        if(pndims)*pndims=ndims;
     1248        *pnumrecords=num_instances;
     1249}
     1250/*}}}*/
    10821251/*FUNCTION IoModel::FetchDataToInput(Elements* elements,int vector_enum,IssmDouble default_value){{{*/
    10831252void IoModel::FetchDataToInput(Elements* elements,int vector_enum,IssmDouble default_value){
     
    12721441        ISSM_MPI_Bcast(&record_code,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    12731442        ISSM_MPI_Bcast(&vector_type,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    1274         if(record_code==5) ISSM_MPI_Bcast(&vector_type,1,ISSM_MPI_INT,0,IssmComm::GetComm());
    12751443
    12761444        /*Assign output pointers:*/
     
    12811449}
    12821450/*}}}*/
     1451/*FUNCTION IoModel::SetFilePointersToData{{{*/
     1452fpos_t* IoModel::SetFilePointersToData(int** pcodes,int** pvector_types, int* pnum_instances, int data_enum){
     1453
     1454        int  my_rank;
     1455        int  found         = 0;
     1456        int  record_enum;
     1457        int  record_length;
     1458        int  record_code;       //1 to 7 number
     1459        int  vector_type;       //1 to 7 number
     1460        int* vector_types   = NULL;
     1461        int* codes= NULL;
     1462        int  num_instances  = 0;
     1463        int  counter;
     1464        fpos_t* file_positions=NULL;
     1465
     1466        /*recover my_rank:*/
     1467        my_rank=IssmComm::GetRank();
     1468
     1469        /*Go find in the binary file, the data we want to fetch and count the number of
     1470         * instances it appears: */
     1471        if(my_rank==0){
     1472
     1473                /*First set FILE* position to the beginning of the file: */
     1474                fseek(fid,0,SEEK_SET);
     1475
     1476                /*Now march through file looking for the correct data identifier: */
     1477                for(;;){
     1478                        /*Read enum for this size of first string name: */
     1479                        if(fread(&record_enum,sizeof(int),1,fid)==0){
     1480                                /*Ok, we have reached the end of the file. break: */
     1481                                break;
     1482                        }
     1483
     1484                        /*Is this the record sought for? : */
     1485                        if (data_enum==record_enum) num_instances++;
     1486
     1487                        /*Read the record length, and use it to skip the record: */
     1488                        if(fread(&record_length,sizeof(int),1,fid)!=1) _error_("Could not read record_length");
     1489                        fseek(fid,record_length,SEEK_CUR);
     1490                }
     1491
     1492                /*Ok, initialize the number of file handles we are going to return: */
     1493                if(num_instances){
     1494                        file_positions = xNew<fpos_t>(num_instances);
     1495                        codes = xNew<int>(num_instances);
     1496                        vector_types = xNew<int>(num_instances);
     1497                }
     1498
     1499       
     1500                /*Reset FILE* position to the beginning of the file, and start again, this time saving the data information
     1501                 * as we find it: */
     1502                counter=0;
     1503                fseek(fid,0,SEEK_SET);
     1504
     1505                for(;;){
     1506                        /*Read enum for this size of first string name: */
     1507                        if(fread(&record_enum,sizeof(int),1,fid)==0){
     1508                                /*Ok, we have reached the end of the file. break: */
     1509                                break;
     1510                        }
     1511
     1512                        /*Is this the record sought for? : */
     1513                        if (data_enum==record_enum){
     1514                                /*Ok, we have found the correct string. Pass the record length, and read data type code: */
     1515                                fseek(fid,sizeof(int),SEEK_CUR);
     1516                                if(fread(&record_code,sizeof(int),1,fid)!=1) _error_("Could not read record_code");
     1517
     1518                                /*if record_code points to a vector, get its type (nodal or elementary): */
     1519                                if(5<=record_code && record_code<=7){
     1520                                        if(fread(&vector_type,sizeof(int),1,fid)!=1) _error_("Could not read vector_type");
     1521                                }
     1522                                codes[counter]=record_code;
     1523                                vector_types[counter]=vector_type;
     1524                                fgetpos(fid,file_positions+counter);
     1525                               
     1526                                /*backup and skip over the record, as we have more work to do: */
     1527                                if(5<=record_code && record_code<=7) fseek(fid,-sizeof(int),SEEK_CUR);
     1528                                fseek(fid,-sizeof(int),SEEK_CUR);
     1529                                fseek(fid,-sizeof(int),SEEK_CUR);
     1530                               
     1531                                /*increment counter: */
     1532                                counter++;
     1533                        }
     1534
     1535                        /*Read the record length, and use it to skip this record, as it has already been processed: */
     1536                        if(fread(&record_length,sizeof(int),1,fid)!=1) _error_("Could not read record_length");
     1537                        /*skip: */
     1538                        fseek(fid,record_length,SEEK_CUR);
     1539                }
     1540        }
     1541
     1542        /*Broadcast data: */
     1543        ISSM_MPI_Bcast(&num_instances,1,ISSM_MPI_INT,0,IssmComm::GetComm());
     1544        ISSM_MPI_Bcast(codes,num_instances,ISSM_MPI_INT,0,IssmComm::GetComm());
     1545        ISSM_MPI_Bcast(vector_types,num_instances,ISSM_MPI_INT,0,IssmComm::GetComm());
     1546
     1547        /*Assign output pointers:*/
     1548        *pcodes=codes;
     1549        *pnum_instances=num_instances;
     1550        if(pvector_types)*pvector_types=vector_types;
     1551        return file_positions;
     1552}
     1553/*}}}*/
  • issm/trunk-jpl/src/c/classes/IoModel.h

    r16363 r16388  
    7777                void        FetchData(char***   pstringarray,int* pnumstrings,int data_enum);
    7878                void        FetchData(IssmDouble*** pmatrixarray,int** pmdims,int** pndims, int* pnumrecords,int data_enum);
     79                void        FetchMultipleData(char***   pstringarray,int* pnumstrings,int data_enum);
     80                void        FetchMultipleData(IssmDouble*** pmatrixarray,int** pmdims,int** pndims, int* pnumrecords,int data_enum);
    7981                void        FetchData(Option **poption,int data_enum);
    8082                void        FetchData(int num,...);
     
    8385                void        LastIndex(int *pindex);
    8486                FILE*       SetFilePointerToData(int* pcode,int* pvector_type, int data_enum);
     87                fpos_t*     SetFilePointersToData(int** pcodes,int** pvector_types, int* pnum_instances, int data_enum);
    8588                void        DeclareIndependents(void);
    8689                void        StartTrace(void);
  • issm/trunk-jpl/src/c/classes/classes.h

    r16382 r16388  
    1717#include "./IndependentObject.h"
    1818#include "./Segment.h"
     19#include "./Massfluxatgate.h"
    1920
    2021/*Constraints: */
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateParameters.cpp

    r16363 r16388  
    214214        /*}}}*/
    215215
     216        /*Output definitions dataset: */
     217        CreateOutputDefinitions(&parameters,iomodel);
     218
    216219        /*Solution specific parameters*/
    217220        #ifdef _HAVE_HYDROLOGY_
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/MeshDeformation

    • Property svn:ignore set to
      .deps
      .dirstamp
  • issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h

    r16343 r16388  
    2323void CreateParametersHydrologyDCInefficient(Parameters** pparameters,IoModel* iomodel,int solution_type,int analysis_type);
    2424void CreateParametersHydrologyDCEfficient(Parameters** pparameters,IoModel* iomodel,int solution_type,int analysis_type);
     25void CreateOutputDefinitions(Parameters** pparameters,IoModel* iomodel);
    2526void UpdateElementsAndMaterialsControl(Elements* elements,Materials* materials, IoModel* iomodel);
    2627void UpdateElementsAndMaterialsDakota(Elements* elements,Materials* materials, IoModel* iomodel);
  • issm/trunk-jpl/src/c/modules/modules.h

    r16237 r16388  
    7272#include "./NodesDofx/NodesDofx.h"
    7373#include "./Orthx/Orthx.h"
     74#include "./OutputDefinitionsResponsex/OutputDefinitionsResponsex.h"
    7475#include "./OutputResultsx/OutputResultsx.h"
    7576#include "./ConstraintsStatex/ConstraintsStatex.h"
  • issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h

    r16371 r16388  
    546546        WaterColumnOldEnum,
    547547        /*}}}*/
     548        /*Output Definitions{{{*/
     549        OutputdefinitionEnum,
     550        OutputdefinitionEnumsEnum,
     551        MassfluxatgateEnum,
     552        MassfluxatgateNameEnum,
     553        MassfluxatgateSegmentsEnum,
     554        /*}}}*/
    548555        /*Responses{{{*/
    549556        MinVelEnum,
  • issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp

    r16371 r16388  
    535535                case TriaP1ElementResultEnum : return "TriaP1ElementResult";
    536536                case WaterColumnOldEnum : return "WaterColumnOld";
     537                case OutputdefinitionEnum : return "Outputdefinition";
     538                case OutputdefinitionEnumsEnum : return "OutputdefinitionEnums";
     539                case MassfluxatgateEnum : return "Massfluxatgate";
     540                case MassfluxatgateNameEnum : return "MassfluxatgateName";
     541                case MassfluxatgateSegmentsEnum : return "MassfluxatgateSegments";
    537542                case MinVelEnum : return "MinVel";
    538543                case MaxVelEnum : return "MaxVel";
  • issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp

    r16371 r16388  
    547547              else if (strcmp(name,"TriaP1ElementResult")==0) return TriaP1ElementResultEnum;
    548548              else if (strcmp(name,"WaterColumnOld")==0) return WaterColumnOldEnum;
     549              else if (strcmp(name,"Outputdefinition")==0) return OutputdefinitionEnum;
     550              else if (strcmp(name,"OutputdefinitionEnums")==0) return OutputdefinitionEnumsEnum;
     551              else if (strcmp(name,"Massfluxatgate")==0) return MassfluxatgateEnum;
     552              else if (strcmp(name,"MassfluxatgateName")==0) return MassfluxatgateNameEnum;
     553              else if (strcmp(name,"MassfluxatgateSegments")==0) return MassfluxatgateSegmentsEnum;
    549554              else if (strcmp(name,"MinVel")==0) return MinVelEnum;
    550555              else if (strcmp(name,"MaxVel")==0) return MaxVelEnum;
  • issm/trunk-jpl/src/m/classes/masstransport.py

    r16385 r16388  
    6666                md = checkfield(md,'masstransport.min_thickness','>',0)
    6767                if md.masstransport.requested_outputs:
    68                         md = checkfield(md,'masstransport.requested_outputs','size',[1, float('NaN')])
     68                        md = checkfield(md,'masstransport.requested_outputs','cell',1)
    6969
    7070                return md
  • issm/trunk-jpl/src/m/classes/model.m

    r16369 r16388  
    4545
    4646                results          = 0;
     47                outputdefinition = 0;
    4748                radaroverlay     = 0;
    4849                miscellaneous    = 0;
     
    10781079                        md.radaroverlay     = radaroverlay();
    10791080                        md.results          = struct();
     1081                        md.outputdefinition = outputdefinition();
    10801082                        md.miscellaneous    = miscellaneous();
    10811083                        md.private          = private();
     
    11141116                        disp(sprintf('%19s: %-22s -- %s','inversion'       ,['[1x1 ' class(obj.inversion) ']'],'parameters for inverse methods'));
    11151117                        disp(sprintf('%19s: %-22s -- %s','qmu'             ,['[1x1 ' class(obj.qmu) ']'],'dakota properties'));
     1118                        disp(sprintf('%19s: %-22s -- %s','outputdefinition',['[1x1 ' class(obj.outputdefinition) ']'],'output definition'));
    11161119                        disp(sprintf('%19s: %-22s -- %s','results'         ,['[1x1 ' class(obj.results) ']'],'model results'));
    11171120                        disp(sprintf('%19s: %-22s -- %s','radaroverlay'    ,['[1x1 ' class(obj.radaroverlay) ']'],'radar image for plot overlay'));
  • issm/trunk-jpl/src/m/classes/model.py

    r16287 r16388  
    3333from flaim import flaim
    3434from inversion import inversion
     35from outputdefinition import outputdefinition
    3536from qmu import qmu
    3637from results import results
     
    8889
    8990                self.results          = results()
     91                self.outputdefinition = outputdefinition()
    9092                self.radaroverlay     = radaroverlay()
    9193                self.miscellaneous    = miscellaneous()
     
    125127                        'inversion',\
    126128                        'qmu',\
     129                        'outputdefinition',\
    127130                        'results',\
    128131                        'radaroverlay',\
     
    162165                string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("inversion","[%s,%s]" % ("1x1",obj.inversion.__class__.__name__),"parameters for inverse methods"))
    163166                string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("qmu","[%s,%s]" % ("1x1",obj.qmu.__class__.__name__),"dakota properties"))
     167                string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("outputdefinition","[%s,%s]" % ("1x1",obj.outputdefinition.__class__.__name__),"output definition"))
    164168                string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("results","[%s,%s]" % ("1x1",obj.results.__class__.__name__),"model results"))
    165169                string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("radaroverlay","[%s,%s]" % ("1x1",obj.radaroverlay.__class__.__name__),"radar image for plot overlay"))
  • issm/trunk-jpl/src/m/classes/steadystate.py

    r16385 r16388  
    5252
    5353                if md.steadystate.requested_outputs:
    54                         md = checkfield(md,'steadystate.requested_outputs','size',[1, float('nan')])
     54                        md = checkfield(md,'steadystate.requested_outputs','cell',1)
    5555
    5656                return md
  • issm/trunk-jpl/src/m/classes/stressbalance.py

    r16385 r16388  
    124124                md = checkfield(md,'stressbalance.loadingforce','size',[md.mesh.numberofvertices,3])
    125125                if md.stressbalance.requested_outputs:
    126                         md = checkfield(md,'stressbalance.requested_outputs','size',[1, float('NaN')])
     126                        md = checkfield(md,'stressbalance.requested_outputs','cell',1);
    127127
    128128                #singular solution
  • issm/trunk-jpl/src/m/classes/transient.py

    r16385 r16388  
    5757                md = checkfield(md,'transient.isgia','numel',[1],'values',[0,1])
    5858                if md.transient.requested_outputs:
    59                         md = checkfield(md,'transient.requested_outputs','size',[1, float('nan')])
     59                        md = checkfield(md,'transient.requested_outputs','cell',1)
    6060
    6161                return md
  • issm/trunk-jpl/src/m/enum/EnumDefinitions.py

    r16371 r16388  
    527527def TriaP1ElementResultEnum(): return StringToEnum("TriaP1ElementResult")[0]
    528528def WaterColumnOldEnum(): return StringToEnum("WaterColumnOld")[0]
     529def OutputdefinitionEnum(): return StringToEnum("Outputdefinition")[0]
     530def OutputdefinitionEnumsEnum(): return StringToEnum("OutputdefinitionEnums")[0]
     531def MassfluxatgateEnum(): return StringToEnum("Massfluxatgate")[0]
     532def MassfluxatgateNameEnum(): return StringToEnum("MassfluxatgateName")[0]
     533def MassfluxatgateSegmentsEnum(): return StringToEnum("MassfluxatgateSegments")[0]
    529534def MinVelEnum(): return StringToEnum("MinVel")[0]
    530535def MaxVelEnum(): return StringToEnum("MaxVel")[0]
  • issm/trunk-jpl/test/Par/SquareEISMINT.par

    r16167 r16388  
    4646md.timestepping.final_time=500.;
    4747md.timestepping.time_step=1;
     48
     49%output definitions:
     50md.outputdefinition.definitions={...
     51                massfluxatgate('MassFlux1',[pwd '/../Exp/MassFlux1.exp']),...
     52                massfluxatgate('MassFlux2',[pwd '/../Exp/MassFlux2.exp']),...
     53                massfluxatgate('MassFlux3',[pwd '/../Exp/MassFlux3.exp']),...
     54                massfluxatgate('MassFlux4',[pwd '/../Exp/MassFlux4.exp']),...
     55                massfluxatgate('MassFlux5',[pwd '/../Exp/MassFlux5.exp']),...
     56                massfluxatgate('MassFlux6',[pwd '/../Exp/MassFlux6.exp'])...
     57        };
  • issm/trunk-jpl/test/Par/SquareEISMINT.py

    r16170 r16388  
    11import numpy
    22from SetMarineIceSheetBC import SetMarineIceSheetBC
     3from massfluxatgate import massfluxatgate
    34
    45#Ok, start defining model parameters here
     
    4950md.timestepping.final_time=500.
    5051md.timestepping.time_step=1
     52
     53#output definitions:
     54md.outputdefinition.definitions=[
     55                massfluxatgate('MassFlux1',os.getcwd() + '/../Exp/MassFlux1.exp'),
     56                massfluxatgate('MassFlux2',os.getcwd() + '/../Exp/MassFlux2.exp'),
     57                massfluxatgate('MassFlux3',os.getcwd() + '/../Exp/MassFlux3.exp'),
     58                massfluxatgate('MassFlux4',os.getcwd() + '/../Exp/MassFlux4.exp'),
     59                massfluxatgate('MassFlux5',os.getcwd() + '/../Exp/MassFlux5.exp'),
     60                massfluxatgate('MassFlux6',os.getcwd() + '/../Exp/MassFlux6.exp')
     61        ]
  • issm/trunk-jpl/test/Par/SquareSheetConstrained.par

    r16167 r16388  
    6666A=dbstack;
    6767if (length(A)>2), md.miscellaneous.name=A(3).file(1:end-2); end
     68
     69%output definitions:
     70md.outputdefinition.definitions={...
     71                massfluxatgate('MassFlux1',[pwd '/../Exp/MassFlux1.exp']),...
     72                massfluxatgate('MassFlux2',[pwd '/../Exp/MassFlux2.exp']),...
     73                massfluxatgate('MassFlux3',[pwd '/../Exp/MassFlux3.exp']),...
     74                massfluxatgate('MassFlux4',[pwd '/../Exp/MassFlux4.exp']),...
     75                massfluxatgate('MassFlux5',[pwd '/../Exp/MassFlux5.exp']),...
     76                massfluxatgate('MassFlux6',[pwd '/../Exp/MassFlux6.exp'])...
     77        };
  • issm/trunk-jpl/test/Par/SquareSheetConstrained.py

    r16170 r16388  
    77from paterson import paterson
    88from SetIceSheetBC import SetIceSheetBC
     9from massfluxatgate import massfluxatgate
    910
    1011#Start defining model parameters here
     
    7778        md.miscellaneous.name = os.path.basename(inspect.stack()[2][1]).split('.')[0]
    7879
     80#output definitions:
     81md.outputdefinition.definitions=[
     82                massfluxatgate('MassFlux1',os.getcwd() + '/../Exp/MassFlux1.exp'),
     83                massfluxatgate('MassFlux2',os.getcwd() + '/../Exp/MassFlux2.exp'),
     84                massfluxatgate('MassFlux3',os.getcwd() + '/../Exp/MassFlux3.exp'),
     85                massfluxatgate('MassFlux4',os.getcwd() + '/../Exp/MassFlux4.exp'),
     86                massfluxatgate('MassFlux5',os.getcwd() + '/../Exp/MassFlux5.exp'),
     87                massfluxatgate('MassFlux6',os.getcwd() + '/../Exp/MassFlux6.exp')
     88        ]
  • issm/trunk-jpl/test/Par/SquareSheetShelf.par

    r16167 r16388  
    6464A=dbstack;
    6565if (length(A)>2), md.miscellaneous.name=A(3).file(1:end-2); end
     66
     67%output definitions:
     68md.outputdefinition.definitions={...
     69                massfluxatgate('MassFlux1',[pwd '/../Exp/MassFlux1.exp']),...
     70                massfluxatgate('MassFlux2',[pwd '/../Exp/MassFlux2.exp']),...
     71                massfluxatgate('MassFlux3',[pwd '/../Exp/MassFlux3.exp']),...
     72                massfluxatgate('MassFlux4',[pwd '/../Exp/MassFlux4.exp']),...
     73                massfluxatgate('MassFlux5',[pwd '/../Exp/MassFlux5.exp']),...
     74                massfluxatgate('MassFlux6',[pwd '/../Exp/MassFlux6.exp'])...
     75        };
  • issm/trunk-jpl/test/Par/SquareSheetShelf.py

    r16171 r16388  
    77from paterson import paterson
    88from SetMarineIceSheetBC import SetMarineIceSheetBC
     9from massfluxatgate import massfluxatgate
    910
    1011#Start defining model parameters here
     
    7576if len(inspect.stack()) > 2:
    7677        md.miscellaneous.name = os.path.basename(inspect.stack()[2][1]).split('.')[0]
     78       
     79#output definitions:
     80md.outputdefinition.definitions=[
     81                massfluxatgate('MassFlux1',os.getcwd() + '/../Exp/MassFlux1.exp'),
     82                massfluxatgate('MassFlux2',os.getcwd() + '/../Exp/MassFlux2.exp'),
     83                massfluxatgate('MassFlux3',os.getcwd() + '/../Exp/MassFlux3.exp'),
     84                massfluxatgate('MassFlux4',os.getcwd() + '/../Exp/MassFlux4.exp'),
     85                massfluxatgate('MassFlux5',os.getcwd() + '/../Exp/MassFlux5.exp'),
     86                massfluxatgate('MassFlux6',os.getcwd() + '/../Exp/MassFlux6.exp')
     87        ]
  • issm/trunk-jpl/test/Par/SquareShelf.par

    r16167 r16388  
    5757A=dbstack;
    5858if (length(A)>2), md.miscellaneous.name=A(3).file(1:end-2); end
     59
     60%output definitions:
     61md.outputdefinition.definitions={...
     62                massfluxatgate('MassFlux1',[pwd '/../Exp/MassFlux1.exp']),...
     63                massfluxatgate('MassFlux2',[pwd '/../Exp/MassFlux2.exp']),...
     64                massfluxatgate('MassFlux3',[pwd '/../Exp/MassFlux3.exp']),...
     65                massfluxatgate('MassFlux4',[pwd '/../Exp/MassFlux4.exp']),...
     66                massfluxatgate('MassFlux5',[pwd '/../Exp/MassFlux5.exp']),...
     67                massfluxatgate('MassFlux6',[pwd '/../Exp/MassFlux6.exp'])...
     68        };
  • issm/trunk-jpl/test/Par/SquareShelf.py

    r16171 r16388  
    77from paterson import paterson
    88from SetIceShelfBC import SetIceShelfBC
     9from massfluxatgate import massfluxatgate
    910
    1011#Start defining model parameters here
     
    8889if len(inspect.stack()) > 2:
    8990        md.miscellaneous.name=os.path.basename(inspect.stack()[2][1]).split('.')[0]
     91       
     92#output definitions:
     93md.outputdefinition.definitions=[
     94                massfluxatgate('MassFlux1',os.getcwd() + '/../Exp/MassFlux1.exp'),
     95                massfluxatgate('MassFlux2',os.getcwd() + '/../Exp/MassFlux2.exp'),
     96                massfluxatgate('MassFlux3',os.getcwd() + '/../Exp/MassFlux3.exp'),
     97                massfluxatgate('MassFlux4',os.getcwd() + '/../Exp/MassFlux4.exp'),
     98                massfluxatgate('MassFlux5',os.getcwd() + '/../Exp/MassFlux5.exp'),
     99                massfluxatgate('MassFlux6',os.getcwd() + '/../Exp/MassFlux6.exp')
     100        ]
  • issm/trunk-jpl/test/Par/SquareShelf2.par

    r16167 r16388  
    5757A=dbstack;
    5858if (length(A)>2), md.miscellaneous.name=A(3).file(1:end-2); end
     59
     60%output definitions:
     61md.outputdefinition.definitions={...
     62                massfluxatgate('MassFlux1',[pwd '/../Exp/MassFlux1.exp']),...
     63                massfluxatgate('MassFlux2',[pwd '/../Exp/MassFlux2.exp']),...
     64                massfluxatgate('MassFlux3',[pwd '/../Exp/MassFlux3.exp']),...
     65                massfluxatgate('MassFlux4',[pwd '/../Exp/MassFlux4.exp']),...
     66                massfluxatgate('MassFlux5',[pwd '/../Exp/MassFlux5.exp']),...
     67                massfluxatgate('MassFlux6',[pwd '/../Exp/MassFlux6.exp'])...
     68        };
  • issm/trunk-jpl/test/Par/SquareShelf2.py

    r16171 r16388  
    77from paterson import paterson
    88from SetIceShelfBC import SetIceShelfBC
     9from massfluxatgate import massfluxatgate
    910
    1011#Start defining model parameters here
     
    8889if len(inspect.stack()) > 2:
    8990        md.miscellaneous.name=os.path.basename(inspect.stack()[2][1]).split('.')[0]
     91       
     92#output definitions:
     93md.outputdefinition.definitions=[
     94                massfluxatgate('MassFlux1',os.getcwd() + '/../Exp/MassFlux1.exp'),
     95                massfluxatgate('MassFlux2',os.getcwd() + '/../Exp/MassFlux2.exp'),
     96                massfluxatgate('MassFlux3',os.getcwd() + '/../Exp/MassFlux3.exp'),
     97                massfluxatgate('MassFlux4',os.getcwd() + '/../Exp/MassFlux4.exp'),
     98                massfluxatgate('MassFlux5',os.getcwd() + '/../Exp/MassFlux5.exp'),
     99                massfluxatgate('MassFlux6',os.getcwd() + '/../Exp/MassFlux6.exp')
     100        ]
  • issm/trunk-jpl/test/Par/SquareShelfConstrained.par

    r16167 r16388  
    6161A=dbstack;
    6262if (length(A)>2), md.miscellaneous.name=A(3).file(1:end-2); end
     63
     64%output definitions:
     65md.outputdefinition.definitions={...
     66                massfluxatgate('MassFlux1',[pwd '/../Exp/MassFlux1.exp']),...
     67                massfluxatgate('MassFlux2',[pwd '/../Exp/MassFlux2.exp']),...
     68                massfluxatgate('MassFlux3',[pwd '/../Exp/MassFlux3.exp']),...
     69                massfluxatgate('MassFlux4',[pwd '/../Exp/MassFlux4.exp']),...
     70                massfluxatgate('MassFlux5',[pwd '/../Exp/MassFlux5.exp']),...
     71                massfluxatgate('MassFlux6',[pwd '/../Exp/MassFlux6.exp'])...
     72        };
  • issm/trunk-jpl/test/Par/SquareShelfConstrained.py

    r16170 r16388  
    77from paterson import paterson
    88from SetIceShelfBC import SetIceShelfBC
     9from massfluxatgate import massfluxatgate
    910
    1011#Start defining model parameters here
     
    7374        md.miscellaneous.name = os.path.basename(inspect.stack()[2][1]).split('.')[0]
    7475
     76#output definitions:
     77md.outputdefinition.definitions=[
     78                massfluxatgate('MassFlux1',os.getcwd() + '/../Exp/MassFlux1.exp'),
     79                massfluxatgate('MassFlux2',os.getcwd() + '/../Exp/MassFlux2.exp'),
     80                massfluxatgate('MassFlux3',os.getcwd() + '/../Exp/MassFlux3.exp'),
     81                massfluxatgate('MassFlux4',os.getcwd() + '/../Exp/MassFlux4.exp'),
     82                massfluxatgate('MassFlux5',os.getcwd() + '/../Exp/MassFlux5.exp'),
     83                massfluxatgate('MassFlux6',os.getcwd() + '/../Exp/MassFlux6.exp')
     84        ]
  • issm/trunk-jpl/test/Par/SquareThermal.par

    r16227 r16388  
    4343md.basalforcings.geothermalflux=zeros(md.mesh.numberofvertices,1);
    4444md.basalforcings.geothermalflux(find(md.mask.groundedice_levelset>0.))=1.*10^-3; %1 mW/m^2
     45
     46%output definitions:
     47md.outputdefinition.definitions={...
     48                massfluxatgate('MassFlux1',[pwd '/../Exp/MassFlux1.exp']),...
     49                massfluxatgate('MassFlux2',[pwd '/../Exp/MassFlux2.exp']),...
     50                massfluxatgate('MassFlux3',[pwd '/../Exp/MassFlux3.exp']),...
     51                massfluxatgate('MassFlux4',[pwd '/../Exp/MassFlux4.exp']),...
     52                massfluxatgate('MassFlux5',[pwd '/../Exp/MassFlux5.exp']),...
     53                massfluxatgate('MassFlux6',[pwd '/../Exp/MassFlux6.exp'])...
     54        };
  • issm/trunk-jpl/test/Par/SquareThermal.py

    r16170 r16388  
    22from paterson import paterson
    33from SetMarineIceSheetBC import SetMarineIceSheetBC
     4from massfluxatgate import massfluxatgate
    45
    56#Ok, start defining model parameters here
     
    4748md.basalforcings.geothermalflux=numpy.zeros((md.mesh.numberofvertices,1))
    4849md.basalforcings.geothermalflux[numpy.nonzero(md.mask.groundedice_levelset>0.)[0]]=1.*10**-3    #1 mW/m^2
     50
     51#output definitions:
     52md.outputdefinition.definitions=[
     53                massfluxatgate('MassFlux1',os.getcwd() + '/../Exp/MassFlux1.exp'),
     54                massfluxatgate('MassFlux2',os.getcwd() + '/../Exp/MassFlux2.exp'),
     55                massfluxatgate('MassFlux3',os.getcwd() + '/../Exp/MassFlux3.exp'),
     56                massfluxatgate('MassFlux4',os.getcwd() + '/../Exp/MassFlux4.exp'),
     57                massfluxatgate('MassFlux5',os.getcwd() + '/../Exp/MassFlux5.exp'),
     58                massfluxatgate('MassFlux6',os.getcwd() + '/../Exp/MassFlux6.exp')
     59        ]
Note: See TracChangeset for help on using the changeset viewer.