Changeset 14987


Ignore:
Timestamp:
05/09/13 11:05:17 (12 years ago)
Author:
adhikari
Message:

CHG: removed InputUpdateFromSolutionGia and modified InputUpdateFromVector

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

Legend:

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

    r14971 r14987  
    17621762                        break;
    17631763                #endif
    1764                 #ifdef _HAVE_GIA_
    1765                 case GiaAnalysisEnum:
    1766                         InputUpdateFromSolutionGia(solution);
    1767                         break;
    1768                 #endif
    17691764                case BedSlopeXAnalysisEnum:
    17701765                        InputUpdateFromSolutionOneDof(solution,BedSlopeXEnum);
     
    18891884
    18901885        switch(type){
    1891         #ifdef _HAVE_GIA_
    1892         case GiaAnalysisEnum:
    1893                 InputUpdateFromVectorGia(vector);
    1894                 break;
    1895         #endif
    1896         case VertexEnum:
     1886        case VertexPIdEnum:
    18971887                /*Get values on the 3 vertices*/
    18981888                for (int i=0;i<3;i++){
    18991889                        values[i]=vector[this->nodes[i]->GetVertexPid()];
     1890                }
     1891                /*update input*/
     1892                if (name==MaterialsRheologyBbarEnum || name==MaterialsRheologyBEnum || name==MaterialsRheologyZEnum || name==MaterialsRheologyZbarEnum){
     1893                        material->inputs->AddInput(new TriaP1Input(name,values));
     1894                }
     1895                else{
     1896                        this->inputs->AddInput(new TriaP1Input(name,values));
     1897                }
     1898                return;
     1899
     1900        case VertexSIdEnum:
     1901                /*Get values on the 3 vertices*/
     1902                for (int i=0;i<3;i++){
     1903                        values[i]=vector[this->nodes[i]->GetVertexSid()];
    19001904                }
    19011905                /*update input*/
     
    20722076                                name==GradientEnum ||
    20732077                                name==OldGradientEnum ||
    2074         name==ConvergedEnum ||
     2078                 name==ConvergedEnum ||
    20752079                                name==BasisIntegralEnum ||
    20762080                                name==QmuVxEnum ||
     
    32213225
    32223226        return;
    3223 }
    3224 /*}}}*/
    3225 /*FUNCTION Tria::InputUpdateFromSolutionGia{{{*/
    3226 void  Tria::InputUpdateFromSolutionGia(IssmDouble* solution){
    3227 
    3228         int vertexsidlist[NUMVERTICES];
    3229         IssmDouble    values[NUMVERTICES];
    3230 
    3231         /*Get sid list: */
    3232         this->GetVertexSidList(&vertexsidlist[0]);
    3233 
    3234         /*Use the dof list to index into the solution vector: */
    3235         for(int i=0;i<NUMVERTICES;i++){
    3236                 values[i]=solution[vertexsidlist[i]];
    3237                 if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in solution vector");
    3238         }
    3239 
    3240         /*Add input to the element: */
    3241         this->inputs->AddInput(new TriaP1Input(GiaWEnum,values));
    3242 
    3243 }
    3244 /*}}}*/
    3245 /*FUNCTION Tria::InputUpdateFromVectorGia{{{*/
    3246 void  Tria::InputUpdateFromVectorGia(IssmDouble* vector){
    3247 
    3248         int vertexsidlist[NUMVERTICES];
    3249         IssmDouble    values[NUMVERTICES];
    3250 
    3251         /*Get sid list: */
    3252         this->GetVertexSidList(&vertexsidlist[0]);
    3253 
    3254         /*Use the dof list to index into the solution vector: */
    3255         for(int i=0;i<NUMVERTICES;i++){
    3256                 values[i]=vector[vertexsidlist[i]];
    3257                 if(xIsNan<IssmDouble>(values[i])) _error_("NaN found in solution vector");
    3258         }
    3259 
    3260         /*Add input to the element: */
    3261         this->inputs->AddInput(new TriaP1Input(GiadWdtEnum,values));
    3262 
    32633227}
    32643228/*}}}*/
  • issm/trunk-jpl/src/c/classes/objects/Elements/Tria.h

    r14971 r14987  
    142142                #ifdef _HAVE_GIA_
    143143                void   GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,IssmDouble* x,IssmDouble* y);
    144                 void   InputUpdateFromSolutionGia(IssmDouble* solution);
    145                 void   InputUpdateFromVectorGia(IssmDouble* vector);
    146144                #endif
    147145
Note: See TracChangeset for help on using the changeset viewer.