Changeset 7370


Ignore:
Timestamp:
02/07/11 10:39:21 (14 years ago)
Author:
Eric.Larour
Message:

Better shielding of water elements. thanks Helene.

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

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r7369 r7370  
    539539        _assert_(this->nodes && this->matice && this->matpar && this->verticalneighbors && this->parameters && this->inputs);
    540540        /*}}}*/
     541       
     542        if(IsOnWater()) return;
    541543
    542544        /*Just branch to the correct element stiffness matrix generator, according to the type of analysis we are carrying out: */
     
    632634/*FUNCTION Penta::CreateKMatrixCouplingMacAyealPattyn{{{1*/
    633635ElementMatrix* Penta::CreateKMatrixCouplingMacAyealPattyn(void){
    634 
     636       
    635637        /*compute all stiffness matrices for this element*/
    636638        ElementMatrix* Ke1=CreateKMatrixCouplingMacAyealPattynViscous();
    637639        ElementMatrix* Ke2=CreateKMatrixCouplingMacAyealPattynFriction();
    638         ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2);
    639 
    640         /*clean-up and return*/
    641         delete Ke1;
    642         delete Ke2;
     640        ElementMatrix* Ke=new ElementMatrix(Ke1,Ke2);
     641       
    643642        return Ke;
    644643}
     
    785784        /*Initialize Element matrix and return if necessary*/
    786785        if(IsOnWater()) return NULL;
     786
    787787        ElementMatrix* Ke1=new ElementMatrix(pentabase->nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
    788788        ElementMatrix* Ke2=new ElementMatrix(this->nodes     ,NUMVERTICES,this->parameters,StokesApproximationEnum);
     
    12441244ElementMatrix* Penta::CreateKMatrixDiagnosticPattyn(void){
    12451245       
    1246         ElementMatrix* Ke =NULL;
    12471246
    12481247        /*compute all stiffness matrices for this element*/
    12491248        ElementMatrix* Ke1=CreateKMatrixDiagnosticPattynViscous();
    12501249        ElementMatrix* Ke2=CreateKMatrixDiagnosticPattynFriction();
    1251 
    1252         if(Ke1 || Ke2){
    1253                  Ke=new ElementMatrix(Ke1,Ke2);
    1254 
    1255                 /*clean-up and return*/
    1256                 delete Ke1;
    1257                 delete Ke2;
    1258         }
     1250        ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2);
     1251
     1252        /*clean-up and return*/
     1253        delete Ke1;
     1254        delete Ke2;
     1255
    12591256        return Ke;
    12601257
     
    15231520ElementMatrix* Penta::CreateKMatrixDiagnosticVert(void){
    15241521       
    1525         ElementMatrix* Ke =NULL;
    15261522
    15271523        /*compute all stiffness matrices for this element*/
    15281524        ElementMatrix* Ke1=CreateKMatrixDiagnosticVertVolume();
    15291525        ElementMatrix* Ke2=CreateKMatrixDiagnosticVertSurface();
    1530        
    1531         if(Ke1 || Ke2){
    1532                  Ke=new ElementMatrix(Ke1,Ke2);
    1533 
    1534                 /*clean-up and return*/
    1535                 delete Ke1;
    1536                 delete Ke2;
    1537         }
     1526        ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2);
     1527
     1528        /*clean-up and return*/
     1529        delete Ke1;
     1530        delete Ke2;
    15381531        return Ke;
    15391532
     
    16511644ElementMatrix* Penta::CreateKMatrixThermal(void){
    16521645       
    1653         ElementMatrix* Ke =NULL;
    1654 
    16551646        /*compute all stiffness matrices for this element*/
    16561647        ElementMatrix* Ke1=CreateKMatrixThermalVolume();
    16571648        ElementMatrix* Ke2=CreateKMatrixThermalShelf();
     1649        ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2);
    16581650       
    1659         if(Ke1 || Ke2){
    1660                  Ke=new ElementMatrix(Ke1,Ke2);
    1661 
    1662                 /*clean-up and return*/
    1663                 delete Ke1;
    1664                 delete Ke2;
    1665         }
     1651        /*clean-up and return*/
     1652        delete Ke1;
     1653        delete Ke2;
    16661654        return Ke;
    16671655}
     
    18511839        _assert_(this->nodes && this->matice && this->matpar && this->verticalneighbors && this->parameters && this->inputs);
    18521840        /*}}}*/
     1841
     1842        if(IsOnWater()) return;
    18531843
    18541844        /*Just branch to the correct element stiffness matrix generator, according to the type of analysis we are carrying out: */
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r7356 r7370  
    387387        _assert_(this->nodes && this->matice && this->matpar && this->parameters && this->inputs);
    388388        /*}}}*/
     389       
     390        if(IsOnWater()) return;
    389391
    390392        /*Just branch to the correct element stiffness matrix generator, according to the type of analysis we are carrying out: */
     
    756758ElementMatrix* Tria::CreateKMatrixDiagnosticMacAyeal(void){
    757759
    758         ElementMatrix* Ke=NULL;
    759760
    760761        /*compute all stiffness matrices for this element*/
    761762        ElementMatrix* Ke1=CreateKMatrixDiagnosticMacAyealViscous();
    762763        ElementMatrix* Ke2=CreateKMatrixDiagnosticMacAyealFriction();
     764        ElementMatrix* Ke =new ElementMatrix(Ke1,Ke2);
    763765       
    764         if(Ke1 || Ke2){
    765                  Ke=new ElementMatrix(Ke1,Ke2);
    766 
    767                 /*clean-up and return*/
    768                 delete Ke1;
    769                 delete Ke2;
    770         }
     766        /*clean-up and return*/
     767        delete Ke1;
     768        delete Ke2;
    771769        return Ke;
    772770
     
    15231521        _assert_(this->nodes && this->matice && this->matpar && this->parameters && this->inputs);
    15241522        /*}}}*/
     1523       
     1524        if(IsOnWater()) return;
    15251525
    15261526        /*Just branch to the correct load generator, according to the type of analysis we are carrying out: */
Note: See TracChangeset for help on using the changeset viewer.