NeoPZ
pzshapetetra.cpp
Go to the documentation of this file.
1 
6 #include "pzshapetetra.h"
7 #include "pzshapetriang.h"
8 #include "pzshapelinear.h"
9 
10 #include "pzmanvector.h"
11 #include "pzerror.h"
12 #include "pzreal.h"
13 
14 using namespace std;
15 
17 namespace pzshape {
18 
19  /*Projection of the point within a tetraedro to a rib*/
20  REAL TPZShapeTetra::gRibTrans3dTetr1d[6][3] = {
21  {2.,1.,1.} , {-1.,1.,0.} , {-1.,-2.,-1.} ,
22  {1.,1.,2.} , {-1.,0.,1.} , {0.,-1.,1.}
23  };
24  REAL TPZShapeTetra::gVet1dTetr[6] = { -1., 0., 1., -1., 0., 0. };
25  /*Projection of the point within a tetraedro to a face*/
26  REAL TPZShapeTetra::gFaceTrans3dTetr2d[4][2][3] = {
27  { {2.,0.,0.},{0.,2.,0.} },
28  { {2.,0.,0.},{0.,0.,2.} },
29  { {-2./3.,4./3.,-2./3.},{-2./3.,-2./3.,4./3.} },
30  { {0.,2.,0.},{0.,0.,2.} }
31  };
32 
33  REAL TPZShapeTetra::gVet2dTetr[4][2] = { {-1.,-1.},{-1.,-1.},{-1./3.,-1./3.},{-1.,-1.} };
34 
35  REAL TPZShapeTetra::gFaceSum3dTetra2d[4][2] = {
36  {-1.,-1.},{-1.,-1.},{-1./3.,-1./3.},{-1.,-1.}
37  };
38 
39  REAL TPZShapeTetra::gFaceTrans3dTetra2d[4][2][3] = {
40  { { 2.,0.,0.},{0.,2.,0.} },//segundo FaceSides[4][3]
41  { { 2.,0.,0.},{0.,0.,2.} },//toma o sentido dos eixos
42  { { -2./3.,4./3.,-2./3.},{-2./3.,-2./3.,4./3.} },
43  { { 0.,2.,0.},{0.,0.,2.} }
44  };
45 
46  REAL TPZShapeTetra::gRibSum3dTetra1d[6] = {-1.,0.,1.,-1.,0.,0.};//estava : {-1.,0.,1.,-1.,0.,0.};
47 
48  REAL TPZShapeTetra::gRibTrans3dTetra1d[6][3] = {//segundo SideNodes[6][2] vale -1 no 1o extremo e +1 no 2o
49  {2.,1.,1.} , {-1.,1.,0. } , {-1.,-2.,-1.} ,//{2.,1.,1.} , {-1.,1.,0. } , {-1.,-2.,-1.} ,
50  {1.,1.,2.} , {-1.,0.,1. } , {0.,-1.,1.}//{1.,1.,2.} , {-1.,0.,1. } , {0.,-1.,1.}
51  };
52 
53  void TPZShapeTetra::ShapeCorner(TPZVec<REAL> &pt, TPZFMatrix<REAL> &phi, TPZFMatrix<REAL> &dphi) {
54  phi(0,0) = 1-pt[0]-pt[1]-pt[2];
55  phi(1,0) = pt[0];
56  phi(2,0) = pt[1];
57  phi(3,0) = pt[2];
58 
59  dphi(0,0) = -1.0;
60  dphi(1,0) = -1.0;
61  dphi(2,0) = -1.0;
62  dphi(0,1) = 1.0;
63  dphi(1,1) = 0.0;
64  dphi(2,1) = 0.0;
65  dphi(0,2) = 0.0;
66  dphi(1,2) = 1.0;
67  dphi(2,2) = 0.0;
68  dphi(0,3) = 0.0;
69  dphi(1,3) = 0.0;
70  dphi(2,3) = 1.0;
71  }
72 
73 
74  //troco para ShapeCorner
75  void TPZShapeTetra::CornerShape(TPZVec<REAL> &pt, TPZFMatrix<REAL> &phi, TPZFMatrix<REAL> &dphi) {
76  phi(0,0) = 1-pt[0]-pt[1]-pt[2];
77  phi(1,0) = pt[0];
78  phi(2,0) = pt[1];
79  phi(3,0) = pt[2];
80 
81  dphi(0,0) = -1.0;
82  dphi(1,0) = -1.0;
83  dphi(2,0) = -1.0;
84  dphi(0,1) = 1.0;
85  dphi(1,1) = 0.0;
86  dphi(2,1) = 0.0;
87  dphi(0,2) = 0.0;
88  dphi(1,2) = 1.0;
89  dphi(2,2) = 0.0;
90  dphi(0,3) = 0.0;
91  dphi(1,3) = 0.0;
92  dphi(2,3) = 1.0;
93  }
94 
101  void TPZShapeTetra::ShapeGenerating(TPZVec<REAL> &pt, TPZFMatrix<REAL> &phi, TPZFMatrix<REAL> &dphi)
102  {
103  int is;
104  // 6 ribs
105  for(is=4; is<NSides; is++)
106  {
107  int nsnodes = NSideNodes(is);
108  switch(nsnodes)
109  {
110  case 2:
111  {
112  int is1 = SideNodeLocId(is,0);
113  int is2 = SideNodeLocId(is,1);
114  phi(is,0) = phi(is1,0)*phi(is2,0);
115  dphi(0,is) = dphi(0,is1)*phi(is2,0)+phi(is1,0)*dphi(0,is2);
116  dphi(1,is) = dphi(1,is1)*phi(is2,0)+phi(is1,0)*dphi(1,is2);
117  dphi(2,is) = dphi(2,is1)*phi(is2,0)+phi(is1,0)*dphi(2,is2);
118  }
119  break;
120  case 3:
121  {
122  //int face = is-10;
123  int is1 = SideNodeLocId(is,0); //ShapeFaceId[face][0];
124  int is2 = SideNodeLocId(is,1); //ShapeFaceId[face][1];
125  int is3 = SideNodeLocId(is,2); //ShapeFaceId[face][2];
126  phi(is,0) = phi(is1,0)*phi(is2,0)*phi(is3,0);
127  dphi(0,is) = dphi(0,is1)*phi(is2,0)*phi(is3,0)+phi(is1,0)*dphi(0,is2)*phi(is3,0)+phi(is1,0)*phi(is2,0)*dphi(0,is3);
128  dphi(1,is) = dphi(1,is1)*phi(is2,0)*phi(is3,0)+phi(is1,0)*dphi(1,is2)*phi(is3,0)+phi(is1,0)*phi(is2,0)*dphi(1,is3);
129  dphi(2,is) = dphi(2,is1)*phi(is2,0)*phi(is3,0)+phi(is1,0)*dphi(2,is2)*phi(is3,0)+phi(is1,0)*phi(is2,0)*dphi(2,is3);
130  }
131  break;
132  case 4:
133  {
134  phi(is,0) = phi(0,0)*phi(1,0)*phi(2,0)*phi(3,0);
135  for(int xj=0;xj<3;xj++) {
136  dphi(xj,is) = dphi(xj,0)* phi(1 ,0)* phi(2 ,0)* phi(3 ,0) +
137  phi(0, 0)*dphi(xj,1)* phi(2 ,0)* phi(3 ,0) +
138  phi(0, 0)* phi(1 ,0)*dphi(xj,2)* phi(3 ,0) +
139  phi(0, 0)* phi(1 ,0)* phi(2 ,0)*dphi(xj,3);
140  }
141  }
142  break;
143 
144  default:
145  DebugStop();
146  }
147  }
148 
149  REAL mult[] = {1.,1.,1.,1.,4.,4.,4.,4.,4.,4.,27.,27.,27.,27.,54.};
150  for(is=4;is<NSides; is++)
151  {
152  phi(is,0) *= mult[is];
153  dphi(0,is) *= mult[is];
154  dphi(1,is) *= mult[is];
155  dphi(2,is) *= mult[is];
156  }
157 
158  }
159 
160 
161  //ifstream inn("mats.dt");
163 
164  CornerShape(pt,phi,dphi);
165  bool linear = true;
166  int is,d;
167  for(is=NCornerNodes; is<NSides; is++) if(order[is-NCornerNodes] > 1) linear = false;
168  if(linear) return;
169 
170  TPZFNMatrix<100> phiblend(NSides,1),dphiblend(Dimension,NSides);
171  for(is=0; is<NCornerNodes; is++)
172  {
173  phiblend(is,0) = phi(is,0);
174  for(d=0; d<Dimension; d++)
175  {
176  dphiblend(d,is) = dphi(d,is);
177  }
178  }
179  ShapeGenerating(pt,phiblend,dphiblend);
180 
181  // if(order[9]<2) return;
182  int shape = 4;
183  //rib shapes
184  for (int rib = 0; rib < 6; rib++) {
185  REAL outval;
186  ProjectPoint3dTetraToRib(rib,pt,outval);
187  TPZVec<int64_t> ids(2);
188  TPZManVector<REAL,1> outvalvec(1,outval);
189  int id0,id1;
190  id0 = SideNodes[rib][0];
191  id1 = SideNodes[rib][1];
192  ids[0] = id[id0];
193  ids[1] = id[id1];
194  REAL store1[20],store2[60];
195  int ordin = order[rib]-1;//three orders : order in x , order in y and order in z
196  TPZFMatrix<REAL> phin(ordin,1,store1,20),dphin(3,ordin,store2,60);
197  phin.Zero();
198  dphin.Zero();
199  TPZShapeLinear::ShapeInternal(outvalvec,order[rib],phin,dphin,TPZShapeLinear::GetTransformId1d(ids));//ordin = ordem de um lado
200  TransformDerivativeFromRibToTetra(rib,ordin,dphin);
201  for (int i = 0; i < ordin; i++) {
202  phi(shape,0) = phiblend(rib+4,0)*phin(i,0);
203  for(int xj=0;xj<3;xj++) {
204  dphi(xj,shape) = dphiblend(xj ,rib+4) * phin( i, 0) +
205  phiblend(rib+4, 0 ) * dphin(xj,i);
206  }
207  shape++;
208  }
209  }
210  // if(order[10]<3) return;
211  //face shapes
212  for (int face = 0; face < 4; face++) {
213  if (order[6+face] < 3) continue;
214  TPZManVector<REAL,2> outval(2);
215  ProjectPoint3dTetraToFace(face,pt,outval);
216  REAL store1[20],store2[60];
217  int ord1;//,ord2;
218  //elt->FaceOrder(face,ord1,ord2);
219  ord1 = order[6+face];
220  //ord2 = ord1;
221  if(ord1<3) continue;
222  int ordin = (ord1-2)*(ord1-1)/2;
223  TPZFMatrix<REAL> phin(ordin,1,store1,20),dphin(3,ordin,store2,60);//ponto na face
224  phin.Zero();
225  dphin.Zero();
226  TPZManVector<int64_t> ids(3);
227  // int id0,id1,id2;
228  int i;
229  for(i=0;i<3;i++) ids[i] = id[FaceNodes[face][i]];
230  // id0 = ShapeFaceId[face][0];//indice das shapes da face que compoem a shape atual
231  // id1 = ShapeFaceId[face][1];//equivale a FaceIdsCube(face,ids,id,id0,id1);
232  // id2 = ShapeFaceId[face][2];
233  int transid = TPZShapeTriang::GetTransformId2dT(ids);
234  outval[0] = (outval[0]+1.)/2.;//devido a corre��o na fun��o
235  outval[1] = (outval[1]+1.)/2.;//Shape2dTriangleInternal(..)
236  TPZShapeTriang::ShapeInternal(outval,ord1-2,phin,dphin,transid);//ordin = ordem de um lado
237  int c = dphin.Cols();
238  for(i=0;i<c;i++) {
239  dphin(0,i) /= 2.;
240  dphin(1,i) /= 2.;
241  dphin(2,i) /= 2.;
242  }
243  TransformDerivativeFromFaceToTetra(face,ordin,dphin);//ord = numero de shapes
244  for(i=0;i<ordin;i++) {
245  phi(shape,0) = phiblend(face+10,0)*phin(i,0);
246  for(int xj=0;xj<3;xj++) {
247  dphi(xj,shape) = dphiblend(xj,face+10) * phin(i ,0) +
248  phiblend(face+10, 0) * dphin(xj,i);
249  }
250  shape++;
251  }
252  }
253  if(order[10]<4) return;
254  //volume shapes
255  int totsum = 0,sum;
256  int i;
257  for(i=0;i<order[10]-3;i++) {
258  sum = (i+1)*(i+2) / 2;
259  totsum += sum;
260  }
261  int ord = totsum;
262  TPZFNMatrix<80> phin(ord,1),dphin(3,ord);
263  phin.Zero();
264  dphin.Zero();
265  ShapeInternal(pt,order[10],phin,dphin);
266  for(i=0;i<ord;i++) {
267  phi(shape,0) = phiblend(NSides-1,0)*phin(i,0);
268  for(int xj=0;xj<3;xj++) {
269  dphi(xj,shape) = dphiblend(xj,NSides-1) * phin(i ,0) +
270  phiblend(NSides-1, 0) * dphin(xj,i);
271  }
272  shape++;
273  }
274  }
275 
276  void TPZShapeTetra::ProjectPoint3dTetrSide(int side, TPZVec<REAL> &in, REAL &out) {
277 
278  out = gRibTrans3dTetr1d[side][0]*in[0]+gRibTrans3dTetr1d[side][1]*in[1]+gRibTrans3dTetr1d[side][2]*in[2]+gVet1dTetr[side];
279  }
280 
281  void TPZShapeTetra::ProjectPoint3dTetrFace(int face, TPZVec<REAL> &in, TPZVec<REAL> &out) {
282 
283  out[0] = gFaceTrans3dTetr2d[face][0][0]*in[0]+gFaceTrans3dTetr2d[face][0][1]*in[1]+gFaceTrans3dTetr2d[face][0][2]*in[2]+gVet2dTetr[face][0];
284  out[1] = gFaceTrans3dTetr2d[face][1][0]*in[0]+gFaceTrans3dTetr2d[face][1][1]*in[1]+gFaceTrans3dTetr2d[face][1][2]*in[2]+gVet2dTetr[face][1];
285  }
286 
287  void TPZShapeTetra::ShapeInternal(TPZVec<REAL> &x, int order,TPZFMatrix<REAL> &phi,
288  TPZFMatrix<REAL> &dphi) {
289  if(order < 4) return;
290  int ord = order-3;
291 
292  TPZFNMatrix<100, REAL> phi0(ord,1),phi1(ord,1),phi2(ord,1),dphi0(1,ord),dphi1(1,ord),dphi2(1,ord);
293  TPZShapeLinear::fOrthogonal(2.*x[0]-1.,ord,phi0,dphi0);
294  TPZShapeLinear::fOrthogonal(2.*x[1]-1.,ord,phi1,dphi1);
295  TPZShapeLinear::fOrthogonal(2.*x[2]-1.,ord,phi2,dphi2);
296 
297 
298  int index = 0;
299  for (int i=0;i<ord;i++) {
300  for (int j=0;j<ord;j++) {
301  for (int k=0;k<ord;k++) {
302  if( i+j+k < ord ) {
303  //int index = ord*(ord*i+j)+k;
304  phi(index,0) = phi0(i,0)* phi1(j,0)* phi2(k,0);
305  dphi(0,index) = 2.*dphi0(0,i)* phi1(j,0)* phi2(k,0);
306  dphi(1,index) = 2.* phi0(i,0)*dphi1(0,j)* phi2(k,0);
307  dphi(2,index) = 2.* phi0(i,0)* phi1(j,0)*dphi2(0,k);
308  index++;
309  }
310  }
311  }
312  }
313  }
314 
315  void TPZShapeTetra::ShapeInternal(int side, TPZVec<REAL> &x, int order,
316  TPZFMatrix<REAL> &phi, TPZFMatrix<REAL> &dphi){
317  if (side < 4 || side > 14) {
318  DebugStop();
319  }
320 
321  switch (side) {
322 
323  case 4:
324  case 5:
325  case 6:
326  case 7:
327  case 8:
328  case 9:
329  {
330  pzshape::TPZShapeLinear::ShapeInternal(x, order, phi, dphi);
331  }
332  break;
333 
334  case 10:
335  case 11:
336  case 12:
337  case 13:
338 
339  {
340  pzshape::TPZShapeTriang::ShapeInternal(x, order, phi, dphi);
341  }
342  break;
343 
344  case 14:
345  {
346 
347  ShapeInternal(x, order, phi, dphi);
348  }
349  break;
350 
351  default:
352  std::cout << "Wrong side parameter side " << side << std::endl;
353  DebugStop();
354  break;
355  }
356 
357  }
358 
359  void TPZShapeTetra::TransformDerivativeFromRibToTetra(int rib,int num,TPZFMatrix<REAL> &dphi) {
360  for (int j = 0;j<num;j++) {
361  dphi(2,j) = gRibTrans3dTetra1d[rib][2]*dphi(0,j);
362  dphi(1,j) = gRibTrans3dTetra1d[rib][1]*dphi(0,j);
363  dphi(0,j) = gRibTrans3dTetra1d[rib][0]*dphi(0,j);
364  }
365  }
366 
367  void TPZShapeTetra::TransformDerivativeFromFaceToTetra(int face,int num,TPZFMatrix<REAL> &dphi) {
368 
369  for (int j = 0;j<num;j++) {
370  dphi(2,j) = gFaceTrans3dTetra2d[face][0][2]*dphi(0,j)+gFaceTrans3dTetra2d[face][1][2]*dphi(1,j);
371  REAL dphi1j = dphi(1,j);
372  dphi(1,j) = gFaceTrans3dTetra2d[face][0][1]*dphi(0,j)+gFaceTrans3dTetra2d[face][1][1]*dphi(1,j);
373  dphi(0,j) = gFaceTrans3dTetra2d[face][0][0]*dphi(0,j)+gFaceTrans3dTetra2d[face][1][0]*dphi1j;//dphi(1,j);
374  }
375  }
376 
377  void TPZShapeTetra::ProjectPoint3dTetraToRib(int rib, TPZVec<REAL> &in, REAL &outval) {
378  outval = gRibTrans3dTetra1d[rib][0]*in[0]+gRibTrans3dTetra1d[rib][1]*in[1]+gRibTrans3dTetra1d[rib][2]*in[2]+gRibSum3dTetra1d[rib];
379  }
380 
381  void TPZShapeTetra::ProjectPoint3dTetraToFace(int face, TPZVec<REAL> &in, TPZVec<REAL> &outval) {
382  outval[0] = gFaceTrans3dTetra2d[face][0][0]*in[0]+gFaceTrans3dTetra2d[face][0][1]*in[1]+gFaceTrans3dTetra2d[face][0][2]*in[2]+gFaceSum3dTetra2d[face][0];
383 
384  outval[1] = gFaceTrans3dTetra2d[face][1][0]*in[0]+gFaceTrans3dTetra2d[face][1][1]*in[1]+gFaceTrans3dTetra2d[face][1][2]*in[2]+gFaceSum3dTetra2d[face][1];
385 
386 
387 
388 
389 
390 
391  }
392 
393  int TPZShapeTetra::NConnectShapeF(int side, int order) {
394  if(side<4) return 1;//0 a 3
395  // int s = side-4;
396  if(side<10) return order-1;//4 a 9
397  if(side<14) {//10 a 13
398  int sum = 0;
399  for(int i=0;i<order-1;i++) sum += i;
400  return sum;
401  }
402  if(side==14) {
403  int totsum = 0,sum;
404  for(int i=1;i<order-2;i++) {
405  sum = i*(i+1) / 2;
406  totsum += sum;
407  }
408  return totsum;
409  }
410  PZError << "TPZCompElT3d::NConnectShapeF, bad parameter side " << side << endl;
411  return 0;
412  }
413 
414  int TPZShapeTetra::NShapeF(TPZVec<int> &order) {
415  int in,res=NCornerNodes;
416  for(in=NCornerNodes;in<NSides;in++) res += NConnectShapeF(in,order[in-NCornerNodes]);
417  return res;
418  }
419 
420  void TPZShapeTetra::SideShape(int side, TPZVec<REAL> &point, TPZVec<int64_t> &id, TPZVec<int> &order, TPZFMatrix<REAL> &phi,TPZFMatrix<REAL> &dphi) {
421 
422  if(side<0 || side>15) PZError << "TPZCompElT3d::SideShapeFunction. Bad paramenter side.\n";
423  else if(side==14) Shape(point,id,order,phi,dphi);
424  else if(side<4) phi(0,0)=1.;
425  else if(side<10) {//4 a 9
426  TPZShapeLinear::Shape(point,id,order,phi,dphi);
427  }
428  else if(side<14) {//faces 10,11,12,13
429  TPZShapeTriang::Shape(point,id,order,phi,dphi);
430  }
431 
432  }
433 
434  void TPZShapeTetra::ShapeOrder(TPZVec<int64_t> &id, TPZVec<int> &order, TPZGenMatrix<int> &shapeorders)//, TPZVec<int64_t> &sides
435  {
436  //DebugStop();
437 
438  int64_t nsides = TPZShapeTetra::NSides;
439  int nshape;
440 
441  int linha = 0;
442  for (int side = 0; side < nsides; side++)
443  {
444 
445  nshape = 1;
446  if(side >= NCornerNodes) nshape = NConnectShapeF(side,order[side-NCornerNodes]);
447  int sideorder = 1;
448  if(side >= NCornerNodes) sideorder = order[side-NCornerNodes];
449 
450  TPZGenMatrix<int> locshapeorders(nshape,3);
451  SideShapeOrder(side, id, sideorder, locshapeorders);
452 
453  int nlin = locshapeorders.Rows();
454  int ncol = locshapeorders.Cols();
455 
456  for (int il = 0; il<nlin; il++)
457  {
458  for (int jc = 0; jc<ncol; jc++)
459  {
460  shapeorders(linha, jc) = locshapeorders(il, jc);
461  }
462  linha++;
463  }
464  }
465 
466  }
467 
468 
469  void TPZShapeTetra::SideShapeOrder(int side, TPZVec<int64_t> &id, int order, TPZGenMatrix<int> &shapeorders)
470  {
471  //DebugStop();
472  if (side<=3)
473  {
474  if (shapeorders.Rows() != 1)
475  {
476  DebugStop();
477  }
478  shapeorders(0,0) = 1;
479  shapeorders(0,1) = 0;
480  shapeorders(0,2) = 0;
481  }
482  else if (side>=4 && side<=9)
483  {
484  int nshape = order-1;
485  if (shapeorders.Rows() != nshape)
486  {
487  DebugStop();
488  }
489  for (int ioy = 0; ioy < order-1; ioy++)
490  {
491  shapeorders(ioy,0) = ioy+2;
492  }
493  }
494  else if (side >= 10 && side <= 13)
495  {
496  int nshape = (order-2)*(order-1)/2;
497  if (shapeorders.Rows() != nshape)
498  {
499  DebugStop();
500  }
501  TPZStack<int> lowersides;
502  LowerDimensionSides(side, lowersides);
503  lowersides.Push(side);
504 
505  int nnodes = NSideNodes(side);
506 
507  TPZManVector<int64_t, 4> locid(nnodes);
508  for (int node=0; node<locid.size(); node++) {
509  locid[node] = id[ContainedSideLocId(side, node)];
510  }
511 
512  TPZGenMatrix<int> locshapeorders(nshape,3);
513 
514 
515  TPZShapeTriang::SideShapeOrder(6,locid, order, locshapeorders);
516 
517  for (int il = 0; il<nshape; il++)
518  {
519  shapeorders(il, 0) = locshapeorders(il, 0);
520  shapeorders(il, 1) = locshapeorders(il, 1);
521  shapeorders(il, 2) = locshapeorders(il, 2);
522  }
523  }
524  else
525  { // interno
526  int totsum = 0,sum;
527  int i;
528  for(i=0;i<order-3;i++) {
529  sum = (i+1)*(i+2) / 2;
530  totsum += sum;
531  }
532  int nshape = totsum;
533 
534  if (shapeorders.Rows() != nshape) {
535  DebugStop();
536  }
537  int count = 0;
538  int ord = order-3;
539  for (int i=0;i<ord;i++) {
540  for (int j=0;j<ord;j++) {
541  for (int k=0;k<ord;k++) {
542  int a = i;
543  int b = j;
544  int c = k;
545  int soma = a+b+c;
546  if( soma < ord ) { // Duvida
547  shapeorders(count,0) = 4 + soma;
548  shapeorders(count,1) = 4 + soma;
549  shapeorders(count,2) = 4 + soma;
550  count++;
551  }
552  }
553  }
554  }
555 // int orderplus1 = order+1;
556 // for (int i=4; i<orderplus1; i++)
557 // {
558 // for (int j=4; j<orderplus1; j++)
559 // {
560 // for (int k=4; k<orderplus1; k++)
561 // {
562 // int a = i;
563 // int b = j;
564 // int c = k;
565 // int soma = a+b+c;
566 // if ((soma)<orderplus1)// Duvida
567 // {
568 // shapeorders(count,0) = soma;
569 // shapeorders(count,1) = soma;
570 // shapeorders(count,2) = soma;
571 // count++;
572 // }
573 // }
574 //
575 // }
576 // }
577 
578  }
579  }
580 
581 };
Contains TPZShapeTetra class which implements the shape functions of a tetrahedral element...
Implements a vector class which allows to use external storage provided by the user. Utility.
Definition: pzquad.h:16
static void ShapeInternal(TPZVec< REAL > &x, int ord, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi, int transformation_index)
Computes the values of the orthogonal shapefunctions before multiplying them by the corner shapefunct...
groups all classes dedicated to the computation of shape functions
Definition: pzshapeextend.h:16
Defines PZError.
Contains TPZShapeLinear class which implements the shape functions of a linear one-dimensional elemen...
int Zero() override
Makes Zero all the elements.
Definition: pzfmatrix.h:651
int64_t size() const
Returns the number of elements of the vector.
Definition: pzvec.h:196
void Push(const T object)
Pushes a copy of the object on the stack.
Definition: pzstack.h:80
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
Free store vector implementation.
void Shape(TPZVec< REAL > &pt, TPZVec< int > orders, TPZVec< TPZTransform< REAL > > &transvec, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
string res
Definition: test.py:151
Implements generic class which holds a matrix of objects. Matrix.
Definition: pzshtmat.h:18
static void ShapeInternal(TPZVec< REAL > &x, int order, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi, int triangle_transformation_index)
Compute the internal functions of the triangle shape function at a point.
int64_t Cols() const
Definition: pzshtmat.h:47
int64_t Rows() const
Definition: pzshtmat.h:45
int64_t Cols() const
Returns number of cols.
Definition: pzmatrix.h:809
Contains the declaration of TPZFlopCounter class and TPZCounter struct.
Contains TPZShapeTriang class which implements the shape functions of a triangular element...
Non abstract class which implements full matrices with preallocated storage with (N+1) entries...
Definition: pzfmatrix.h:716
#define PZError
Defines the output device to error messages and the DebugStop() function.
Definition: pzerror.h:15