Changeset 7374


Ignore:
Timestamp:
02/07/11 13:25:46 (14 years ago)
Author:
Mathieu Morlighem
Message:

Some clean up (no need to check that element is not on water more than once)

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

Legend:

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

    r7373 r7374  
    540540        /*}}}*/
    541541       
     542        /*Skip if water element*/
    542543        if(IsOnWater()) return;
    543544
     
    588589          bedrock, in which case we spawn a tria element using the 3 first grids, and use it to build
    589590          the stiffness matrix. */
    590         if (!IsOnBed() || IsOnWater()) return NULL;
     591        if (!IsOnBed()) return NULL;
    591592
    592593        /*Depth Averaging Vx and Vy*/
     
    613614          bedrock, in which case we spawn a tria element using the 3 first grids, and use it to build
    614615          the stiffness matrix. */
    615         if (!IsOnBed() || IsOnWater()) return NULL;
     616        if (!IsOnBed()) return NULL;
    616617
    617618        /*Depth Averaging Vx and Vy*/
     
    673674        Tria* tria=pentabase->SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
    674675
    675         /*Initialize Element matrix and return if necessary*/
    676         if(IsOnWater()) return NULL;
     676        /*Initialize Element matrix*/
    677677        ElementMatrix* Ke1=new ElementMatrix(pentabase->nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
    678678        ElementMatrix* Ke2=new ElementMatrix(this->nodes     ,NUMVERTICES,this->parameters,PattynApproximationEnum);
     
    730730
    731731        /*Initialize Element matrix and return if necessary*/
    732         if(IsOnWater() || IsOnShelf() || !IsOnBed()) return NULL;
     732        if(IsOnShelf() || !IsOnBed()) return NULL;
    733733
    734734        Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     
    875875        /*If on water or not Stokes, skip stiffness: */
    876876        inputs->GetParameterValue(&approximation,ApproximationEnum);
    877         if(IsOnWater() || IsOnShelf() || !IsOnBed()) return NULL;
     877        if(IsOnShelf() || !IsOnBed()) return NULL;
    878878        ElementMatrix* Ke1=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
    879879        ElementMatrix* Ke2=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
     
    10171017        double    one0,one1;
    10181018
    1019         /*Initialize Element matrix and return if necessary*/
    1020         if(IsOnWater()) return NULL;
     1019        /*Initialize Element matrix*/
    10211020        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
    10221021
     
    10761075          bedrock, in which case we spawn a tria element using the 3 first grids, and use it to build
    10771076          the stiffness matrix. */
    1078         if (!IsOnBed() || IsOnWater()) return NULL;
     1077        if (!IsOnBed()) return NULL;
    10791078
    10801079        /*Depth Averaging B*/
     
    11341133        tria=pentabase->SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
    11351134
    1136         /*Initialize Element matrix and return if necessary*/
    1137         if(IsOnWater()) return NULL;
     1135        /*Initialize Element matrix*/
    11381136        ElementMatrix* Ke=new ElementMatrix(tria->nodes,NUMVERTICES2D,this->parameters,MacAyealApproximationEnum);
    11391137        inputs->GetParameterValue(&approximation,ApproximationEnum);
     
    11971195
    11981196        /*Initialize Element matrix and return if necessary*/
    1199         if(IsOnWater() || IsOnShelf() || !IsOnBed()) return NULL;
     1197        if(IsOnShelf() || !IsOnBed()) return NULL;
    12001198
    12011199        /*Build a tria element using the 3 grids of the base of the penta. Then use
     
    12781276        GaussPenta *gauss=NULL;
    12791277
    1280         /*Initialize Element matrix and return if necessary*/
    1281         if(IsOnWater()) return NULL;
     1278        /*Initialize Element matrix*/
    12821279        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,PattynApproximationEnum);
    12831280
     
    13271324
    13281325        /*Initialize Element matrix and return if necessary*/
    1329         if(IsOnWater() || IsOnShelf() || !IsOnBed()) return NULL;
     1326        if(IsOnShelf() || !IsOnBed()) return NULL;
    13301327
    13311328        /*Build a tria element using the 3 grids of the base of the penta. Then use
     
    13881385        /*If on water or not Stokes, skip stiffness: */
    13891386        inputs->GetParameterValue(&approximation,ApproximationEnum);
    1390         if(IsOnWater() || (approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum)) return NULL;
     1387        if(approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;
    13911388        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
    13921389
     
    14561453        /*If on water or not Stokes, skip stiffness: */
    14571454        inputs->GetParameterValue(&approximation,ApproximationEnum);
    1458         if(IsOnWater() || IsOnShelf() || !IsOnBed() || (approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum &&  approximation!=PattynStokesApproximationEnum)) return NULL;
     1455        if(IsOnShelf() || !IsOnBed() || (approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum &&  approximation!=PattynStokesApproximationEnum)) return NULL;
    14591456        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
    14601457
     
    15471544        GaussPenta  *gauss=NULL;
    15481545
    1549         /*Initialize Element matrix and return if necessary*/
    1550         if(IsOnWater()) return NULL;
     1546        /*Initialize Element matrix*/
    15511547        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
    15521548
     
    15821578ElementMatrix* Penta::CreateKMatrixDiagnosticVertSurface(void){
    15831579
    1584         if (!IsOnSurface() || IsOnWater()) return NULL;
     1580        if (!IsOnSurface()) return NULL;
    15851581
    15861582        /*Call Tria function*/
     
    15961592ElementMatrix* Penta::CreateKMatrixMelting(void){
    15971593
    1598         if (!IsOnBed() || IsOnWater()) return NULL;
     1594        if (!IsOnBed()) return NULL;
    15991595
    16001596        Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     
    16081604ElementMatrix* Penta::CreateKMatrixPrognostic(void){
    16091605
    1610         if (!IsOnBed() || IsOnWater()) return NULL;
     1606        if (!IsOnBed()) return NULL;
    16111607
    16121608        /*Depth Averaging Vx and Vy*/
     
    16291625ElementMatrix* Penta::CreateKMatrixSlope(void){
    16301626
    1631         if (!IsOnBed() || IsOnWater()) return NULL;
     1627        if (!IsOnBed()) return NULL;
    16321628
    16331629        Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
     
    16861682        GaussPenta *gauss=NULL;
    16871683
    1688         /*Initialize Element matrix and return if necessary*/
    1689         if(IsOnWater()) return NULL;
     1684        /*Initialize Element matrix*/
    16901685        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
    16911686
     
    18161811ElementMatrix* Penta::CreateKMatrixThermalShelf(void){
    18171812
    1818         if (!IsOnBed() || !IsOnShelf() || IsOnWater()) return NULL;
     1813        if (!IsOnBed() || !IsOnShelf()) return NULL;
    18191814
    18201815        /*Call Tria function*/
     
    18381833        /*}}}*/
    18391834
     1835        /*Skip if water element*/
    18401836        if(IsOnWater()) return;
    18411837
     
    19061902ElementVector* Penta::CreatePVectorAdjointMacAyeal(){
    19071903
    1908         if (!IsOnBed() || IsOnWater()) return NULL;
     1904        if (!IsOnBed()) return NULL;
    19091905
    19101906        /*Call Tria function*/
     
    19201916ElementVector* Penta::CreatePVectorAdjointPattyn(void){
    19211917
    1922         if (!IsOnSurface() || IsOnWater()) return NULL;
     1918        if (!IsOnSurface()) return NULL;
    19231919
    19241920        /*Call Tria function*/
     
    19341930ElementVector* Penta::CreatePVectorBalancedthickness(void){
    19351931
    1936         if (!IsOnBed() || IsOnWater()) return NULL;
     1932        if (!IsOnBed()) return NULL;
    19371933
    19381934        /*Depth Averaging Vx and Vy*/
     
    19561952ElementVector* Penta::CreatePVectorBalancedvelocities(void){
    19571953
    1958         if (!IsOnBed() || IsOnWater()) return NULL;
     1954        if (!IsOnBed()) return NULL;
    19591955
    19601956        /*Depth Averaging Vx and Vy*/
     
    20082004
    20092005        /*Initialize Element vector and return if necessary*/
    2010         if(IsOnWater()) return NULL;
    20112006        inputs->GetParameterValue(&approximation,ApproximationEnum);
    20122007        if(approximation!=MacAyealStokesApproximationEnum) return NULL;
     
    20722067
    20732068        /*Initialize Element vector and return if necessary*/
    2074         if(IsOnWater() || !IsOnBed() || IsOnShelf()) return NULL;
     2069        if(!IsOnBed() || IsOnShelf()) return NULL;
    20752070        inputs->GetParameterValue(&approximation,ApproximationEnum);
    20762071        if(approximation!=MacAyealStokesApproximationEnum) return NULL;
     
    21542149
    21552150        /*Initialize Element vector and return if necessary*/
    2156         if(IsOnWater()) return NULL;
    21572151        inputs->GetParameterValue(&approximation,ApproximationEnum);
    21582152        if(approximation!=PattynStokesApproximationEnum) return NULL;
     
    22182212
    22192213        /*Initialize Element vector and return if necessary*/
    2220         if(IsOnWater() || !IsOnBed() || IsOnShelf()) return NULL;
     2214        if(!IsOnBed() || IsOnShelf()) return NULL;
    22212215        inputs->GetParameterValue(&approximation,ApproximationEnum);
    22222216        if(approximation!=PattynStokesApproximationEnum) return NULL;
     
    23612355        GaussPenta*  gauss=NULL;
    23622356
    2363         /*Initialize Element vector and return if necessary*/
    2364         if(IsOnWater()) return NULL;
     2357        /*Initialize Element vector*/
    23652358        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
    23662359
     
    24332426ElementVector* Penta::CreatePVectorDiagnosticMacAyeal(void){
    24342427
    2435         if (!IsOnBed() || IsOnWater()) return NULL;
     2428        if (!IsOnBed()) return NULL;
    24362429
    24372430        /*Call Tria function*/
     
    24592452        GaussPenta  *gauss=NULL;
    24602453
    2461         /*Initialize Element vector and return if necessary*/
    2462         if(IsOnWater()) return NULL;
     2454        /*Initialize Element vector*/
    24632455        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,PattynApproximationEnum);
    24642456
     
    25292521
    25302522        /*Initialize Element vector and return if necessary*/
    2531         if(IsOnWater()) return NULL;
    25322523        inputs->GetParameterValue(&approximation,ApproximationEnum);
    25332524        if(approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;
     
    25992590
    26002591        /*Initialize Element vector and return if necessary*/
    2601         if(IsOnWater() || !IsOnBed() || !IsOnShelf()) return NULL;
     2592        if(!IsOnBed() || !IsOnShelf()) return NULL;
    26022593        inputs->GetParameterValue(&approximation,ApproximationEnum);
    26032594        if(approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;
     
    26362627ElementVector* Penta::CreatePVectorAdjointStokes(void){
    26372628
    2638         if (!IsOnSurface() || IsOnWater()) return NULL;
     2629        if (!IsOnSurface()) return NULL;
    26392630
    26402631        /*Call Tria function*/
     
    26772668        GaussPenta *gauss=NULL;
    26782669
    2679         /*Initialize Element vector and return if necessary*/
    2680         if(IsOnWater()) return NULL;
     2670        /*Initialize Element vector*/
    26812671        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
    26822672
     
    27212711ElementVector* Penta::CreatePVectorDiagnosticVertBase(void){
    27222712
    2723         if (!IsOnBed() || IsOnWater()) return NULL;
     2713        if (!IsOnBed()) return NULL;
    27242714
    27252715        /*Call Tria function*/
     
    27402730ElementVector* Penta::CreatePVectorPrognostic(void){
    27412731
    2742         if (!IsOnBed() || IsOnWater()) return NULL;
     2732        if (!IsOnBed()) return NULL;
    27432733
    27442734        /*Depth Averaging Vx and Vy*/
     
    27622752ElementVector* Penta::CreatePVectorSlope(void){
    27632753
    2764         if (!IsOnBed() || IsOnWater()) return NULL;
     2754        if (!IsOnBed()) return NULL;
    27652755
    27662756        /*Call Tria function*/
     
    28122802        GaussPenta *gauss=NULL;
    28132803
    2814         /*Initialize Element vector and return if necessary*/
    2815         if(IsOnWater()) return NULL;
     2804        /*Initialize Element vector*/
    28162805        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
    28172806
     
    28802869
    28812870        /* Ice/ocean heat exchange flux on ice shelf base */
    2882         if (!IsOnBed() || !IsOnShelf() || IsOnWater()) return NULL;
     2871        if (!IsOnBed() || !IsOnShelf()) return NULL;
    28832872
    28842873        /*Call Tria function*/
     
    28952884
    28962885        /* Geothermal flux on ice sheet base and basal friction */
    2897         if (!IsOnBed() || IsOnShelf() || IsOnWater()) return NULL;
     2886        if (!IsOnBed() || IsOnShelf()) return NULL;
    28982887
    28992888        /*Call Tria function*/
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r7373 r7374  
    388388        /*}}}*/
    389389       
     390        /*Skip if water element*/
    390391        if(IsOnWater()) return;
    391392
     
    485486        GaussTria *gauss                            = NULL;
    486487
    487         /*Initialize Element matrix and return if necessary*/
    488         if(IsOnWater()) return NULL;
     488        /*Initialize Element matrix*/
    489489        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
    490490
     
    590590        GaussTria  *gauss=NULL;
    591591
    592         /*Initialize Element matrix and return if necessary*/
    593         if(IsOnWater()) return NULL;
     592        /*Initialize Element matrix*/
    594593        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
    595594
     
    657656        GaussTria *gauss=NULL;
    658657
    659         /*Initialize Element matrix and return if necessary*/
    660         if(IsOnWater()) return NULL;
     658        /*Initialize Element matrix*/
    661659        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
    662660
     
    788786        GaussTria *gauss = NULL;
    789787
    790         /*Initialize Element matrix and return if necessary*/
    791         if(IsOnWater()) return NULL;
     788        /*Initialize Element matrix*/
    792789        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
    793790
     
    857854
    858855        /*Initialize Element matrix and return if necessary*/
    859         if(IsOnWater() || IsOnShelf()) return NULL;
     856        if(IsOnShelf()) return NULL;
    860857        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
    861858
     
    928925
    929926        /*Initialize Element matrix and return if necessary*/
    930         if(IsOnWater() || IsOnShelf()) return NULL;
     927        if(IsOnShelf()) return NULL;
    931928        ElementMatrix* Ke1=new ElementMatrix(nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
    932929        ElementMatrix* Ke2=new ElementMatrix(nodes,NUMVERTICES,this->parameters,PattynApproximationEnum);
     
    10171014
    10181015        /*Initialize Element matrix and return if necessary*/
    1019         if(IsOnWater() || IsOnShelf()) return NULL;
     1016        if(IsOnShelf()) return NULL;
    10201017        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,PattynApproximationEnum);
    10211018
     
    10761073        int    i,connectivity;
    10771074
    1078         /*Initialize Element matrix and return if necessary*/
    1079         if(IsOnWater()) return NULL;
     1075        /*Initialize Element matrix*/
    10801076        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
    10811077
     
    11061102        double Ke_g[numdof][numdof]; //stiffness matrix evaluated at the gaussian point.
    11071103
    1108         /*Initialize Element matrix and return if necessary*/
    1109         if(IsOnWater()) return NULL;
     1104        /*Initialize Element matrix*/
    11101105        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
    11111106
     
    11551150        GaussTria *gauss=NULL;
    11561151
    1157         /*Initialize Element matrix and return if necessary*/
    1158         if(IsOnWater()) return NULL;
     1152        /*Initialize Element matrix*/
    11591153        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
    11601154
     
    12281222        GaussTria *gauss=NULL;
    12291223
    1230         /*Initialize Element matrix and return if necessary*/
    1231         if(IsOnWater()) return NULL;
     1224        /*Initialize Element matrix*/
    12321225        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
    12331226
     
    13471340        GaussTria  *gauss=NULL;
    13481341
    1349         /*Initialize Element matrix and return if necessary*/
    1350         if(IsOnWater()) return NULL;
     1342        /*Initialize Element matrix*/
    13511343        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
    13521344
     
    14221414        GaussTria *gauss = NULL;
    14231415
    1424         /*Initialize Element matrix and return if necessary*/
    1425         if(IsOnWater()) return NULL;
     1416        /*Initialize Element matrix*/
    14261417        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
    14271418
     
    14701461
    14711462        /*Initialize Element matrix and return if necessary*/
    1472         if(IsOnWater() || !IsOnShelf()) return NULL;
     1463        if(!IsOnShelf()) return NULL;
    14731464        ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
    14741465
     
    15201511        /*}}}*/
    15211512       
     1513        /*Skip if water element*/
    15221514        if(IsOnWater()) return;
    15231515
     
    15861578        GaussTria* gauss=NULL;
    15871579
    1588         /*Initialize Element vector and return if necessary*/
    1589         if(IsOnWater()) return NULL;
     1580        /*Initialize Element vector*/
    15901581        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
    15911582
     
    16301621        GaussTria* gauss=NULL;
    16311622
    1632         /*Initialize Element vector and return if necessary*/
    1633         if(IsOnWater()) return NULL;
     1623        /*Initialize Element vector*/
    16341624        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
    16351625
     
    16741664        GaussTria* gauss=NULL;
    16751665
    1676         /*Initialize Element vector and return if necessary*/
    1677         if(IsOnWater()) return NULL;
     1666        /*Initialize Element vector*/
    16781667        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
    16791668
     
    17191708        GaussTria* gauss=NULL;
    17201709
    1721         /*Initialize Element vector and return if necessary*/
    1722         if(IsOnWater()) return NULL;
     1710        /*Initialize Element vector*/
    17231711        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
    17241712
     
    17801768        GaussTria*     gauss=NULL;
    17811769
    1782         /*Initialize Element vector and return if necessary*/
    1783         if(IsOnWater()) return NULL;
     1770        /*Initialize Element vector*/
    17841771        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
    17851772
     
    18471834        GaussTria*  gauss=NULL;
    18481835
    1849         /*Initialize Element vector and return if necessary*/
    1850         if(IsOnWater()) return NULL;
     1836        /*Initialize Element vector*/
    18511837        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
    18521838
     
    19061892        GaussTria* gauss=NULL;
    19071893
    1908         /*Initialize Element vector and return if necessary*/
    1909         if(IsOnWater()) return NULL;
     1894        /*Initialize Element vector*/
    19101895        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
    19111896
     
    20872072        GaussTria* gauss=NULL;
    20882073
    2089         /*Initialize Element vector and return if necessary*/
    2090         if(IsOnWater()) return NULL;
     2074        /*Initialize Element vector*/
    20912075        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
    20922076
     
    22572241        GaussTria* gauss=NULL;
    22582242
    2259         /*Initialize Element vector and return if necessary*/
    2260         if(IsOnWater()) return NULL;
     2243        /*Initialize Element vector*/
    22612244        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
    22622245
     
    23242307        GaussTria* gauss=NULL;
    23252308
    2326         /*Initialize Element vector and return if necessary*/
    2327         if(IsOnWater()) return NULL;
     2309        /*Initialize Element vector*/
    23282310        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
    23292311
     
    23732355        GaussTria* gauss=NULL;
    23742356
    2375         /*Initialize Element vector and return if necessary*/
    2376         if(IsOnWater()) return NULL;
     2357        /*Initialize Element vector*/
    23772358        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
    23782359
     
    24202401        GaussTria* gauss=NULL;
    24212402
    2422         /*Initialize Element vector and return if necessary*/
    2423         if(IsOnWater()) return NULL;
     2403        /*Initialize Element vector*/
    24242404        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
    24252405
     
    24752455        GaussTria* gauss=NULL;
    24762456
    2477         /*Initialize Element vector and return if necessary*/
    2478         if(IsOnWater()) return NULL;
     2457        /*Initialize Element vector*/
    24792458        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
    24802459
     
    25332512        GaussTria* gauss=NULL;
    25342513
    2535         /*Initialize Element vector and return if necessary*/
    2536         if(IsOnWater()) return NULL;
     2514        /*Initialize Element vector*/
    25372515        ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
    25382516
     
    30433021
    30443022        /*If on water, grad = 0: */
    3045         if(IsOnWater())return;
     3023        if(IsOnWater()) return;
    30463024
    30473025        switch(control_type){
Note: See TracChangeset for help on using the changeset viewer.