Changeset 15670


Ignore:
Timestamp:
08/01/13 11:28:17 (12 years ago)
Author:
Mathieu Morlighem
Message:

BUG: do not change time unit in dakota input update

Location:
issm/trunk-jpl/src/c/classes/Elements
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Penta.cpp

    r15667 r15670  
    62086208                        switch(name){
    62096209                                case ThicknessEnum:
    6210                                         /*Update thickness + surface: assume bed is constant. On ice shelves, takes hydrostatic equilibrium {{{*/
     6210                                        /*Update thickness + surface: assume bed is constant. On ice shelves, takes hydrostatic equilibrium*/
    62116211                                        IssmDouble  thickness[6];
    62126212                                        IssmDouble  thickness_init[6];
     
    62746274                                        this->inputs->AddInput(new PentaInput(SurfaceEnum,surface,P1Enum));
    62756275
    6276                                         /*}}}*/
    62776276                                        break;
    62786277                                default:
     
    63006299void  Penta::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){
    63016300
    6302         int i,j,t;
    6303         TransientInput* transientinput=NULL;
    6304         IssmDouble values[6];
    6305         IssmDouble time;
    6306         int row;
    6307         IssmDouble yts;
     6301        int             i,t,row;
     6302        IssmDouble      time;
     6303        TransientInput *transientinput = NULL;
     6304        IssmDouble      values[6];
    63086305
    63096306        /*Check that name is an element input*/
     
    63136310
    63146311                case VertexEnum:
    6315 
    63166312                        /*Create transient input: */
    6317 
    6318                         parameters->FindParam(&yts,ConstantsYtsEnum);
    6319 
    63206313                        for(t=0;t<ncols;t++){ //ncols is the number of times
    63216314
     
    63236316                                for(i=0;i<6;i++){
    63246317                                        row=this->vertices[i]->Sid();
    6325                                         values[i]=(IssmDouble)matrix[ncols*row+t];
     6318                                        values[i]=matrix[ncols*row+t];
    63266319                                }
    63276320
    6328                                 /*time? :*/
    6329                                 time=(IssmDouble)matrix[(nrows-1)*ncols+t]*yts;
     6321                                /*time:*/
     6322                                time=matrix[(nrows-1)*ncols+t];
    63306323
    63316324                                if(t==0) transientinput=new TransientInput(name);
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r15667 r15670  
    68196819void  Tria::InputUpdateFromMatrixDakota(IssmDouble* matrix, int nrows, int ncols, int name, int type){
    68206820
    6821         int i,j,t;
    6822         TransientInput* transientinput=NULL;
    6823         IssmDouble values[3];
    6824         IssmDouble time;
    6825         int row;
    6826         IssmDouble yts;
     6821        int             i,t,row;
     6822        IssmDouble      time;
     6823        TransientInput *transientinput = NULL;
     6824        IssmDouble      values[3];
    68276825
    68286826        /*Check that name is an element input*/
     
    68326830
    68336831                case VertexEnum:
    6834 
    68356832                        /*Create transient input: */
    6836 
    6837                         parameters->FindParam(&yts,ConstantsYtsEnum);
    68386833                        for(t=0;t<ncols;t++){ //ncols is the number of times
    68396834
     
    68416836                                for(i=0;i<3;i++){
    68426837                                        row=this->vertices[i]->Sid();
    6843                                         values[i]=(IssmDouble)matrix[ncols*row+t];
     6838                                        values[i]=matrix[ncols*row+t];
    68446839                                }
    68456840
    6846                                 /*time? :*/
    6847                                 time=(IssmDouble)matrix[(nrows-1)*ncols+t]*yts;
     6841                                /*time:*/
     6842                                time=matrix[(nrows-1)*ncols+t];
    68486843
    68496844                                if(t==0) transientinput=new TransientInput(name);
Note: See TracChangeset for help on using the changeset viewer.