Changeset 13410


Ignore:
Timestamp:
09/20/12 16:39:15 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: renaming vertex->dof vertex->pid for consistency (id, sid and pid) and cleaned up some code

Location:
issm/trunk-jpl/src/c
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/Container/Vertices.cpp

    r12459 r13410  
    3838
    3939/*Numerics management*/
    40 /*FUNCTION Vertices::DistributeDofs{{{*/
    41 void  Vertices::DistributeDofs(int numberofobjects,int numberofdofsperobject){
     40/*FUNCTION Vertices::DistributePids{{{*/
     41void  Vertices::DistributePids(int numberofobjects){
    4242
    4343        extern int num_procs;
     
    4545
    4646        int  i;
    47         int  dofcount=0;
    48         int* alldofcount=NULL;
    49         int* truedofs=NULL;
    50         int* alltruedofs=NULL;
     47        int  pidcount    = 0;
     48        int *allpidcount = NULL;
     49        int *truepids    = NULL;
     50        int *alltruepids = NULL;
    5151
    52         /*Go through objects, and distribute dofs locally, from 0 to numberofdofsperobject*/
     52        /*Go through objects, and distribute pids locally, from 0 to numberofpidsperobject*/
    5353        for (i=0;i<this->Size();i++){
    5454                Vertex* vertex=(Vertex*)this->GetObjectByOffset(i);
    55                 vertex->DistributeDofs(&dofcount);
     55                vertex->DistributePids(&pidcount);
    5656        }
    5757
    58         /* Now every object has distributed dofs, but locally, and with a dof count starting from
    59          * 0. This means the dofs between all the cpus are not unique. We now offset the dofs of eache
    60          * cpus by the total last dofs of the previus cpu, starting from 0.
    61          * First: bet number of dofs for each cpu*/
    62         alldofcount=xNew<int>(num_procs);
     58        /* Now every object has distributed pids, but locally, and with a pid count starting from
     59         * 0. This means the pids between all the cpus are not unique. We now offset the pids of each
     60         * cpus by the total last pids of the previus cpu, starting from 0.
     61         * First: get number of pids for each cpu*/
     62        allpidcount=xNew<int>(num_procs);
    6363        #ifdef _HAVE_MPI_
    64         MPI_Gather(&dofcount,1,MPI_INT,alldofcount,1,MPI_INT,0,MPI_COMM_WORLD);
    65         MPI_Bcast(alldofcount,num_procs,MPI_INT,0,MPI_COMM_WORLD);
     64        MPI_Gather(&pidcount,1,MPI_INT,allpidcount,1,MPI_INT,0,MPI_COMM_WORLD);
     65        MPI_Bcast(allpidcount,num_procs,MPI_INT,0,MPI_COMM_WORLD);
    6666        #else
    67         alldofcount[0]=dofcount;
     67        allpidcount[0]=pidcount;
    6868        #endif
    6969
    70         /* Every cpu should start its own dof count at the end of the dofcount from cpu-1*/
    71         dofcount=0;
     70        /* Every cpu should start its own pid count at the end of the pidcount from cpu-1*/
     71        pidcount=0;
    7272        if(my_rank!=0){
    7373                for(i=0;i<my_rank;i++){
    74                         dofcount+=alldofcount[i];
     74                        pidcount+=allpidcount[i];
    7575                }
    7676        }
    7777        for (i=0;i<this->Size();i++){
    7878                Vertex* vertex=(Vertex*)this->GetObjectByOffset(i);
    79                 vertex->OffsetDofs(dofcount);
     79                vertex->OffsetPids(pidcount);
    8080        }
    8181
    8282        /* Finally, remember that cpus may have skipped some objects, because they were clones. For every
    83          * object that is not a clone, tell them to show their dofs, so that later on, they can get picked
     83         * object that is not a clone, tell them to show their pids, so that later on, they can get picked
    8484         * up by their clones: */
    85         truedofs   =xNewZeroInit<int>(numberofobjects*numberofdofsperobject);
    86         alltruedofs=xNewZeroInit<int>(numberofobjects*numberofdofsperobject);
     85        truepids   =xNewZeroInit<int>(numberofobjects);
     86        alltruepids=xNewZeroInit<int>(numberofobjects);
    8787        for (i=0;i<this->Size();i++){
    8888                Vertex* vertex=(Vertex*)this->GetObjectByOffset(i);
    89                 vertex->ShowTrueDofs(truedofs);
     89                vertex->ShowTruePids(truepids);
    9090        }
    9191        #ifdef _HAVE_MPI_
    92         MPI_Allreduce((void*)truedofs,(void*)alltruedofs,numberofobjects*numberofdofsperobject,MPI_INT,MPI_MAX,MPI_COMM_WORLD);
     92        MPI_Allreduce((void*)truepids,(void*)alltruepids,numberofobjects,MPI_INT,MPI_MAX,MPI_COMM_WORLD);
    9393        #else
    94         for(i=0;i<numberofobjects*numberofdofsperobject;i++)alltruedofs[i]=truedofs[i];
     94        for(i=0;i<numberofobjects;i++)alltruepids[i]=truepids[i];
    9595        #endif
    9696
    97         /* Now every cpu knows the true dofs of everyone else that is not a clone*/
    98         for (i=0;i<this->Size();i++){
     97        /* Now every cpu knows the true pids of everyone else that is not a clone*/
     98        for(i=0;i<this->Size();i++){
    9999                Vertex* vertex=(Vertex*)this->GetObjectByOffset(i);
    100                 vertex->UpdateCloneDofs(alltruedofs);
     100                vertex->UpdateClonePids(alltruepids);
    101101        }
    102102
    103103        /* Free ressources: */
    104         xDelete<int>(alldofcount);
    105         xDelete<int>(truedofs);
    106         xDelete<int>(alltruedofs);
     104        xDelete<int>(allpidcount);
     105        xDelete<int>(truepids);
     106        xDelete<int>(alltruepids);
    107107}
    108108/*}}}*/
  • issm/trunk-jpl/src/c/Container/Vertices.h

    r12365 r13410  
    1919        public:
    2020
    21                 /*constructors, destructors: {{{*/
     21                /*constructors, destructors:*/
    2222                Vertices();
    2323                ~Vertices();
    24                 /*}}}*/
    25                 /*numerics: {{{*/
    26                 void  DistributeDofs(int numberofnodes,int numdofspernode);
     24
     25                /*numerics:*/
     26                void  DistributePids(int numberofnodes);
    2727                void  FlagClones(int numberofnodes);
    2828                int   NumberOfVertices(void);
    2929                void  Ranks(int* ranks);
    30                 /*}}}*/
    31 
    3230};
    3331
  • issm/trunk-jpl/src/c/classes/objects/Elements/Penta.cpp

    r13216 r13410  
    815815}
    816816/*}}}*/
    817 /*FUNCTION Penta::GetDofList1 {{{*/
    818 void  Penta::GetDofList1(int* doflist){
     817/*FUNCTION Penta::GetVertexPidList {{{*/
     818void  Penta::GetVertexPidList(int* doflist){
    819819
    820820        int i;
    821         for(i=0;i<6;i++) doflist[i]=nodes[i]->GetDofList1();
     821        for(i=0;i<6;i++) doflist[i]=nodes[i]->GetVertexPid();
     822
     823}
     824/*}}}*/
     825/*FUNCTION Penta::GetVertexSidList{{{*/
     826void  Penta::GetVertexSidList(int* sidlist){
     827
     828        int i;
     829        for(i=0;i<NUMVERTICES;i++) sidlist[i]=nodes[i]->GetVertexSid();
    822830
    823831}
     
    9951003         *    = 4 * mu * eps_eff ^2*/
    9961004        *phi=4*pow(epsilon_eff,2.0)*viscosity;
    997 }
    998 /*}}}*/
    999 /*FUNCTION Penta::GetSidList{{{*/
    1000 void  Penta::GetSidList(int* sidlist){
    1001 
    1002         int i;
    1003         for(i=0;i<NUMVERTICES;i++) sidlist[i]=nodes[i]->GetSidList();
    1004 
    10051005}
    10061006/*}}}*/
     
    11351135void  Penta::GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum){
    11361136
    1137         int doflist1[NUMVERTICES];
     1137        int vertexpidlist[NUMVERTICES];
    11381138
    11391139        /*Get out if this is not an element input*/
     
    11411141
    11421142        /*Prepare index list*/
    1143         this->GetDofList1(&doflist1[0]);
     1143        this->GetVertexPidList(&vertexpidlist[0]);
    11441144
    11451145        /*Get input (either in element or material)*/
     
    11481148
    11491149        /*We found the enum.  Use its values to fill into the vector, using the vertices ids: */
    1150         input->GetVectorFromInputs(vector,&doflist1[0]);
     1150        input->GetVectorFromInputs(vector,&vertexpidlist[0]);
    11511151}
    11521152/*}}}*/
     
    11601160        } 
    11611161        if(interp==P1Enum){
    1162                 int doflist1[NUMVERTICES];
     1162                int vertexpidlist[NUMVERTICES];
    11631163                int connectivity[NUMVERTICES];
    1164                 this->GetSidList(&doflist1[0]);
     1164                this->GetVertexSidList(&vertexpidlist[0]);
    11651165                this->GetConnectivityList(&connectivity[0]);
    1166                 elementresult->GetVectorFromResults(vector,&doflist1[0],&connectivity[0],NUMVERTICES);
     1166                elementresult->GetVectorFromResults(vector,&vertexpidlist[0],&connectivity[0],NUMVERTICES);
    11671167        }
    11681168        else if(interp==P0Enum){
     
    19601960                                /*Get values on the 6 vertices*/
    19611961                                for (int i=0;i<6;i++){
    1962                                         values[i]=vector[this->nodes[i]->GetVertexDof()];
     1962                                        values[i]=vector[this->nodes[i]->GetVertexPid()];
    19631963                                }
    19641964
     
    44634463void Penta::ControlInputGetGradient(Vector<IssmDouble>* gradient,int enum_type,int control_index){
    44644464
    4465         int doflist1[NUMVERTICES];
     4465        int vertexpidlist[NUMVERTICES];
    44664466        Input* input=NULL;
    44674467
     
    44814481        if (input->ObjectEnum()!=ControlInputEnum) _error_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
    44824482
    4483         GradientIndexing(&doflist1[0],control_index);
    4484         ((ControlInput*)input)->GetGradient(gradient,&doflist1[0]);
     4483        GradientIndexing(&vertexpidlist[0],control_index);
     4484        ((ControlInput*)input)->GetGradient(gradient,&vertexpidlist[0]);
    44854485
    44864486}/*}}}*/
     
    45074507void Penta::ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index){
    45084508
    4509         int    doflist1[NUMVERTICES];
     4509        int    vertexpidlist[NUMVERTICES];
    45104510        IssmDouble grad_list[NUMVERTICES];
    45114511        Input* grad_input=NULL;
     
    45244524        if (input->ObjectEnum()!=ControlInputEnum) _error_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
    45254525
    4526         GradientIndexing(&doflist1[0],control_index);
    4527         for(int i=0;i<NUMVERTICES;i++) grad_list[i]=gradient[doflist1[i]];
     4526        GradientIndexing(&vertexpidlist[0],control_index);
     4527        for(int i=0;i<NUMVERTICES;i++) grad_list[i]=gradient[vertexpidlist[i]];
    45284528        grad_input=new PentaP1Input(GradientEnum,grad_list);
    45294529        ((ControlInput*)input)->SetGradient(grad_input);
     
    48024802        /*get gradient indices*/
    48034803        for(int i=0;i<NUMVERTICES;i++){
    4804                 indexing[i]=num_controls*this->nodes[i]->GetVertexDof() + control_index;
     4804                indexing[i]=num_controls*this->nodes[i]->GetVertexPid() + control_index;
    48054805        }
    48064806
     
    49154915        int        i,j,ig;
    49164916        int        analysis_type;
    4917         int        doflist1[NUMVERTICES];
     4917        int        vertexpidlist[NUMVERTICES];
    49184918        IssmDouble     vx,vy,lambda,mu,alpha_complement,Jdet;
    49194919        IssmDouble     bed,thickness,Neff,drag;
     
    49324932        /*Retrieve all inputs and parameters*/
    49334933        parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    4934         GradientIndexing(&doflist1[0],control_index);
     4934        GradientIndexing(&vertexpidlist[0],control_index);
    49354935        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    49364936        for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<2;j++) xyz_list_tria[i][j]=xyz_list[i][j];
     
    49744974                }
    49754975        }
    4976         gradient->SetValues(NUMVERTICES,doflist1,grade_g,ADD_VAL);
     4976        gradient->SetValues(NUMVERTICES,vertexpidlist,grade_g,ADD_VAL);
    49774977
    49784978        /*Clean up and return*/
     
    49864986        int        i,j,ig;
    49874987        int        analysis_type;
    4988         int        doflist1[NUMVERTICES];
     4988        int        vertexpidlist[NUMVERTICES];
    49894989        IssmDouble     bed,thickness,Neff;
    49904990        IssmDouble     lambda,mu,xi,Jdet,vx,vy,vz;
     
    50075007        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    50085008        for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<2;j++) xyz_list_tria[i][j]=xyz_list[i][j];
    5009         GradientIndexing(&doflist1[0],control_index);
     5009        GradientIndexing(&vertexpidlist[0],control_index);
    50105010        Input* drag_input    =inputs->GetInput(FrictionCoefficientEnum); _assert_(drag_input);
    50115011        Input* vx_input      =inputs->GetInput(VxEnum);                  _assert_(vx_input);
     
    50675067        }
    50685068
    5069         gradient->SetValues(NUMVERTICES,doflist1,grade_g,ADD_VAL);
     5069        gradient->SetValues(NUMVERTICES,vertexpidlist,grade_g,ADD_VAL);
    50705070
    50715071        delete friction;
     
    54945494void  Penta::GetVectorFromControlInputs(Vector<IssmDouble>* vector,int control_enum,int control_index,const char* data){
    54955495
    5496         int doflist1[NUMVERTICES];
     5496        int vertexpidlist[NUMVERTICES];
    54975497
    54985498        /*Get out if this is not an element input*/
     
    55005500
    55015501        /*Prepare index list*/
    5502         GradientIndexing(&doflist1[0],control_index);
     5502        GradientIndexing(&vertexpidlist[0],control_index);
    55035503
    55045504        /*Get input (either in element or material)*/
     
    55115511        }
    55125512
    5513         ((ControlInput*)input)->GetVectorFromInputs(vector,&doflist1[0],data);
     5513        ((ControlInput*)input)->GetVectorFromInputs(vector,&vertexpidlist[0],data);
    55145514}
    55155515/*}}}*/
     
    55185518
    55195519        IssmDouble  values[NUMVERTICES];
    5520         int     doflist1[NUMVERTICES];
     5520        int     vertexpidlist[NUMVERTICES];
    55215521        Input  *input     = NULL;
    55225522        Input  *new_input = NULL;
     
    55265526
    55275527        /*Prepare index list*/
    5528         GradientIndexing(&doflist1[0],control_index);
     5528        GradientIndexing(&vertexpidlist[0],control_index);
    55295529
    55305530        /*Get values on vertices*/
    55315531        for (int i=0;i<NUMVERTICES;i++){
    5532                 values[i]=vector[doflist1[i]];
     5532                values[i]=vector[vertexpidlist[i]];
    55335533        }
    55345534        new_input = new PentaP1Input(control_enum,values);
     
    55695569                        /*Get values on the 6 vertices*/
    55705570                        for (i=0;i<6;i++){
    5571                                 values[i]=vector[this->nodes[i]->GetSidList()]; //careful, vector of values here is not parallel distributed, but serial distributed (from a serial Dakota core!)
     5571                                values[i]=vector[this->nodes[i]->GetVertexSid()]; //careful, vector of values here is not parallel distributed, but serial distributed (from a serial Dakota core!)
    55725572                        }
    55735573
     
    56895689                                /*create input values: */
    56905690                                for(i=0;i<6;i++){
    5691                                         row=this->nodes[i]->GetSidList();
     5691                                        row=this->nodes[i]->GetVertexSid();
    56925692                                        values[i]=(IssmDouble)matrix[ncols*row+t];
    56935693                                }
  • issm/trunk-jpl/src/c/classes/objects/Elements/Penta.h

    r13216 r13410  
    174174                ElementVector* CreatePVectorSlope(void);
    175175                void      GetDofList(int** pdoflist,int approximation_enum,int setenum);
    176                 void      GetDofList1(int* doflist);
    177                 void    GetSidList(int* sidlist);
     176                void      GetVertexPidList(int* doflist);
     177                void    GetVertexSidList(int* sidlist);
    178178                void    GetConnectivityList(int* connectivity);
    179179                int     GetElementType(void);
  • issm/trunk-jpl/src/c/classes/objects/Elements/Tria.cpp

    r13216 r13410  
    140140
    141141        /*Figure out the average for this element: */
    142         this->GetSidList(&offsetsid[0]);
    143         this->GetDofList1(&offsetdof[0]);
     142        this->GetVertexSidList(&offsetsid[0]);
     143        this->GetVertexPidList(&offsetdof[0]);
    144144        mean=0;
    145145        for(i=0;i<NUMVERTICES;i++){
     
    10551055}
    10561056/*}}}*/
    1057 /*FUNCTION Tria::GetDofList1 {{{*/
    1058 void  Tria::GetDofList1(int* doflist){
    1059 
    1060         int i;
    1061         for(i=0;i<3;i++) doflist[i]=nodes[i]->GetDofList1();
    1062 
    1063 }
    1064 /*}}}*/
    10651057/*FUNCTION Tria::GetElementType {{{*/
    10661058int Tria::GetElementType(){
     
    11801172}
    11811173/*}}}*/
    1182 /*FUNCTION Tria::GetSidList {{{*/
    1183 void  Tria::GetSidList(int* sidlist){
    1184         for(int i=0;i<NUMVERTICES;i++) sidlist[i]=nodes[i]->GetSidList();
     1174/*FUNCTION Tria::GetVertexPidList {{{*/
     1175void  Tria::GetVertexPidList(int* doflist){
     1176
     1177        int i;
     1178        for(i=0;i<3;i++) doflist[i]=nodes[i]->GetVertexPid();
     1179
     1180}
     1181/*}}}*/
     1182/*FUNCTION Tria::GetVertexSidList {{{*/
     1183void  Tria::GetVertexSidList(int* sidlist){
     1184        for(int i=0;i<NUMVERTICES;i++) sidlist[i]=nodes[i]->GetVertexSid();
    11851185}
    11861186/*}}}*/
     
    12431243void  Tria::GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum){
    12441244
    1245         int doflist1[NUMVERTICES];
     1245        int vertexpidlist[NUMVERTICES];
    12461246
    12471247        /*Get out if this is not an element input*/
     
    12491249
    12501250        /*Prepare index list*/
    1251         this->GetDofList1(&doflist1[0]);
     1251        this->GetVertexPidList(&vertexpidlist[0]);
    12521252
    12531253        /*Get input (either in element or material)*/
     
    12561256
    12571257        /*We found the enum.  Use its values to fill into the vector, using the vertices ids: */
    1258         input->GetVectorFromInputs(vector,&doflist1[0]);
     1258        input->GetVectorFromInputs(vector,&vertexpidlist[0]);
    12591259}
    12601260/*}}}*/
     
    12681268        }
    12691269        if(interp==P1Enum){
    1270                 int doflist1[NUMVERTICES];
     1270                int vertexpidlist[NUMVERTICES];
    12711271                int connectivity[NUMVERTICES];
    1272                 this->GetSidList(&doflist1[0]);
     1272                this->GetVertexSidList(&vertexpidlist[0]);
    12731273                this->GetConnectivityList(&connectivity[0]);
    1274                 elementresult->GetVectorFromResults(vector,&doflist1[0],&connectivity[0],NUMVERTICES);
     1274                elementresult->GetVectorFromResults(vector,&vertexpidlist[0],&connectivity[0],NUMVERTICES);
    12751275        }
    12761276        else if(interp==P0Enum){
     
    16871687                        /*Get values on the 3 vertices*/
    16881688                        for (int i=0;i<3;i++){
    1689                                 values[i]=vector[this->nodes[i]->GetVertexDof()];
     1689                                values[i]=vector[this->nodes[i]->GetVertexPid()];
    16901690                        }
    16911691
     
    34323432void Tria::ControlInputGetGradient(Vector<IssmDouble>* gradient,int enum_type,int control_index){
    34333433
    3434         int doflist1[NUMVERTICES];
     3434        int vertexpidlist[NUMVERTICES];
    34353435        Input* input=NULL;
    34363436
     
    34443444        if (input->ObjectEnum()!=ControlInputEnum) _error_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
    34453445
    3446         GradientIndexing(&doflist1[0],control_index);
    3447         ((ControlInput*)input)->GetGradient(gradient,&doflist1[0]);
     3446        GradientIndexing(&vertexpidlist[0],control_index);
     3447        ((ControlInput*)input)->GetGradient(gradient,&vertexpidlist[0]);
    34483448
    34493449}/*}}}*/
     
    34673467void Tria::ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index){
    34683468
    3469         int    doflist1[NUMVERTICES];
     3469        int    vertexpidlist[NUMVERTICES];
    34703470        IssmDouble grad_list[NUMVERTICES];
    34713471        Input* grad_input=NULL;
     
    34813481        if (input->ObjectEnum()!=ControlInputEnum) _error_("Input " << EnumToStringx(enum_type) << " is not a ControlInput");
    34823482
    3483         GradientIndexing(&doflist1[0],control_index);
    3484         for(int i=0;i<NUMVERTICES;i++) grad_list[i]=gradient[doflist1[i]];
     3483        GradientIndexing(&vertexpidlist[0],control_index);
     3484        for(int i=0;i<NUMVERTICES;i++) grad_list[i]=gradient[vertexpidlist[i]];
    34853485        grad_input=new TriaP1Input(GradientEnum,grad_list);
    34863486
     
    35563556
    35573557        int        i,ig;
    3558         int        doflist1[NUMVERTICES];
     3558        int        vertexpidlist[NUMVERTICES];
    35593559        IssmDouble     Jdet,weight;
    35603560        IssmDouble     xyz_list[NUMVERTICES][3];
     
    35663566        /*Retrieve all inputs we will be needing: */
    35673567        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    3568         GradientIndexing(&doflist1[0],control_index);
     3568        GradientIndexing(&vertexpidlist[0],control_index);
    35693569        Input* rheologyb_input=material->inputs->GetInput(MaterialsRheologyBbarEnum); _assert_(rheologyb_input);
    35703570        Input* weights_input=inputs->GetInput(InversionCostFunctionsCoefficientsEnum);                _assert_(weights_input);
     
    35863586                for (i=0;i<NUMVERTICES;i++) grade_g[i]+=-weight*Jdet*gauss->weight*(dbasis[0][i]*dk[0]+dbasis[1][i]*dk[1]);
    35873587        }
    3588         gradient->SetValues(NUMVERTICES,doflist1,grade_g,ADD_VAL);
     3588        gradient->SetValues(NUMVERTICES,vertexpidlist,grade_g,ADD_VAL);
    35893589
    35903590        /*Clean up and return*/
     
    35963596
    35973597        int        i,ig;
    3598         int        doflist1[NUMVERTICES];
     3598        int        vertexpidlist[NUMVERTICES];
    35993599        IssmDouble     Jdet,weight;
    36003600        IssmDouble     xyz_list[NUMVERTICES][3];
     
    36063606        /*Retrieve all inputs we will be needing: */
    36073607        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    3608         GradientIndexing(&doflist1[0],control_index);
     3608        GradientIndexing(&vertexpidlist[0],control_index);
    36093609        Input* rheologyz_input=material->inputs->GetInput(MaterialsRheologyZbarEnum); _assert_(rheologyz_input);
    36103610        Input* weights_input=inputs->GetInput(InversionCostFunctionsCoefficientsEnum);                _assert_(weights_input);
     
    36263626                for (i=0;i<NUMVERTICES;i++) grade_g[i]+=-weight*Jdet*gauss->weight*(dbasis[0][i]*dk[0]+dbasis[1][i]*dk[1]);
    36273627        }
    3628         gradient->SetValues(NUMVERTICES,doflist1,grade_g,ADD_VAL);
     3628        gradient->SetValues(NUMVERTICES,vertexpidlist,grade_g,ADD_VAL);
    36293629
    36303630        /*Clean up and return*/
     
    37513751        int        i,ig;
    37523752        int        analysis_type;
    3753         int        doflist1[NUMVERTICES];
     3753        int        vertexpidlist[NUMVERTICES];
    37543754        int        connectivity[NUMVERTICES];
    37553755        IssmDouble     vx,vy,lambda,mu,alpha_complement,Jdet;
     
    37693769        parameters->FindParam(&analysis_type,AnalysisTypeEnum);
    37703770        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    3771         GradientIndexing(&doflist1[0],control_index);
     3771        GradientIndexing(&vertexpidlist[0],control_index);
    37723772        this->GetConnectivityList(&connectivity[0]);
    37733773
     
    38273827        /*End Analytical gradient*/
    38283828
    3829         gradient->SetValues(NUMVERTICES,doflist1,grade_g,ADD_VAL);
     3829        gradient->SetValues(NUMVERTICES,vertexpidlist,grade_g,ADD_VAL);
    38303830
    38313831        /*Clean up and return*/
     
    38383838
    38393839        int        i,ig;
    3840         int        doflist1[NUMVERTICES];
     3840        int        vertexpidlist[NUMVERTICES];
    38413841        IssmDouble     Jdet,weight;
    38423842        IssmDouble     xyz_list[NUMVERTICES][3];
     
    38493849        if(IsFloating())return;
    38503850        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    3851         GradientIndexing(&doflist1[0],control_index);
     3851        GradientIndexing(&vertexpidlist[0],control_index);
    38523852        Input* dragcoefficient_input=inputs->GetInput(FrictionCoefficientEnum); _assert_(dragcoefficient_input);
    38533853        Input* weights_input=inputs->GetInput(InversionCostFunctionsCoefficientsEnum);                 _assert_(weights_input);
     
    38723872                }
    38733873        }
    3874         gradient->SetValues(NUMVERTICES,doflist1,grade_g,ADD_VAL);
     3874        gradient->SetValues(NUMVERTICES,vertexpidlist,grade_g,ADD_VAL);
    38753875
    38763876        /*Clean up and return*/
     
    38823882
    38833883        /*Intermediaries*/
    3884         int    doflist1[NUMVERTICES];
     3884        int    vertexpidlist[NUMVERTICES];
    38853885        IssmDouble lambda[NUMVERTICES];
    38863886        IssmDouble gradient_g[NUMVERTICES];
    38873887
    38883888        /*Compute Gradient*/
    3889         GradientIndexing(&doflist1[0],control_index);
     3889        GradientIndexing(&vertexpidlist[0],control_index);
    38903890        GetInputListOnVertices(&lambda[0],AdjointEnum);
    38913891        for(int i=0;i<NUMVERTICES;i++) gradient_g[i]=-lambda[i];
    38923892
    3893         gradient->SetValues(NUMVERTICES,doflist1,gradient_g,INS_VAL);
     3893        gradient->SetValues(NUMVERTICES,vertexpidlist,gradient_g,INS_VAL);
    38943894}
    38953895/*}}}*/
     
    38993899        /*Intermediaries*/
    39003900        int        i,ig;
    3901         int        doflist1[NUMVERTICES];
     3901        int        vertexpidlist[NUMVERTICES];
    39023902        IssmDouble     thickness,Jdet;
    39033903        IssmDouble     basis[3];
     
    39093909        /* Get node coordinates and dof list: */
    39103910        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    3911         GradientIndexing(&doflist1[0],control_index);
     3911        GradientIndexing(&vertexpidlist[0],control_index);
    39123912
    39133913        /*Retrieve all inputs we will be needing: */
     
    39313931        }
    39323932
    3933         gradient->SetValues(NUMVERTICES,doflist1,grade_g,ADD_VAL);
     3933        gradient->SetValues(NUMVERTICES,vertexpidlist,grade_g,ADD_VAL);
    39343934
    39353935        /*Clean up and return*/
     
    39423942        /*Intermediaries*/
    39433943        int        i,ig;
    3944         int        doflist1[NUMVERTICES];
     3944        int        vertexpidlist[NUMVERTICES];
    39453945        IssmDouble     thickness,Jdet;
    39463946        IssmDouble     basis[3];
     
    39523952        /* Get node coordinates and dof list: */
    39533953        GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
    3954         GradientIndexing(&doflist1[0],control_index);
     3954        GradientIndexing(&vertexpidlist[0],control_index);
    39553955
    39563956        /*Retrieve all inputs we will be needing: */
     
    39733973                for(i=0;i<NUMVERTICES;i++) grade_g[i]+=thickness*Dlambda[1]*Jdet*gauss->weight*basis[i];
    39743974        }
    3975         gradient->SetValues(NUMVERTICES,doflist1,grade_g,ADD_VAL);
     3975        gradient->SetValues(NUMVERTICES,vertexpidlist,grade_g,ADD_VAL);
    39763976
    39773977        /*Clean up and return*/
     
    39883988        /*get gradient indices*/
    39893989        for(int i=0;i<NUMVERTICES;i++){
    3990                 indexing[i]=num_controls*this->nodes[i]->GetVertexDof() + control_index;
     3990                indexing[i]=num_controls*this->nodes[i]->GetVertexPid() + control_index;
    39913991        }
    39923992
     
    52055205void  Tria::GetVectorFromControlInputs(Vector<IssmDouble>* vector,int control_enum,int control_index,const char* data){
    52065206
    5207         int doflist1[NUMVERTICES];
     5207        int vertexpidlist[NUMVERTICES];
    52085208        Input *input=NULL;
    52095209
     
    52125212
    52135213        /*Prepare index list*/
    5214         GradientIndexing(&doflist1[0],control_index);
     5214        GradientIndexing(&vertexpidlist[0],control_index);
    52155215
    52165216        /*Get input (either in element or material)*/
     
    52275227        }
    52285228
    5229         ((ControlInput*)input)->GetVectorFromInputs(vector,&doflist1[0],data);
     5229        ((ControlInput*)input)->GetVectorFromInputs(vector,&vertexpidlist[0],data);
    52305230}
    52315231/*}}}*/
     
    52345234
    52355235        IssmDouble  values[NUMVERTICES];
    5236         int     doflist1[NUMVERTICES];
     5236        int     vertexpidlist[NUMVERTICES];
    52375237        Input  *input     = NULL;
    52385238        Input  *new_input = NULL;
     
    52425242
    52435243        /*Prepare index list*/
    5244         GradientIndexing(&doflist1[0],control_index);
     5244        GradientIndexing(&vertexpidlist[0],control_index);
    52455245
    52465246        /*Get values on vertices*/
    52475247        for (int i=0;i<NUMVERTICES;i++){
    5248                 values[i]=vector[doflist1[i]];
     5248                values[i]=vector[vertexpidlist[i]];
    52495249        }
    52505250        new_input = new TriaP1Input(control_enum,values);
     
    55565556                        /*Get values on the 3 vertices*/
    55575557                        for (i=0;i<3;i++){
    5558                                 values[i]=vector[this->nodes[i]->GetSidList()]; //careful, vector of values here is not parallel distributed, but serial distributed (from a serial Dakota core!)
     5558                                values[i]=vector[this->nodes[i]->GetVertexSidList()]; //careful, vector of values here is not parallel distributed, but serial distributed (from a serial Dakota core!)
    55595559                        }
    55605560
     
    56625662                                /*create input values: */
    56635663                                for(i=0;i<3;i++){
    5664                                         row=this->nodes[i]->GetSidList();
     5664                                        row=this->nodes[i]->GetVertexSidList();
    56655665                                        values[i]=(IssmDouble)matrix[ncols*row+t];
    56665666                                }
  • issm/trunk-jpl/src/c/classes/objects/Elements/Tria.h

    r13216 r13410  
    190190                int            GetElementType(void);
    191191                void             GetDofList(int** pdoflist,int approximation_enum,int setenum);
    192                 void             GetDofList1(int* doflist);
    193                 void           GetSidList(int* sidlist);
     192                void             GetVertexPidList(int* doflist);
     193                void           GetVertexSidList(int* sidlist);
    194194                void           GetConnectivityList(int* connectivity);
    195195                void           GetInputListOnVertices(IssmDouble* pvalue,int enumtype);
  • issm/trunk-jpl/src/c/classes/objects/Materials/Matdamageice.cpp

    r13216 r13410  
    210210                        /*Prepare index list*/
    211211                        int doflist1[3];
    212                         for(int i=0;i<3;i++) doflist1[i]=((Tria*)element)->nodes[i]->GetVertexDof();
     212                        for(int i=0;i<3;i++) doflist1[i]=((Tria*)element)->nodes[i]->GetVertexPid();
    213213
    214214                        /*Get input (either in element or material)*/
     
    640640                                case TriaEnum: {
    641641                                        IssmDouble values[3];
    642                                         for (int i=0;i<3;i++) values[i]=vector[((Tria*)element)->nodes[i]->GetVertexDof()];
     642                                        for (int i=0;i<3;i++) values[i]=vector[((Tria*)element)->nodes[i]->GetVertexPid()];
    643643                                        this->inputs->AddInput(new TriaP1Input(name,values));
    644644                                        return;
     
    682682                                case TriaEnum: {
    683683                                        IssmDouble values[3];
    684                                         for (int i=0;i<3;i++) values[i]=vector[((Tria*)element)->nodes[i]->GetSidList()]; //use sid list, to index into serial oriented vector
     684                                        for (int i=0;i<3;i++) values[i]=vector[((Tria*)element)->nodes[i]->GetVertexSid()]; //use sid list, to index into serial oriented vector
    685685                                        this->inputs->AddInput(new TriaP1Input(name,values));
    686686                                        /*Special case for rheology B in 2D: Pourave land for this solution{{{*/
  • issm/trunk-jpl/src/c/classes/objects/Materials/Matice.cpp

    r13216 r13410  
    190190                        /*Prepare index list*/
    191191                        int doflist1[3];
    192                         for(int i=0;i<3;i++) doflist1[i]=((Tria*)element)->nodes[i]->GetVertexDof();
     192                        for(int i=0;i<3;i++) doflist1[i]=((Tria*)element)->nodes[i]->GetVertexPid();
    193193
    194194                        /*Get input (either in element or material)*/
     
    560560                                case TriaEnum: {
    561561                                        IssmDouble values[3];
    562                                         for (int i=0;i<3;i++) values[i]=vector[((Tria*)element)->nodes[i]->GetVertexDof()];
     562                                        for (int i=0;i<3;i++) values[i]=vector[((Tria*)element)->nodes[i]->GetVertexPid()];
    563563                                        this->inputs->AddInput(new TriaP1Input(name,values));
    564564                                        return;
     
    602602                                case TriaEnum: {
    603603                                        IssmDouble values[3];
    604                                         for (int i=0;i<3;i++) values[i]=vector[((Tria*)element)->nodes[i]->GetSidList()]; //use sid list, to index into serial oriented vector
     604                                        for (int i=0;i<3;i++) values[i]=vector[((Tria*)element)->nodes[i]->GetVertexSid()]; //index into serial oriented vector
    605605                                        this->inputs->AddInput(new TriaP1Input(name,values));
    606606                                        /*Special case for rheology B in 2D: Pourave land for this solution{{{*/
  • issm/trunk-jpl/src/c/classes/objects/Node.cpp

    r13315 r13410  
    234234
    235235} /*}}}*/
    236 /*FUNCTION Node::GetDofList1{{{*/
    237 int  Node::GetDofList1(void){
    238 
    239         Vertex* vertex=NULL;
    240 
    241         vertex=(Vertex*)this->hvertex->delivers();
    242 
    243         return vertex->dof;
    244 }
    245 /*}}}*/
    246236/*FUNCTION Node::GetDofList{{{*/
    247237void  Node::GetDofList(int* outdoflist,int approximation_enum,int setenum){
     
    304294                else _error_("set of enum type " << EnumToStringx(setenum) << " not supported yet!");
    305295        }
    306 }
    307 /*}}}*/
    308 /*FUNCTION Node::GetSidList{{{*/
    309 int  Node::GetSidList(void){
    310 
    311         Vertex* vertex=NULL;
    312 
    313         vertex=(Vertex*)this->hvertex->delivers();
    314 
    315         return vertex->sid;
    316296}
    317297/*}}}*/
     
    427407}
    428408/*}}}*/
    429 /*FUNCTION Node::GetVertexDof {{{*/
    430 int   Node::GetVertexDof(void){
     409/*FUNCTION Node::GetVertexPid{{{*/
     410int   Node::GetVertexPid(void){
    431411
    432412        Vertex*  vertex=NULL;
    433413
    434414        vertex=(Vertex*)hvertex->delivers();
    435         return vertex->dof;
     415        return vertex->pid;
     416}
     417/*}}}*/
     418/*FUNCTION Node::GetVertexSid{{{*/
     419int  Node::GetVertexSid(void){
     420
     421        Vertex* vertex=NULL;
     422
     423        vertex=(Vertex*)this->hvertex->delivers();
     424
     425        return vertex->sid;
    436426}
    437427/*}}}*/
     
    446436/*}}}*/
    447437#endif
    448 /*FUNCTION Node::SetVertexDof {{{*/
    449 void   Node::SetVertexDof(int in_dof){
    450 
    451         Vertex*  vertex=NULL;
    452 
    453         vertex=(Vertex*)hvertex->delivers();
    454         vertex->dof=in_dof;
    455 
    456 }
    457 /*}}}*/
    458438/*FUNCTION Node::InAnalysis{{{*/
    459439bool Node::InAnalysis(int in_analysis_type){
     
    887867/*}}}*/
    888868
    889 /* DofObject routines:*/
     869/* indexing routines:*/
    890870/*FUNCTION Node::DistributeDofs{{{*/
    891871void  Node::DistributeDofs(int* pdofcount,int setenum){
     
    935915}
    936916/*}}}*/
    937 /*FUNCTION Node::Off_setDofs{{{*/
     917/*FUNCTION Node::OffsetDofs{{{*/
    938918void  Node::OffsetDofs(int dofcount,int setenum){
    939919       
  • issm/trunk-jpl/src/c/classes/objects/Node.h

    r13216 r13410  
    6767                void   SetCurrentConfiguration(DataSet* nodes,Vertices* vertices);
    6868                int    Sid(void);
    69                 int    GetVertexDof(void);
    70                 int    GetVertexId(void);
    7169#ifdef _HAVE_DIAGNOSTIC_
    7270                void   GetCoordinateSystem(IssmDouble* coord_system_out);
    7371#endif
    74                 void   SetVertexDof(int in_dof);
    7572                bool   InAnalysis(int analysis_type);
    7673                int    GetApproximation();
     
    8683                void   GetDofList(int* poutdoflist,int approximation_enum,int setenum);
    8784                void   GetLocalDofList(int* poutdoflist,int approximation_enum,int setenum);
    88                 int    GetDofList1(void);
    89                 int    GetSidList(void);
     85                int    GetVertexId(void);
     86                int    GetVertexPid(void);
     87                int    GetVertexSid(void);
    9088                IssmDouble GetX();
    9189                IssmDouble GetY();
  • issm/trunk-jpl/src/c/classes/objects/Vertex.cpp

    r13216 r13410  
    4949        this->id=vertex_id;
    5050        this->sid=vertex_sid;
     51        this->pid=UNDEF;
    5152        this->x=vertex_x;
    5253        this->y=vertex_y;
     
    5455        this->sigma=vertex_sigma;
    5556        this->connectivity=vertex_connectivity;
    56         this->dof=UNDEF;
    5757
    5858        return;
     
    6767        _printLine_("   id: " << id);
    6868        _printLine_("   sid: " << sid);
     69        _printLine_("   pid: " << pid);
    6970        _printLine_("   x: " << x);
    7071        _printLine_("   y: " << y);
     
    7273        _printLine_("   sigma: " << sigma);
    7374        _printLine_("   connectivity: " << connectivity);
    74         _printLine_("   dof: " << dof);
    7575        _printLine_("   clone: " << clone);
    7676
     
    107107/*}}}*/
    108108
    109 /* DofObject routines: */
    110 /*FUNCTION Vertex::DistributeDofs{{{*/
    111 void  Vertex::DistributeDofs(int* pdofcount){
    112 
    113         int i;
    114         extern int my_rank;
    115         int dofcount;
    116 
    117         dofcount=*pdofcount;
    118        
    119         if(this->clone){
    120                 /*This vertex is a clone! Don't distribute dofs, it will get them from another cpu!*/
    121                 return;
    122         }
    123 
    124         /*This vertex should distribute his dof, go ahead: */
    125         this->dof=dofcount;
    126         dofcount++;
    127 
    128         /*Assign output pointers: */
    129         *pdofcount=dofcount;
    130 
    131 }
    132 /*}}}*/
    133 /*FUNCTION Vertex::OffsetDofs{{{*/
    134 void  Vertex::OffsetDofs(int dofcount){
    135        
    136         int i;
    137         extern int my_rank;
    138        
    139         if(this->clone){
    140                 /*This vertex is a clone, don't offset the dofs!: */
    141                 return;
    142         }
    143 
    144         /*This vertex should offset his dof, go ahead: */
    145         this->dof+=dofcount;
    146 }
    147 /*}}}*/
    148 /*FUNCTION Vertex::ShowTrueDofs{{{*/
    149 void  Vertex::ShowTrueDofs(int* truedofs){
    150 
    151         int j;
    152         extern int my_rank;
    153        
    154         /*Are we a clone? : */
    155         if(this->clone)return;
    156 
    157         /*Ok, we are not a clone, just plug our dof into truedofs: */
    158         truedofs[this->id-1]=this->dof;
    159 
    160 }
    161 /*}}}*/
    162 /*FUNCTION Vertex::UpdateCloneDofs{{{*/
    163 void  Vertex::UpdateCloneDofs(int* alltruedofs){
    164 
    165         int j;
    166         extern int my_rank;
    167        
    168         /*If we are not a clone, don't update, we already have dofs!: */
    169         if(this->clone==0)return;
    170 
    171         /*Ok, we are a clone node, but we did not create the dof for this vertex
    172          * Therefore, our dof is garbage right now. Go pick it up in the alltruedofs: */
    173         this->dof=alltruedofs[id-1];
    174 }
    175 /*}}}*/
    176 /*FUNCTION Vertex::SetClone {{{*/
    177 void  Vertex::SetClone(int* minranks){
    178 
    179         extern int my_rank;
    180 
    181         if (minranks[id-1]==my_rank){
    182                 this->clone=0;
    183         }
    184         else{
    185                 /*!there is a cpu with lower rank that has the same vertex,
    186                 therefore, I am a clone*/
    187                 this->clone=1; 
    188         }
    189 
    190 }
    191 /*}}}*/
    192 
    193109/*Vertex management: */
    194110/*FUNCTION Vertex::Connectivity{{{*/
     
    209125        /*sigma remains constant. z=bed+sigma*thickness*/
    210126        oldz = this->z;
    211         newz = bed[this->dof]+sigma*thickness[this->dof];
     127        newz = bed[this->pid]+sigma*thickness[this->pid];
    212128        velz = (newz-oldz)/dt;
    213129        this->z = newz;
    214130
    215131        /*put vz in vector*/
    216         vz->SetValue(this->dof,velz,INS_VAL);
     132        vz->SetValue(this->pid,velz,INS_VAL);
    217133}
    218134/*}}}*/
     135/*FUNCTION Vertex::DistributePids{{{*/
     136void  Vertex::DistributePids(int* ppidcount){
     137
     138        /*retrieve current pid*/
     139        int pidcount=*ppidcount;
     140       
     141        /*This vertex is a clone! Don't distribute pids, it will get them from another cpu!*/
     142        if(this->clone) return;
     143
     144        /*This vertex should distribute its pid*/
     145        this->pid=pidcount;
     146        pidcount++;
     147
     148        /*Assign output pointers: */
     149        *ppidcount=pidcount;
     150}
     151/*}}}*/
     152/*FUNCTION Vertex::OffsetPids{{{*/
     153void  Vertex::OffsetPids(int pidcount){
     154       
     155        /*This vertex is a clone, don't offset the pids*/
     156        if(this->clone) return;
     157
     158        /*This vertex should offset his pid, go ahead: */
     159        this->pid+=pidcount;
     160}
     161/*}}}*/
     162/*FUNCTION Vertex::ShowTruePids{{{*/
     163void  Vertex::ShowTruePids(int* truepids){
     164
     165        /*Are we a clone? : */
     166        if(this->clone)return;
     167
     168        /*Ok, we are not a clone, just plug our pid into truepids: */
     169        truepids[this->sid]=this->pid;
     170}
     171/*}}}*/
     172/*FUNCTION Vertex::UpdateClonePids{{{*/
     173void  Vertex::UpdateClonePids(int* alltruepids){
     174
     175        /*If we are not a clone, don't update, we already have pids: */
     176        if(!this->clone)return;
     177
     178        /*Ok, we are a clone node, but we did not create the pid for this vertex
     179         * Therefore, our pid is garbage right now. Go pick it up in the alltruepids: */
     180        this->pid=alltruepids[this->pid];
     181}
     182/*}}}*/
     183/*FUNCTION Vertex::SetClone {{{*/
     184void  Vertex::SetClone(int* minranks){
     185
     186        extern int my_rank;
     187
     188        if (minranks[this->sid]==my_rank){
     189                this->clone=false;
     190        }
     191        else{
     192                /*!there is a cpu with lower rank that has the same vertex,
     193                therefore, I am a clone*/
     194                this->clone=true;
     195        }
     196
     197}
     198/*}}}*/
     199
  • issm/trunk-jpl/src/c/classes/objects/Vertex.h

    r13216 r13410  
    2222
    2323        public:
    24 
    25                 int    id;
    26                 int    sid;            //sid for "serial" id, ie the rank of this vertex in the vertices dataset, if the dataset was serial on 1 cpu.
     24                bool       clone;
     25                int        id;           // random index
     26                int        sid;          // "serial" id (rank of this vertex if the dataset was on 1 cpu)
     27                int        pid;          // "parallel" id
    2728                IssmDouble x;
    2829                IssmDouble y;
    2930                IssmDouble z;
    30                 IssmDouble sigma;          //sigma coordinate: (z-bed)/thickness
    31                 int    connectivity;   //number of vertices connected to this vertex
    32 
    33                 /*dof management: */
    34                 int    clone;
    35                 int    dof; //dof to recover values in a vertex indexed vector
     31                IssmDouble sigma;        //sigma coordinate: (z-bed)/thickness
     32                int        connectivity; //number of vertices connected to this vertex
    3633
    3734                /*Vertex constructors, destructors {{{*/
     
    5047                Object* copy();
    5148                /*}}}*/
    52                 /*DofObject routines {{{*/
    53                 void  DistributeDofs(int* pdofcount);
    54                 void  OffsetDofs(int dofcount);
    55                 void  ShowTrueDofs(int* borderdofs);
    56                 void  UpdateCloneDofs(int* allborderdofs);
    57                 void  SetClone(int* minranks);
    58                 /*}}}*/
    59                 /*Vertex management: {{{*/
     49                /*Vertex management:*/
    6050                int   Sid(void);
    6151                int   Connectivity(void);
    6252                void  UpdatePosition(Vector<IssmDouble>* vz,Parameters* parameters,IssmDouble* thickness,IssmDouble* bed);
    63                 /*}}}*/
     53                void  DistributePids(int* ppidcount);
     54                void  OffsetPids(int pidcount);
     55                void  ShowTruePids(int* borderpids);
     56                void  UpdateClonePids(int* allborderpids);
     57                void  SetClone(int* minranks);
    6458};
    6559#endif  /* _VERTEX_H */
  • issm/trunk-jpl/src/c/modules/VerticesDofx/VerticesDofx.cpp

    r6232 r13410  
    1111void VerticesDofx( Vertices* vertices, Parameters* parameters) {
    1212
    13         int i;
    14 
    15         int  found=0;
    16         extern int num_procs;
    17         extern int my_rank;
    18        
    1913        /*intermediary: */
    2014        int  numberofvertices;
     
    2317        numberofvertices=vertices->NumberOfVertices();
    2418
    25         /*Ensure that only for each cpu, the partition border vertices only will be taken into account once
    26          * across the cluster. To do so, we flag all the clone vertices: */
     19        /*Ensure that only for each cpu, the partition border vertices only will be
     20         * taken into account once across the cluster. To do so, we flag all the
     21         * clone vertices: */
    2722        vertices->FlagClones(numberofvertices);
    2823
    29         /*Go through all vertices and distribute 1 dof at a time. When a  vertex has already been distributed his dof on a cpu,
    30          * all other cpus with the same vertex cannot distribute it anymore. Use clone field to be sure of that: */
    31         vertices->DistributeDofs(numberofvertices,1); //only 1 dof per vertex.
     24        /*Go through all vertices and distribute pids*/
     25        vertices->DistributePids(numberofvertices);
    3226
    3327}
Note: See TracChangeset for help on using the changeset viewer.