source: issm/oecreview/Archive/24684-25833/ISSM-25441-25442.diff

Last change on this file was 25834, checked in by Mathieu Morlighem, 4 years ago

CHG: added 24684-25833

File size: 8.2 KB
  • ../trunk-jpl/src/c/classes/gauss/GaussTria.cpp

     
    348348        coord3=UNDEF;
    349349}
    350350/*}}}*/
     351GaussTria::GaussTria(IssmDouble r1,IssmDouble r2,int order){/*{{{*/
     352
     353        /*
     354         *  ^
     355         *  ------------------
     356         * 1|\              |
     357         *  |  \            |
     358         *  |    \          |
     359         *  |      \        |
     360         *  |        \      |
     361         *  |          \    |
     362         *  |    +(x,y)  \  |
     363         *  |              \|
     364         *  +---------------+-->
     365         *  0               1
     366         *
     367         */
     368        int         ig;
     369        IssmDouble x,y;
     370        IssmDouble xy_list[3][2];
     371
     372        /*Double number of gauss points*/
     373        GaussTria *gauss1    = NULL; //blue
     374        GaussTria *gauss2    = NULL; //green
     375        GaussTria *gauss3    = NULL; //red
     376        gauss1=new GaussTria(order);
     377        gauss2=new GaussTria(order);
     378        gauss3=new GaussTria(order);
     379
     380        this->numgauss = gauss1->numgauss + gauss2->numgauss + gauss3->numgauss;
     381        this->coords1=xNew<IssmDouble>(this->numgauss);
     382        this->coords2=xNew<IssmDouble>(this->numgauss);
     383        this->coords3=xNew<IssmDouble>(this->numgauss);
     384        this->weights=xNew<IssmDouble>(this->numgauss);
     385
     386        for(ig=0;ig<gauss1->numgauss;ig++){ // Add the first triangle gauss points (BLUE)
     387                this->coords1[ig]=gauss1->coords1[ig];
     388                this->coords2[ig]=gauss1->coords2[ig];
     389                this->coords3[ig]=gauss1->coords3[ig];
     390                this->weights[ig]=gauss1->weights[ig]*r1*r2;
     391        }
     392        for(ig=0;ig<gauss2->numgauss;ig++){ // Add the second triangle gauss points (GREEN)
     393                this->coords1[gauss1->numgauss+ig]=gauss2->coords1[ig];
     394                this->coords2[gauss1->numgauss+ig]=gauss2->coords2[ig];
     395                this->coords3[gauss1->numgauss+ig]=gauss2->coords3[ig];
     396                this->weights[gauss1->numgauss+ig]=gauss2->weights[ig]*r1*(1-r2);
     397        }
     398        for(ig=0;ig<gauss3->numgauss;ig++){ // Add the second triangle gauss points (RED)
     399                this->coords1[gauss1->numgauss+gauss2->numgauss+ig]=gauss3->coords1[ig];
     400                this->coords2[gauss1->numgauss+gauss2->numgauss+ig]=gauss3->coords2[ig];
     401                this->coords3[gauss1->numgauss+gauss2->numgauss+ig]=gauss3->coords3[ig];
     402                this->weights[gauss1->numgauss+gauss2->numgauss+ig]=gauss3->weights[ig]*(1-r1);
     403        }
     404
     405        /*Delete gauss points*/
     406        delete gauss1;
     407        delete gauss2;
     408        delete gauss3;
     409
     410        /*Initialize static fields as undefined*/
     411        ig    = -1;
     412        weight=UNDEF;
     413        coord1=UNDEF;
     414        coord2=UNDEF;
     415        coord3=UNDEF;
     416}
     417/*}}}*/
    351418GaussTria::~GaussTria(){/*{{{*/
    352419        xDelete<IssmDouble>(weights);
    353420        xDelete<IssmDouble>(coords3);
  • ../trunk-jpl/src/c/classes/gauss/GaussTria.h

     
    3232                GaussTria(int index1,int index2,int order);
    3333                GaussTria(int index,IssmDouble r1, IssmDouble r2,bool maintlyfloating,int order);
    3434                GaussTria(int index,IssmDouble r1, IssmDouble r2,int order);
     35                GaussTria(IssmDouble r1, IssmDouble r2,int order);
    3536                GaussTria(IssmDouble area_coordinates[2][3],int order);
    3637                ~GaussTria();
    3738
  • ../trunk-jpl/src/c/classes/Elements/Tetra.h

     
    113113      Gauss*      NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert);
    114114      Gauss*      NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order){_error_("not implemented yet");};
    115115      Gauss*      NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,int order){_error_("not implemented yet");};
     116      Gauss*      NewGauss(IssmDouble fraction1,IssmDouble fraction2,int order){_error_("not implemented yet");};
    116117                Gauss*      NewGaussBase(int order);
    117118                Gauss*      NewGaussLine(int vertex1,int vertex2,int order){_error_("not implemented yet");};
    118119                Gauss*      NewGaussTop(int order);
  • ../trunk-jpl/src/c/classes/Elements/Element.h

     
    302302                virtual Gauss*     NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert)=0;
    303303                virtual Gauss*     NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order)=0;
    304304                virtual Gauss*     NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,int order)=0;
     305      virtual Gauss*     NewGauss(IssmDouble fraction1,IssmDouble fraction2,int order)=0;
    305306                virtual Gauss*     NewGaussBase(int order)=0;
    306307                virtual Gauss*     NewGaussLine(int vertex1,int vertex2,int order)=0;
    307308                virtual Gauss*     NewGaussTop(int order)=0;
  • ../trunk-jpl/src/c/classes/Elements/Tria.cpp

     
    35483548        return new GaussTria(point1,fraction1,fraction2,order);
    35493549}
    35503550/*}}}*/
     3551Gauss*     Tria::NewGauss(IssmDouble fraction1,IssmDouble fraction2,int order){/*{{{*/
     3552
     3553        return new GaussTria(fraction1,fraction2,order);
     3554}
     3555/*}}}*/
    35513556Gauss*     Tria::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert){/*{{{*/
    35523557
    35533558        IssmDouble  area_coordinates[2][3];
  • ../trunk-jpl/src/c/classes/Elements/Tria.h

     
    207207      Gauss*         NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order);
    208208      Gauss*         NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order);
    209209      Gauss*         NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,int order);
     210      Gauss*         NewGauss(IssmDouble fraction1,IssmDouble fraction2,int order);
    210211      Gauss*         NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert);
    211212                Gauss*         NewGaussBase(int order);
    212213                Gauss*         NewGaussLine(int vertex1,int vertex2,int order){_error_("not implemented yet");};
  • ../trunk-jpl/src/c/classes/Elements/Penta.h

     
    135135                Gauss*         NewGaussBase(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz);
    136136                Gauss*         NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order);
    137137                Gauss*         NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,int order){_error_("not implemented yet");};
     138                Gauss*         NewGauss(IssmDouble fraction1,IssmDouble fraction2,int order){_error_("not implemented yet");};
    138139                Gauss*         NewGaussBase(int order);
    139140                Gauss*         NewGaussLine(int vertex1,int vertex2,int order);
    140141                Gauss*         NewGaussTop(int order);
  • ../trunk-jpl/src/c/classes/Elements/Seg.h

     
    107107      Gauss*      NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert){_error_("not implemented yet");};
    108108      Gauss*      NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order){_error_("not implemented yet");};
    109109      Gauss*      NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,int order){_error_("not implemented yet");};
     110      Gauss*      NewGauss(IssmDouble fraction1,IssmDouble fraction2,int order){_error_("not implemented yet");};
    110111                Gauss*      NewGaussBase(int order){_error_("not implemented yet");};
    111112                Gauss*      NewGaussLine(int vertex1,int vertex2,int order){_error_("not implemented yet");};
    112113                Gauss*      NewGaussTop(int order){_error_("not implemented yet");};
Note: See TracBrowser for help on using the repository browser.