Changeset 15738


Ignore:
Timestamp:
08/07/13 10:05:25 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: cosmetics

File:
1 edited

Legend:

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

    r15737 r15738  
    500500        this->InputDepthAverageAtBase(VyEnum,VyAverageEnum);
    501501
    502         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     502        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    503503        ElementMatrix* Ke=tria->CreateKMatrixPrognostic();
    504504        delete tria->material; delete tria;
     
    517517        if (!IsOnBed()) return NULL;
    518518
    519         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     519        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    520520        ElementMatrix* Ke=tria->CreateMassMatrix();
    521521        delete tria->material; delete tria;
     
    675675
    676676        /*Call Tria function*/
    677         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     677        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    678678        ElementVector* pe=tria->CreatePVectorPrognostic();
    679679        delete tria->material; delete tria;
     
    693693
    694694        /*Call Tria function*/
    695         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     695        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    696696        ElementVector* pe=tria->CreatePVectorSlope();
    697697        delete tria->material; delete tria;
     
    31593159                /*This element should be collapsed into a tria element at its base. Create this tria element,
    31603160                 * and compute SurfaceArea*/
    3161                 tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria (lower face).
     3161                tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    31623162                S=tria->SurfaceArea();
    31633163                delete tria->material; delete tria;
     
    31663166        else{
    31673167
    3168                 tria=(Tria*)SpawnTria(1); //nodes 3, 4 and 5 make the new tria (upper face).
     3168                tria=(Tria*)SpawnTria(1); //lower face is 0, upper face is 1.
    31693169                S=tria->SurfaceArea();
    31703170                delete tria->material; delete tria;
     
    36553655
    36563656        /*Spawn Tria element from the base of the Penta: */
    3657         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     3657        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    36583658        mass_flux=tria->MassFlux(segment);
    36593659        delete tria->material; delete tria;
     
    40384038        if (!IsOnBed()) return NULL;
    40394039
    4040         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     4040        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    40414041        ElementMatrix* Ke=tria->CreateKMatrixMelting();
    40424042
     
    50795079
    50805080        /*Call Tria function*/
    5081         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     5081        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    50825082        ElementMatrix* Ke=tria->CreateKMatrixAdjointSSA();
    50835083        delete tria->material; delete tria;
     
    52625262
    52635263        /*Call Tria function*/
    5264         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     5264        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    52655265        ElementVector* pe=tria->CreatePVectorAdjointHoriz();
    52665266        delete tria->material; delete tria;
     
    57495749                case DragCoefficientAbsGradientEnum:
    57505750                        if(IsOnBed()){
    5751                                 tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     5751                                tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    57525752                                tria->GradjDragGradient(gradient,resp,control_index);
    57535753                                delete tria->material; delete tria;
     
    57565756                case RheologyBbarAbsGradientEnum:
    57575757                        if(IsOnBed()){
    5758                                 tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     5758                                tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    57595759                                tria->GradjBGradient(gradient,resp,control_index);
    57605760                                delete tria->material; delete tria;
     
    57745774
    57755775        /*Spawn tria*/
    5776         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     5776        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    57775777        tria->GradjDragSSA(gradient,control_index);
    57785778        delete tria->material; delete tria;
     
    59525952
    59535953        /*Collapse element to the base*/
    5954         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria (lower face).
     5954        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    59555955        tria->GradjBSSA(gradient,control_index);
    59565956        delete tria->material; delete tria;
     
    61626162                /*This element should be collapsed into a tria element at its base. Create this tria element,
    61636163                 * and compute SurfaceAverageVelMisfit*/
    6164                 tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria (lower face).
     6164                tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    61656165                J=tria->SurfaceAverageVelMisfit(weight_index);
    61666166                delete tria->material; delete tria;
     
    61696169        else{
    61706170
    6171                 tria=(Tria*)SpawnTria(1); //nodes 3, 4 and 5 make the new tria (upper face).
     6171                tria=(Tria*)SpawnTria(1); //lower face is 0, upper face is 1.
    61726172                J=tria->SurfaceAverageVelMisfit(weight_index);
    61736173                delete tria->material; delete tria;
     
    61996199                /*This element should be collapsed into a tria element at its base. Create this tria element,
    62006200                 * and compute SurfaceAbsVelMisfit*/
    6201                 tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria (lower face).
     6201                tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    62026202                J=tria->SurfaceAbsVelMisfit(weight_index);
    62036203                delete tria->material; delete tria;
     
    62066206        else{
    62076207
    6208                 tria=(Tria*)SpawnTria(1); //nodes 3, 4 and 5 make the new tria (upper face).
     6208                tria=(Tria*)SpawnTria(1); //lower face is 0, upper face is 1.
    62096209                J=tria->SurfaceAbsVelMisfit(weight_index);
    62106210                delete tria->material; delete tria;
     
    62366236                /*This element should be collapsed into a tria element at its base. Create this tria element,
    62376237                 * and compute SurfaceLogVelMisfit*/
    6238                 tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria (lower face).
     6238                tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    62396239                J=tria->SurfaceLogVelMisfit(weight_index);
    62406240                delete tria->material; delete tria;
     
    62436243        else{
    62446244
    6245                 tria=(Tria*)SpawnTria(1); //nodes 3, 4 and 5 make the new tria (upper face).
     6245                tria=(Tria*)SpawnTria(1); //lower face is 0, upper face is 1.
    62466246                J=tria->SurfaceLogVelMisfit(weight_index);
    62476247                delete tria->material; delete tria;
     
    62756275                /*This element should be collapsed into a tria element at its base. Create this tria element,
    62766276                 * and compute SurfaceLogVxVyMisfit*/
    6277                 tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria (lower face).
     6277                tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    62786278                J=tria->SurfaceLogVxVyMisfit(weight_index);
    62796279                delete tria->material; delete tria;
     
    62826282        else{
    62836283
    6284                 tria=(Tria*)SpawnTria(1); //nodes 3, 4 and 5 make the new tria (upper face).
     6284                tria=(Tria*)SpawnTria(1); //lower face is 0, upper face is 1.
    62856285                J=tria->SurfaceLogVxVyMisfit(weight_index);
    62866286                delete tria->material; delete tria;
     
    63126312                /*This element should be collapsed into a tria element at its base. Create this tria element,
    63136313                 * and compute SurfaceRelVelMisfit*/
    6314                 tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria (lower face).
     6314                tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    63156315                J=tria->SurfaceRelVelMisfit(weight_index);
    63166316                delete tria->material; delete tria;
     
    63196319        else{
    63206320
    6321                 tria=(Tria*)SpawnTria(1); //nodes 3, 4 and 5 make the new tria (upper face).
     6321                tria=(Tria*)SpawnTria(1); //lower face is 0, upper face is 1.
    63226322                J=tria->SurfaceRelVelMisfit(weight_index);
    63236323                delete tria->material; delete tria;
     
    63616361        if(IsOnWater()|| IsFloating() || !IsOnBed()) return 0;
    63626362
    6363         tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria
     6363        tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1
    63646364        J=tria->DragCoefficientAbsGradient(weight_index);
    63656365        delete tria->material; delete tria;
     
    63766376        if(IsOnWater() || !IsOnBed()) return 0;
    63776377
    6378         tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria
     6378        tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1
    63796379        J=tria->RheologyBbarAbsGradient(weight_index);
    63806380        delete tria->material; delete tria;
     
    66806680        /*Find penta on bed as HO must be coupled to the dofs on the bed: */
    66816681        Penta* pentabase=GetBasalElement();
    6682         Tria*  tria=pentabase->SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     6682        Tria*  tria=pentabase->SpawnTria(0); //lower face is 0, upper face is 1.
    66836683
    66846684        /*Prepare node list*/
     
    68776877        /*Find penta on bed as FS must be coupled to the dofs on the bed: */
    68786878        Penta* pentabase=GetBasalElement();
    6879         Tria* tria=pentabase->SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     6879        Tria* tria=pentabase->SpawnTria(0); //lower face is 0, upper face is 1.
    68806880
    68816881        /*Prepare node list*/
     
    72347234
    72357235        /*Call Tria function*/
    7236         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     7236        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    72377237        ElementMatrix* Ke=tria->CreateKMatrixDiagnosticSSA();
    72387238        delete tria->material; delete tria;
     
    72857285        /*Find penta on bed as this is a SSA elements: */
    72867286        pentabase=GetBasalElement();
    7287         tria=pentabase->SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     7287        tria=pentabase->SpawnTria(0); //lower face is 0, upper face is 1.
    72887288
    72897289        /*Initialize Element matrix*/
     
    73577357         * the tria functionality to build a friction stiffness matrix on these 3
    73587358         * nodes: */
    7359         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     7359        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    73607360        ElementMatrix* Ke=tria->CreateKMatrixDiagnosticSSAFriction();
    73617361        delete tria->material; delete tria;
     
    74337433        /*Find penta on bed as this is a SSA elements: */
    74347434        pentabase=GetBasalElement();
    7435         tria=pentabase->SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     7435        tria=pentabase->SpawnTria(0); //lower face is 0, upper face is 1.
    74367436
    74377437        /*Initialize Element matrix*/
     
    74887488         * the tria functionality to build a friction stiffness matrix on these 3
    74897489         * nodes: */
    7490         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     7490        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    74917491        ElementMatrix* Ke=tria->CreateKMatrixDiagnosticSSAFriction();
    74927492        delete tria->material; delete tria;
     
    85158515
    85168516        /*Call Tria function*/
    8517         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     8517        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    85188518        ElementVector* pe=tria->CreatePVectorDiagnosticSSA();
    85198519        delete tria->material; delete tria;
     
    85298529
    85308530        /*Call Tria function*/
    8531         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     8531        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    85328532        ElementVector* pe=tria->CreatePVectorDiagnosticSSA();
    85338533        delete tria->material; delete tria;
     
    92149214
    92159215        /*Call Tria function*/
    9216         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     9216        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    92179217        ElementMatrix* Ke=tria->CreateJacobianDiagnosticSSA();
    92189218        delete tria->material; delete tria;
     
    1044610446
    1044710447        /*Spawn Tria element from the base of the Penta: */
    10448         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     10448        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    1044910449        ElementMatrix* Ke=tria->CreateKMatrixBalancethickness();
    1045010450        delete tria->material; delete tria;
     
    1046810468
    1046910469        /*Call Tria function*/
    10470         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     10470        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    1047110471        ElementVector* pe=tria->CreatePVectorBalancethickness();
    1047210472        delete tria->material; delete tria;
     
    1048810488        if (!IsOnBed()) return NULL;
    1048910489
    10490         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     10490        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    1049110491        ElementMatrix* Ke=tria->CreateKMatrixHydrologyDCInefficient();
    1049210492        delete tria->material; delete tria;
     
    1050110501        if (!IsOnBed()) return NULL;
    1050210502
    10503         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     10503        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    1050410504        ElementMatrix* Ke=tria->CreateKMatrixHydrologyDCEfficient();
    1050510505        delete tria->material; delete tria;
     
    1051510515
    1051610516        /*Call Tria function*/
    10517         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     10517        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    1051810518        ElementVector* pe=tria->CreatePVectorHydrologyDCInefficient();
    1051910519        delete tria->material; delete tria;
     
    1052910529
    1053010530        /*Call Tria function*/
    10531         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     10531        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    1053210532        ElementVector* pe=tria->CreatePVectorHydrologyDCEfficient();
    1053310533        delete tria->material; delete tria;
     
    1054210542        if (!IsOnBed()) return;
    1054310543
    10544         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     10544        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    1054510545        tria->GetHydrologyDCInefficientHmax(ph_max,innode);
    1054610546        delete tria->material; delete tria;
     
    1055210552        if (!IsOnBed()) return;
    1055310553
    10554         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     10554        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    1055510555        tria->GetHydrologyTransfer(transfer);
    1055610556        delete tria->material; delete tria;
     
    1059310593        if (!IsOnBed())return;
    1059410594
    10595         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     10595        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    1059610596        tria->HydrologyEPLGetActive(active_vec);
    1059710597        delete tria->material; delete tria;
     
    1060410604        if (!IsOnBed())return;
    1060510605
    10606         Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
     10606        Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.
    1060710607        tria->HydrologyEPLGetMask(vec_mask);
    1060810608        delete tria->material; delete tria;
     
    1064610646                kappa=kmax*pow(10.,penalty_factor);
    1064710647
    10648                 Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.   
     10648                Tria* tria=(Tria*)SpawnTria(0); //lower face is 0, upper face is 1.     
    1064910649                for(int i=0;i<NUMVERTICES2D;i++){
    1065010650                        tria->GetHydrologyDCInefficientHmax(&h_max,nodes[i]);
Note: See TracChangeset for help on using the changeset viewer.