Ignore:
Timestamp:
05/08/13 21:00:42 (12 years ago)
Author:
adhikari
Message:

CHG: dWdt now assembles solution properly in parallel runs as well

File:
1 edited

Legend:

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

    r14970 r14971  
    18811881void  Tria::InputUpdateFromVector(IssmDouble* vector, int name, int type){
    18821882
    1883        
    18841883        const int   numdof         = NDOF1 *NUMVERTICES;
    18851884        int        *doflist        = NULL;
     
    18901889
    18911890        switch(type){
     1891        #ifdef _HAVE_GIA_
     1892        case GiaAnalysisEnum:
     1893                InputUpdateFromVectorGia(vector);
     1894                break;
     1895        #endif
    18921896        case VertexEnum:
    18931897                /*Get values on the 3 vertices*/
     
    19021906                        this->inputs->AddInput(new TriaP1Input(name,values));
    19031907                }
    1904                 return;
     1908                return; 
    19051909
    19061910        case NodesEnum:
     
    19151919                /*Add input to the element: */
    19161920                this->inputs->AddInput(new TriaP1Input(name,values));
     1921               
    19171922                /*Free ressources:*/
    19181923                xDelete<int>(doflist);
     
    19201925
    19211926        default:
    1922        
    1923                         _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
    1924         }
     1927                _error_("type " << type << " (" << EnumToStringx(type) << ") not implemented yet");
     1928        }
     1929
    19251930}
    19261931/*}}}*/
     
    32353240        /*Add input to the element: */
    32363241        this->inputs->AddInput(new TriaP1Input(GiaWEnum,values));
     3242
     3243}
     3244/*}}}*/
     3245/*FUNCTION Tria::InputUpdateFromVectorGia{{{*/
     3246void  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));
    32373262
    32383263}
Note: See TracChangeset for help on using the changeset viewer.