Changeset 21892


Ignore:
Timestamp:
07/28/17 09:09:53 (8 years ago)
Author:
seroussi
Message:

BUG: fixed subelement migration 2

Location:
issm/trunk-jpl/src/c
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/MasstransportAnalysis.cpp

    r21891 r21892  
    500500                gllevelset_input=element->GetInput(MaskGroundediceLevelsetEnum); _assert_(gllevelset_input);
    501501                element->GetGroundedPart(&point1,&fraction1,&fraction2,&mainlyfloating);
    502            gauss = element->NewGauss(point1,fraction1,fraction2,mainlyfloating,3);
     502           gauss = element->NewGauss(point1,fraction1,fraction2,3);
    503503        }
    504504        else{
  • issm/trunk-jpl/src/c/classes/Elements/Element.h

    r21886 r21892  
    251251      virtual Gauss*     NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert)=0;
    252252      virtual Gauss*     NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order)=0;
     253      virtual Gauss*     NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,int order)=0;
    253254                virtual Gauss*     NewGaussBase(int order)=0;
    254255                virtual Gauss*     NewGaussLine(int vertex1,int vertex2,int order)=0;
  • issm/trunk-jpl/src/c/classes/Elements/Penta.h

    r21886 r21892  
    121121                Gauss*         NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert);
    122122                Gauss*         NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order);
     123                Gauss*         NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,int order){_error_("not implemented yet");};
    123124                Gauss*         NewGaussBase(int order);
    124125                Gauss*         NewGaussLine(int vertex1,int vertex2,int order);
  • issm/trunk-jpl/src/c/classes/Elements/Seg.h

    r21886 r21892  
    110110      Gauss*      NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert){_error_("not implemented yet");};
    111111      Gauss*      NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order){_error_("not implemented yet");};
     112      Gauss*      NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,int order){_error_("not implemented yet");};
    112113                Gauss*      NewGaussBase(int order){_error_("not implemented yet");};
    113114                Gauss*      NewGaussLine(int vertex1,int vertex2,int order){_error_("not implemented yet");};
  • issm/trunk-jpl/src/c/classes/Elements/Tetra.h

    r21886 r21892  
    118118      Gauss*      NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert);
    119119      Gauss*      NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order){_error_("not implemented yet");};
     120      Gauss*      NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,int order){_error_("not implemented yet");};
    120121                Gauss*      NewGaussBase(int order);
    121122                Gauss*      NewGaussLine(int vertex1,int vertex2,int order){_error_("not implemented yet");};
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r21886 r21892  
    23482348}
    23492349/*}}}*/
     2350Gauss*     Tria::NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,int order){/*{{{*/
     2351
     2352        return new GaussTria(point1,fraction1,fraction2,order);
     2353}
     2354/*}}}*/
    23502355Gauss*     Tria::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert){/*{{{*/
    23512356
  • issm/trunk-jpl/src/c/classes/Elements/Tria.h

    r21886 r21892  
    181181      Gauss*         NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order);
    182182      Gauss*         NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order);
     183      Gauss*         NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,int order);
    183184      Gauss*         NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert);
    184185                Gauss*         NewGaussBase(int order);
  • issm/trunk-jpl/src/c/classes/gauss/GaussTria.cpp

    r20827 r21892  
    287287}
    288288/*}}}*/
     289GaussTria::GaussTria(int index,IssmDouble r1,IssmDouble r2,int order){/*{{{*/
     290
     291        /*
     292         *  ^
     293         *  ------------------
     294         * 1|\              |
     295         *  |  \            |
     296         *  |    \          |
     297         *  |      \        |
     298         *  |        \      |
     299         *  |          \    |
     300         *  |    +(x,y)  \  |
     301         *  |              \|
     302         *  +---------------+-->
     303         *  0               1
     304         *
     305         */
     306        int         ig;
     307        IssmDouble x,y;
     308        IssmDouble xy_list[3][2];
     309
     310        /*Double number of gauss points*/
     311        GaussTria *gauss1    = NULL;
     312        GaussTria *gauss2    = NULL;
     313        gauss1=new GaussTria(index,r1,r2,1,order); //for the mainly floating part
     314        gauss2=new GaussTria(index,r1,r2,0,order); //for the mainly grounded part
     315
     316        this->numgauss = gauss1->numgauss + gauss2->numgauss;
     317        this->coords1=xNew<IssmDouble>(this->numgauss);
     318        this->coords2=xNew<IssmDouble>(this->numgauss);
     319        this->coords3=xNew<IssmDouble>(this->numgauss);
     320        this->weights=xNew<IssmDouble>(this->numgauss);
     321
     322        for(ig=0;ig<gauss1->numgauss;ig++){ // Add the first triangle gauss points
     323                this->coords1[ig]=gauss1->coords1[ig];
     324                this->coords2[ig]=gauss1->coords2[ig];
     325                this->coords3[ig]=gauss1->coords3[ig];
     326                this->weights[ig]=gauss1->weights[ig];
     327        }
     328        for(ig=0;ig<gauss2->numgauss;ig++){ // Add the second triangle gauss points
     329                this->coords1[gauss1->numgauss+ig]=gauss2->coords1[ig];
     330                this->coords2[gauss1->numgauss+ig]=gauss2->coords2[ig];
     331                this->coords3[gauss1->numgauss+ig]=gauss2->coords3[ig];
     332                this->weights[gauss1->numgauss+ig]=gauss2->weights[ig];
     333        }
     334
     335        /*Delete gauss points*/
     336        delete gauss1;
     337        delete gauss2;
     338
     339        /*Initialize static fields as undefined*/
     340        weight=UNDEF;
     341        coord1=UNDEF;
     342        coord2=UNDEF;
     343        coord3=UNDEF;
     344}
     345/*}}}*/
    289346GaussTria::~GaussTria(){/*{{{*/
    290347        xDelete<IssmDouble>(weights);
  • issm/trunk-jpl/src/c/classes/gauss/GaussTria.h

    r20827 r21892  
    3131                GaussTria(int index1,int index2,int order);
    3232                GaussTria(int index,IssmDouble r1, IssmDouble r2,bool maintlyfloating,int order);
     33                GaussTria(int index,IssmDouble r1, IssmDouble r2,int order);
    3334                GaussTria(IssmDouble area_coordinates[2][3],int order);
    3435                ~GaussTria();
Note: See TracChangeset for help on using the changeset viewer.