[25834] | 1 | Index: ../trunk-jpl/src/c/classes/gauss/GaussTria.cpp
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/c/classes/gauss/GaussTria.cpp (revision 25441)
|
---|
| 4 | +++ ../trunk-jpl/src/c/classes/gauss/GaussTria.cpp (revision 25442)
|
---|
| 5 | @@ -348,6 +348,73 @@
|
---|
| 6 | coord3=UNDEF;
|
---|
| 7 | }
|
---|
| 8 | /*}}}*/
|
---|
| 9 | +GaussTria::GaussTria(IssmDouble r1,IssmDouble r2,int order){/*{{{*/
|
---|
| 10 | +
|
---|
| 11 | + /*
|
---|
| 12 | + * ^
|
---|
| 13 | + * ------------------
|
---|
| 14 | + * 1|\ |
|
---|
| 15 | + * | \ |
|
---|
| 16 | + * | \ |
|
---|
| 17 | + * | \ |
|
---|
| 18 | + * | \ |
|
---|
| 19 | + * | \ |
|
---|
| 20 | + * | +(x,y) \ |
|
---|
| 21 | + * | \|
|
---|
| 22 | + * +---------------+-->
|
---|
| 23 | + * 0 1
|
---|
| 24 | + *
|
---|
| 25 | + */
|
---|
| 26 | + int ig;
|
---|
| 27 | + IssmDouble x,y;
|
---|
| 28 | + IssmDouble xy_list[3][2];
|
---|
| 29 | +
|
---|
| 30 | + /*Double number of gauss points*/
|
---|
| 31 | + GaussTria *gauss1 = NULL; //blue
|
---|
| 32 | + GaussTria *gauss2 = NULL; //green
|
---|
| 33 | + GaussTria *gauss3 = NULL; //red
|
---|
| 34 | + gauss1=new GaussTria(order);
|
---|
| 35 | + gauss2=new GaussTria(order);
|
---|
| 36 | + gauss3=new GaussTria(order);
|
---|
| 37 | +
|
---|
| 38 | + this->numgauss = gauss1->numgauss + gauss2->numgauss + gauss3->numgauss;
|
---|
| 39 | + this->coords1=xNew<IssmDouble>(this->numgauss);
|
---|
| 40 | + this->coords2=xNew<IssmDouble>(this->numgauss);
|
---|
| 41 | + this->coords3=xNew<IssmDouble>(this->numgauss);
|
---|
| 42 | + this->weights=xNew<IssmDouble>(this->numgauss);
|
---|
| 43 | +
|
---|
| 44 | + for(ig=0;ig<gauss1->numgauss;ig++){ // Add the first triangle gauss points (BLUE)
|
---|
| 45 | + this->coords1[ig]=gauss1->coords1[ig];
|
---|
| 46 | + this->coords2[ig]=gauss1->coords2[ig];
|
---|
| 47 | + this->coords3[ig]=gauss1->coords3[ig];
|
---|
| 48 | + this->weights[ig]=gauss1->weights[ig]*r1*r2;
|
---|
| 49 | + }
|
---|
| 50 | + for(ig=0;ig<gauss2->numgauss;ig++){ // Add the second triangle gauss points (GREEN)
|
---|
| 51 | + this->coords1[gauss1->numgauss+ig]=gauss2->coords1[ig];
|
---|
| 52 | + this->coords2[gauss1->numgauss+ig]=gauss2->coords2[ig];
|
---|
| 53 | + this->coords3[gauss1->numgauss+ig]=gauss2->coords3[ig];
|
---|
| 54 | + this->weights[gauss1->numgauss+ig]=gauss2->weights[ig]*r1*(1-r2);
|
---|
| 55 | + }
|
---|
| 56 | + for(ig=0;ig<gauss3->numgauss;ig++){ // Add the second triangle gauss points (RED)
|
---|
| 57 | + this->coords1[gauss1->numgauss+gauss2->numgauss+ig]=gauss3->coords1[ig];
|
---|
| 58 | + this->coords2[gauss1->numgauss+gauss2->numgauss+ig]=gauss3->coords2[ig];
|
---|
| 59 | + this->coords3[gauss1->numgauss+gauss2->numgauss+ig]=gauss3->coords3[ig];
|
---|
| 60 | + this->weights[gauss1->numgauss+gauss2->numgauss+ig]=gauss3->weights[ig]*(1-r1);
|
---|
| 61 | + }
|
---|
| 62 | +
|
---|
| 63 | + /*Delete gauss points*/
|
---|
| 64 | + delete gauss1;
|
---|
| 65 | + delete gauss2;
|
---|
| 66 | + delete gauss3;
|
---|
| 67 | +
|
---|
| 68 | + /*Initialize static fields as undefined*/
|
---|
| 69 | + ig = -1;
|
---|
| 70 | + weight=UNDEF;
|
---|
| 71 | + coord1=UNDEF;
|
---|
| 72 | + coord2=UNDEF;
|
---|
| 73 | + coord3=UNDEF;
|
---|
| 74 | +}
|
---|
| 75 | +/*}}}*/
|
---|
| 76 | GaussTria::~GaussTria(){/*{{{*/
|
---|
| 77 | xDelete<IssmDouble>(weights);
|
---|
| 78 | xDelete<IssmDouble>(coords3);
|
---|
| 79 | Index: ../trunk-jpl/src/c/classes/gauss/GaussTria.h
|
---|
| 80 | ===================================================================
|
---|
| 81 | --- ../trunk-jpl/src/c/classes/gauss/GaussTria.h (revision 25441)
|
---|
| 82 | +++ ../trunk-jpl/src/c/classes/gauss/GaussTria.h (revision 25442)
|
---|
| 83 | @@ -32,6 +32,7 @@
|
---|
| 84 | GaussTria(int index1,int index2,int order);
|
---|
| 85 | GaussTria(int index,IssmDouble r1, IssmDouble r2,bool maintlyfloating,int order);
|
---|
| 86 | GaussTria(int index,IssmDouble r1, IssmDouble r2,int order);
|
---|
| 87 | + GaussTria(IssmDouble r1, IssmDouble r2,int order);
|
---|
| 88 | GaussTria(IssmDouble area_coordinates[2][3],int order);
|
---|
| 89 | ~GaussTria();
|
---|
| 90 |
|
---|
| 91 | Index: ../trunk-jpl/src/c/classes/Elements/Tetra.h
|
---|
| 92 | ===================================================================
|
---|
| 93 | --- ../trunk-jpl/src/c/classes/Elements/Tetra.h (revision 25441)
|
---|
| 94 | +++ ../trunk-jpl/src/c/classes/Elements/Tetra.h (revision 25442)
|
---|
| 95 | @@ -113,6 +113,7 @@
|
---|
| 96 | Gauss* NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert);
|
---|
| 97 | Gauss* NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order){_error_("not implemented yet");};
|
---|
| 98 | Gauss* NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,int order){_error_("not implemented yet");};
|
---|
| 99 | + Gauss* NewGauss(IssmDouble fraction1,IssmDouble fraction2,int order){_error_("not implemented yet");};
|
---|
| 100 | Gauss* NewGaussBase(int order);
|
---|
| 101 | Gauss* NewGaussLine(int vertex1,int vertex2,int order){_error_("not implemented yet");};
|
---|
| 102 | Gauss* NewGaussTop(int order);
|
---|
| 103 | Index: ../trunk-jpl/src/c/classes/Elements/Element.h
|
---|
| 104 | ===================================================================
|
---|
| 105 | --- ../trunk-jpl/src/c/classes/Elements/Element.h (revision 25441)
|
---|
| 106 | +++ ../trunk-jpl/src/c/classes/Elements/Element.h (revision 25442)
|
---|
| 107 | @@ -302,6 +302,7 @@
|
---|
| 108 | virtual Gauss* NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert)=0;
|
---|
| 109 | virtual Gauss* NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order)=0;
|
---|
| 110 | virtual Gauss* NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,int order)=0;
|
---|
| 111 | + virtual Gauss* NewGauss(IssmDouble fraction1,IssmDouble fraction2,int order)=0;
|
---|
| 112 | virtual Gauss* NewGaussBase(int order)=0;
|
---|
| 113 | virtual Gauss* NewGaussLine(int vertex1,int vertex2,int order)=0;
|
---|
| 114 | virtual Gauss* NewGaussTop(int order)=0;
|
---|
| 115 | Index: ../trunk-jpl/src/c/classes/Elements/Tria.cpp
|
---|
| 116 | ===================================================================
|
---|
| 117 | --- ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 25441)
|
---|
| 118 | +++ ../trunk-jpl/src/c/classes/Elements/Tria.cpp (revision 25442)
|
---|
| 119 | @@ -3548,6 +3548,11 @@
|
---|
| 120 | return new GaussTria(point1,fraction1,fraction2,order);
|
---|
| 121 | }
|
---|
| 122 | /*}}}*/
|
---|
| 123 | +Gauss* Tria::NewGauss(IssmDouble fraction1,IssmDouble fraction2,int order){/*{{{*/
|
---|
| 124 | +
|
---|
| 125 | + return new GaussTria(fraction1,fraction2,order);
|
---|
| 126 | +}
|
---|
| 127 | +/*}}}*/
|
---|
| 128 | Gauss* Tria::NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert){/*{{{*/
|
---|
| 129 |
|
---|
| 130 | IssmDouble area_coordinates[2][3];
|
---|
| 131 | Index: ../trunk-jpl/src/c/classes/Elements/Tria.h
|
---|
| 132 | ===================================================================
|
---|
| 133 | --- ../trunk-jpl/src/c/classes/Elements/Tria.h (revision 25441)
|
---|
| 134 | +++ ../trunk-jpl/src/c/classes/Elements/Tria.h (revision 25442)
|
---|
| 135 | @@ -207,6 +207,7 @@
|
---|
| 136 | Gauss* NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order);
|
---|
| 137 | Gauss* NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order);
|
---|
| 138 | Gauss* NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,int order);
|
---|
| 139 | + Gauss* NewGauss(IssmDouble fraction1,IssmDouble fraction2,int order);
|
---|
| 140 | Gauss* NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert);
|
---|
| 141 | Gauss* NewGaussBase(int order);
|
---|
| 142 | Gauss* NewGaussLine(int vertex1,int vertex2,int order){_error_("not implemented yet");};
|
---|
| 143 | Index: ../trunk-jpl/src/c/classes/Elements/Penta.h
|
---|
| 144 | ===================================================================
|
---|
| 145 | --- ../trunk-jpl/src/c/classes/Elements/Penta.h (revision 25441)
|
---|
| 146 | +++ ../trunk-jpl/src/c/classes/Elements/Penta.h (revision 25442)
|
---|
| 147 | @@ -135,6 +135,7 @@
|
---|
| 148 | Gauss* NewGaussBase(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz);
|
---|
| 149 | Gauss* NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order);
|
---|
| 150 | Gauss* NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,int order){_error_("not implemented yet");};
|
---|
| 151 | + Gauss* NewGauss(IssmDouble fraction1,IssmDouble fraction2,int order){_error_("not implemented yet");};
|
---|
| 152 | Gauss* NewGaussBase(int order);
|
---|
| 153 | Gauss* NewGaussLine(int vertex1,int vertex2,int order);
|
---|
| 154 | Gauss* NewGaussTop(int order);
|
---|
| 155 | Index: ../trunk-jpl/src/c/classes/Elements/Seg.h
|
---|
| 156 | ===================================================================
|
---|
| 157 | --- ../trunk-jpl/src/c/classes/Elements/Seg.h (revision 25441)
|
---|
| 158 | +++ ../trunk-jpl/src/c/classes/Elements/Seg.h (revision 25442)
|
---|
| 159 | @@ -107,6 +107,7 @@
|
---|
| 160 | Gauss* NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert){_error_("not implemented yet");};
|
---|
| 161 | Gauss* NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order){_error_("not implemented yet");};
|
---|
| 162 | Gauss* NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,int order){_error_("not implemented yet");};
|
---|
| 163 | + Gauss* NewGauss(IssmDouble fraction1,IssmDouble fraction2,int order){_error_("not implemented yet");};
|
---|
| 164 | Gauss* NewGaussBase(int order){_error_("not implemented yet");};
|
---|
| 165 | Gauss* NewGaussLine(int vertex1,int vertex2,int order){_error_("not implemented yet");};
|
---|
| 166 | Gauss* NewGaussTop(int order){_error_("not implemented yet");};
|
---|