Changeset 21715


Ignore:
Timestamp:
05/16/17 16:03:03 (8 years ago)
Author:
Mathieu Morlighem
Message:

CHG: better way of dealing with segments

File:
1 edited

Legend:

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

    r21714 r21715  
    10331033
    10341034        /*Output*/
    1035         int  numindices;
     1035        int  numseg;
    10361036        int* indices = NULL;
    10371037
    10381038        switch(finiteelement){
    10391039                case P1Enum: case P1DGEnum:
    1040                         numindices = 3*2;
    1041                         indices    = xNew<int>(numindices);
     1040                        numseg = 3;
     1041                        indices = xNew<int>(numseg*2);
    10421042                        indices[0*2 + 0] = 0; indices[0*2 + 1] = 3;
    10431043                        indices[1*2 + 0] = 1; indices[1*2 + 1] = 4;
     
    10451045                        break;
    10461046                case P1bubbleEnum: case P1bubblecondensedEnum:
    1047                         numindices = 3*2;
    1048                         indices    = xNew<int>(numindices);
     1047                        numseg = 3;
     1048                        indices = xNew<int>(numseg*2);
    10491049                        indices[0*2 + 0] = 0; indices[0*2 + 1] = 3;
    10501050                        indices[1*2 + 0] = 1; indices[1*2 + 1] = 4;
     
    10521052                        break;
    10531053                case P2xP1Enum:
    1054                         numindices = 6*2;
    1055                         indices    = xNew<int>(numindices);
     1054                        numseg = 6;
     1055                        indices = xNew<int>(numseg*2);
    10561056                        indices[0*2 + 0] = 0; indices[0*2 + 1] = 3;
    10571057                        indices[1*2 + 0] = 1; indices[1*2 + 1] = 4;
     
    10621062                        break;
    10631063                case P1xP2Enum:
    1064                         numindices = 3*2;
    1065                         indices    = xNew<int>(numindices);
     1064                        numseg = 3;
     1065                        indices = xNew<int>(numseg*2);
    10661066                        indices[0*2 + 0] = 0; indices[0*2 + 1] = 6;
    10671067                        indices[1*2 + 0] = 1; indices[1*2 + 1] = 7;
     
    10691069                        break;
    10701070                case P1xP3Enum:
    1071                         numindices = 3*2;
    1072                         indices    = xNew<int>(numindices);
     1071                        numseg = 3;
     1072                        indices = xNew<int>(numseg*2);
    10731073                        indices[0*2 + 0] = 0; indices[0*2 + 1] = 6;
    10741074                        indices[1*2 + 0] = 1; indices[1*2 + 1] = 7;
     
    10761076                        break;
    10771077                case P2Enum:
    1078                         numindices = 6*2;
    1079                         indices    = xNew<int>(numindices);
     1078                        numseg = 6;
     1079                        indices = xNew<int>(numseg*2);
    10801080                        indices[0*2 + 0] = 0;  indices[0*2 + 1] = 6;
    10811081                        indices[1*2 + 0] = 1;  indices[1*2 + 1] = 7;
     
    10861086                        break;
    10871087                case P2bubbleEnum:
    1088                         numindices = 6*2;
    1089                         indices    = xNew<int>(numindices);
     1088                        numseg = 6;
     1089                        indices = xNew<int>(numseg*2);
    10901090                        indices[0*2 + 0] = 0;  indices[0*2 + 1] = 6;
    10911091                        indices[1*2 + 0] = 1;  indices[1*2 + 1] = 7;
     
    10961096                        break;
    10971097                case P2xP4Enum:
    1098                         numindices = 6*2;
    1099                         indices    = xNew<int>(numindices);
     1098                        numseg = 6;
     1099                        indices = xNew<int>(numseg*2);
    11001100                        indices[0*2 + 0] = 0;  indices[0*2 + 1] = 6;
    11011101                        indices[1*2 + 0] = 1;  indices[1*2 + 1] = 7;
     
    11101110
    11111111        /*Assign output pointer*/
    1112         *pnumseg   = numindices/2;
     1112        *pnumseg   = numseg;
    11131113        *pindices  = indices;
    11141114}
Note: See TracChangeset for help on using the changeset viewer.