NeoPZ
tpzquadrilateral.cpp
Go to the documentation of this file.
1 
6 #include "tpzquadrilateral.h"
7 
8 #include "pzmanvector.h"
9 #include "pzerror.h"
10 #include "pzreal.h"
11 #include "pzquad.h"
12 #include "pzeltype.h"
13 
14 //#include "pzshapequad.h"
15 
16 #include "pznumeric.h"
17 
18 #ifdef _AUTODIFF
19 #include "fad.h"
20 #endif
21 
22 #include "pzlog.h"
23 
24 #ifdef LOG4CXX
25 static LoggerPtr logger(Logger::getLogger("pz.topology.pzquadrilateral"));
26 #endif
27 
28 using namespace std;
29 
30 namespace pztopology {
31 
32  static int nsidenodes[9] = {
33  1,1,1,1,2,2,2,2,4};
34 
35  int TPZQuadrilateral::SideNodes[4][2] = { {0,1},{1,2},{2,3},{3,0} };
36  int TPZQuadrilateral::FaceNodes[1][4] = { {0,1,2,3} };
37 
38  int TPZQuadrilateral::NSideNodes(int side)
39  {
40  return nsidenodes[side];
41  }
42 
43  static int nhighdimsides[9] = {3,3,3,3,1,1,1,1,0};
44 
45 
46  static int sidedimension[9] = {0,0,0,0,1,1,1,1,2};
47 
48  static REAL sidetosidetransforms[9][3][4][3] = {
49  {
50  {{-99,-99,-99},{-99,-99,-99},{-99,-99,-99},{-1,-99,-99}},
51  {{-99,-99,-99},{-99,-99,-99},{-99,-99,-99},{1,-99,-99}},
52  {{-99,-99,-99},{-99,-99,-99},{-99,-99,-99},{-1,-1,-99}}
53  },
54  {
55  {{-99,-99,-99},{-99,-99,-99},{-99,-99,-99},{1,-99,-99}},
56  {{-99,-99,-99},{-99,-99,-99},{-99,-99,-99},{-1,-99,-99}},
57  {{-99,-99,-99},{-99,-99,-99},{-99,-99,-99},{1,-1,-99}}
58  },
59  {
60  {{-99,-99,-99},{-99,-99,-99},{-99,-99,-99},{1,-99,-99}},
61  {{-99,-99,-99},{-99,-99,-99},{-99,-99,-99},{-1,-99,-99}},
62  {{-99,-99,-99},{-99,-99,-99},{-99,-99,-99},{1,1,-99}}
63  },
64  {
65  {{-99,-99,-99},{-99,-99,-99},{-99,-99,-99},{1,-99,-99}},
66  {{-99,-99,-99},{-99,-99,-99},{-99,-99,-99},{-1,-99,-99}},
67  {{-99,-99,-99},{-99,-99,-99},{-99,-99,-99},{-1,1,-99}}
68  },
69  {
70  {{1,0,-99},{-99,-99,-99},{-99,-99,-99},{0,-1,-99}}
71  },
72  {
73  {{0,1,-99},{-99,-99,-99},{-99,-99,-99},{1,0,-99}}
74  },
75  {
76  {{-1,0,-99},{-99,-99,-99},{-99,-99,-99},{0,1,-99}}
77  },
78  {
79  {{0,-1,-99},{-99,-99,-99},{-99,-99,-99},{-1,0,-99}}
80  },
81  {
82  {{-99,-99,-99},{-99,-99,-99},{-99,-99,-99},{-99,-99,-99}}
83  }
84  };
85 
86 
87  static int highsides[9][3] = {
88  {4,7,8},
89  {4,5,8},
90  {5,6,8},
91  {6,7,8},
92  {8},
93  {8},
94  {8},
95  {8},
96  {-999}
97  };
98 
99  static REAL MidSideNode[9][3] = {
100  /*00*/{-1.,-1.},/*01*/{ 1.,-1.},/*02*/{1.,1.},
101  /*03*/{-1., 1.},/*04*/{ 0.,-1.},/*05*/{1.,0.},
102  /*06*/{ 0., 1.},/*07*/{-1., 0.},/*08*/{0.,0.} };
103 
104  static REAL bQuad[18][2] =
105  {
106  {0,-1},
107  {0,-1},
108  {0,-1},
109  {1,0},
110  {1,0},
111  {1,0},
112  {0,1},
113  {0,1},
114  {0,1},
115  {-1,0},
116  {-1,0},
117  {-1,0},
118  {1,0},
119  {0,1},
120  {-1,0},
121  {0,-1},
122  {1,0},
123  {0,1}
124 
125  };
126 
127  static REAL tQuad[18][2] =
128  {
129  {-1,0},
130  {-1,0},
131  {-1,0},
132  {0,-1},
133  {0,-1},
134  {0,-1},
135  {1,0},
136  {1,0},
137  {1,0},
138  {0,1},
139  {0,1},
140  {0,1},
141  {0,-1},
142  {1,0},
143  {0,1},
144  {-1,0},
145  {0,-1},
146  {1,0}
147  };
148 
149  static int vectorsideorder [18] = {0,1,4,1,2,5,2,3,6,3,0,7,4,5,6,7,8,8};
150 
151  static int bilinearounao [18] = {0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1};
152 //static int bilinearounao [18] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};//full hdiv
153 void TPZQuadrilateral::SetHdivType(EHdivType val){
154  switch (val) {
155  case HdivFull:
156  for(int i=12; i< 18; i++) bilinearounao[i] = 0;
157  break;
158  case HdivConform:
159  for(int i=12; i< 18; i++) bilinearounao[i] = 1;
160  break;
161  default:
162  DebugStop();
163  break;
164  }
165 }
166 
167  static int direcaoksioueta [18] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1};
168 
169  int TPZQuadrilateral::fPermutations [8][9] =
170  {
171  {0,1,2,3,4,5,6,7,8}, // id 0
172  {0,3,2,1,7,6,5,4,8}, // id 1
173  {1,2,3,0,5,6,7,4,8}, // id 2
174  {1,0,3,2,4,7,6,5,8}, // id 3
175  {2,3,0,1,6,7,4,5,8}, // id 4
176  {2,1,0,3,5,4,7,6,8}, // id 5
177  {3,0,1,2,7,4,5,6,8}, // id 6
178  {3,2,1,0,6,5,4,7,8} // id 7
179  };
180 
181  REAL TPZQuadrilateral::fTangentVectors [16][2] =
182  {
183  {0.25,0.0}, //id 0
184  {0.0,0.25}, //id 0
185  {0.0,0.25}, //id 1
186  {0.25,0.0}, //id 1
187  {-0.25,0.0}, //id 3
188  {0.0,0.25}, //id 3
189  {0.0,0.25}, //id 2
190  {-0.25,0.0}, //id 2
191  {0.0,-0.25}, //id 5
192  {-0.25,0.0}, //id 5
193  {-0.25,0.0}, //id 4
194  {0.0,-0.25}, //id 4
195  {0.0,-0.25}, //id 6
196  {0.25,0.0}, //id 6
197  {0.25,0.0}, //id 7
198  {0.0,-0.25} //id 7
199  };
200 
201  template<class T>
202  inline void TPZQuadrilateral::TShape(const TPZVec<T> &loc,TPZFMatrix<T> &phi,TPZFMatrix<T> &dphi) {
203  T qsi = loc[0], eta = loc[1];
204 
205  phi(0,0) = 0.25*(1.-qsi)*(1.-eta);
206  phi(1,0) = 0.25*(1.+qsi)*(1.-eta);
207  phi(2,0) = 0.25*(1.+qsi)*(1.+eta);
208  phi(3,0) = 0.25*(1.-qsi)*(1.+eta);
209 
210  dphi(0,0) = 0.25*(eta-1.);
211  dphi(1,0) = 0.25*(qsi-1.);
212 
213  dphi(0,1) = 0.25*(1.-eta);
214  dphi(1,1) =-0.25*(1.+qsi);
215 
216  dphi(0,2) = 0.25*(1.+eta);
217  dphi(1,2) = 0.25*(1.+qsi);
218 
219  dphi(0,3) =-0.25*(1.+eta);
220  dphi(1,3) = 0.25*(1.-qsi);
221 
222 
223  }
224 
225  template<class T>
226  void TPZQuadrilateral::BlendFactorForSide(const int &side, const TPZVec<T> &xi, T &blendFactor,
227  TPZVec<T> &corrFactorDxi){
228  const REAL tol = pztopology::GetTolerance();
229 #ifdef PZDEBUG
230  std::ostringstream sout;
231  if(side < NCornerNodes || side >= NSides){
232  sout<<"The side\t"<<side<<"is invalid. Aborting..."<<std::endl;
233 
234  PZError<<std::endl<<sout.str()<<std::endl;
235  DebugStop();
236  }
237 
238  if(!IsInParametricDomain(xi,tol)){
239  sout<<"The method BlendFactorForSide expects the point xi to correspond to coordinates of a point";
240  sout<<" inside the parametric domain. Aborting...";
241  PZError<<std::endl<<sout.str()<<std::endl;
242  #ifdef LOG4CXX
243  LOGPZ_FATAL(logger,sout.str().c_str());
244  #endif
245  DebugStop();
246  }
247 #endif
248  TPZFNMatrix<4,T> phi(NCornerNodes,1);
249  TPZFNMatrix<8,T> dphi(Dimension,NCornerNodes);
250  TPZQuadrilateral::TShape(xi,phi,dphi);
251  corrFactorDxi.Resize(TPZQuadrilateral::Dimension, (T) 0);
252  int i = -1;
253  switch(side){
254  case 0:
255  case 1:
256  case 2:
257  case 3:
258  blendFactor = 0;
259  return;
260  case 4:
261  i = 0;
262  break;
263  case 5:
264  i = 1;
265  break;
266  case 6:
267  i = 2;
268  break;
269  case 7:
270  i = 3;
271  break;
272  case 8:
273  blendFactor = 1;
274  return;
275  }
276  blendFactor = phi(i,0) + phi((i+1)%NCornerNodes,0);
277  corrFactorDxi[0] = dphi(0,i) + dphi(0,(i+1)%NCornerNodes);
278  corrFactorDxi[1] = dphi(1,i) + dphi(1,(i+1)%NCornerNodes);
279  }
280 
281  int TPZQuadrilateral::NBilinearSides()
282  {
283  return 6;
284  }
285 
286  int TPZQuadrilateral::SideNodeLocId(int side, int node)
287  {
288  if(side<4 && node==0) return side;
289  if(side>=4 && side<8 && node <2) return (side+node)%4;
290  if(side==8 && node <4) return node;
291  PZError << "TPZQuadrilateral::SideNodeLocId inconsistent side or node " << side
292  << ' ' << node << endl;
293  return -1;
294  }
295 
296  void TPZQuadrilateral::LowerDimensionSides(int side,TPZStack<int> &smallsides)
297  {
298  smallsides.Resize(0);
299  int nsidecon = NContainedSides(side);
300  int is;
301  for(is=0; is<nsidecon-1; is++)
302  smallsides.Push(ContainedSideLocId(side,is));
303  }
304 
305  void TPZQuadrilateral::LowerDimensionSides(int side,TPZStack<int> &smallsides, int DimTarget)
306  {
307  smallsides.Resize(0);
308  int nsidecon = NContainedSides(side);
309  for(int is = 0; is < nsidecon - 1; is++) {
310  if (SideDimension(ContainedSideLocId(side,is)) == DimTarget) smallsides.Push(ContainedSideLocId(side,is));
311  }
312  }
313 
314  void TPZQuadrilateral::HigherDimensionSides(int side, TPZStack<int> &high)
315  {
316  if(side <0 || side >= NSides) {
317  PZError << "TPZQuadrilateral::HigherDimensionSides side "<< side << endl;
318  }
319  int is;
320  for(is=0; is<nhighdimsides[side]; is++) high.Push(highsides[side][is]);
321 
322  }
323 
324  void TPZQuadrilateral::CenterPoint(int side, TPZVec<REAL> &center) {
325  if (center.size()!=Dimension) {
326  DebugStop();
327  }
328  int i;
329  for(i=0; i<Dimension; i++) {
330  center[i] = MidSideNode[side][i];
331  }
332  }
333 
334  TPZIntPoints * TPZQuadrilateral::CreateSideIntegrationRule(int side, int order){
335  if(side<0 || side>8) {
336  PZError << "TPZQuadrilateral::CreateSideIntegrationRule wrong side " << side << endl;
337  return 0;
338  }
339  if(side<4) return new TPZInt1Point(order); // sides 0 to 3 are vertices (corners)
340  if(side<8) return new TPZInt1d(order); // sides 4 to 7 are lines
341  if(side==8) return new IntruleType(order,order); // integration of the element
342  return 0;
343  }
344 
345 
346  TPZTransform<> TPZQuadrilateral::TransformElementToSide(int side){
347 
348  if(side<0 || side>8){
349  PZError << "TPZShapeQuad::TransformElementToSide called with side error\n";
350  return TPZTransform<>(0,0);
351  }
352 
353  TPZTransform<> t(sidedimension[side],2);//t(dimto,2)
354  t.Mult().Zero();
355  t.Sum().Zero();
356 
357  switch(side){
358  case 0:
359  case 1:
360  case 2:
361  case 3:
362  return t;
363  case 4:
364  t.Mult()(0,0) = 1.0; // 1;
365  return t;
366  case 5 :
367  t.Mult()(0,1) = 1.0;
368  return t;
369  case 6:
370  t.Mult()(0,0) = -1.0;
371  return t;
372  case 7:
373  t.Mult()(0,1) = -1.0;
374  return t;
375  case 8:
376  t.Mult()(0,0) = 1.0;
377  t.Mult()(1,1) = 1.0;
378  return t;
379  }
380  return TPZTransform<>(0,0);
381 
382  }
383 
384  bool TPZQuadrilateral::IsInParametricDomain(const TPZVec<REAL> &pt, REAL tol){
385  const REAL qsi = pt[0];
386  const REAL eta = pt[1];
387  if( ( fabs(qsi) <= 1. + tol ) && ( fabs(eta) <= 1. + tol ) ){
388  return true;
389  }
390  else{
391  return false;
392  }
393  }//method
394 
396  void TPZQuadrilateral::RandomPoint(TPZVec<REAL> &pt)
397  {
398  for(int i=0; i<2; i++)
399  {
400  REAL val = -1. + 2.*(REAL) rand() / (RAND_MAX);
401  pt[i] = val;
402  }
403  }
404 
405  template<class T>
406  bool TPZQuadrilateral::CheckProjectionForSingularity(const int &side, const TPZVec<T> &xiInterior) {
407  return true;
408  }
409 
410  template<class T>
411  void TPZQuadrilateral::MapToSide(int side, TPZVec<T> &InternalPar, TPZVec<T> &SidePar, TPZFMatrix<T> &JacToSide) {
412  TPZTransform<T> Transf;
414  SidePar.Resize(SideDimension(side));
415  Transf.Apply(InternalPar,SidePar);
416 
417  int R = Transf.Mult().Rows();
418  int C = Transf.Mult().Cols();
419 
420  JacToSide.Resize(R,C);
421  for(int i = 0; i < R; i++)
422  {
423  for(int j = 0; j < C; j++) JacToSide(i,j) = Transf.Mult()(i,j);
424  }
425  }
426 
427  void TPZQuadrilateral::ParametricDomainNodeCoord(int node, TPZVec<REAL> &nodeCoord)
428  {
429  if(node > NCornerNodes)
430  {
431  DebugStop();
432  }
433  nodeCoord.Resize(Dimension, 0.);
434  switch (node) {
435  case (0):
436  {
437  nodeCoord[0] = -1.;
438  nodeCoord[1] = -1.;
439  break;
440  }
441  case (1):
442  {
443  nodeCoord[0] = 1.;
444  nodeCoord[1] = -1.;
445  break;
446  }
447  case (2):
448  {
449  nodeCoord[0] = 1.;
450  nodeCoord[1] = 1.;
451  break;
452  }
453  case (3):
454  {
455  nodeCoord[0] = -1.;
456  nodeCoord[1] = 1.;
457  break;
458  }
459  default:
460  {
461  DebugStop();
462  break;
463  }
464  }
465  }
466 
467  MElementType TPZQuadrilateral::Type()
468  {
469  return EQuadrilateral;
470  }
471 
472  MElementType TPZQuadrilateral::Type(int side)
473  {
474  switch(side) {
475  case 0:
476  case 1:
477  case 2:
478  case 3:
479  return EPoint;
480  case 4:
481  case 5:
482  case 6:
483  case 7:
484  return EOned;
485  case 8:
486  return EQuadrilateral;
487  default:
488  return ENoType;
489  }
490  }
491 
492  TPZTransform<> TPZQuadrilateral::SideToSideTransform(int sidefrom, int sideto)
493  {
494  if(sidefrom <0 || sidefrom >= NSides || sideto <0 || sideto >= NSides) {
495  PZError << "TPZShapeQuad::SideToSideTransform sidefrom "<< sidefrom <<
496  ' ' << sideto << endl;
497  return TPZTransform<>(0);
498  }
499  if(sidefrom == sideto) {
500  return TPZTransform<>(sidedimension[sidefrom]);
501  }
502  if(sidefrom == NSides-1) {
503  return TransformElementToSide(sideto);
504  }
505 
506  if (sideto == NSides -1) {
507  TransformSideToElement(sidefrom);
508  }
509 
510  int nhigh = nhighdimsides[sidefrom];
511  int is;
512  for(is=0; is<nhigh; is++) {
513  if(highsides[sidefrom][is] == sideto) {
514  int dfr = sidedimension[sidefrom];
515  int dto = sidedimension[sideto];
516  TPZTransform<> trans(dto,dfr);
517  int i,j;
518  for(i=0; i<dto; i++) {
519  for(j=0; j<dfr; j++) {
520  trans.Mult()(i,j) = sidetosidetransforms[sidefrom][is][j][i];
521  }
522  trans.Sum()(i,0) = sidetosidetransforms[sidefrom][is][3][i];
523  }
524  return trans;
525  }
526  }
527  PZError << "TPZShapeQuad::SideToSideTransform highside not found sidefrom "
528  << sidefrom << ' ' << sideto << ".\n";
529  return TPZTransform<>(0);
530  }
531 
532 
533  int TPZQuadrilateral::SideDimension(int side) {
534  if(side<0 || side >= NSides) {
535  PZError << "TPZShapeQuad::SideDimension. Out of scope side " << side << ".\n";
536  return -1;
537  }
538  return sidedimension[side];
539  }
540 
541  int TPZQuadrilateral::NContainedSides(int side) {
542  if(side<0 || side>8) {
543  PZError << "TPZShapeQuad::NContainedSides. Bad parameter side = " << side << ".\n";
544  return 0;
545  }
546  if(side<4) return 1;
547  if(side<8) return 3;
548  return 9;//Cedric
549  }
550 
551  int TPZQuadrilateral::NumSides(int dimension) {
552  if(dimension<0 || dimension> 2) {
553  PZError << "TPZShapeQuad::NumSides. Bad parameter dimension = " << dimension << ".\n";
554  return 0;
555  }
556  if(dimension==0) return 4;
557  if(dimension==1) return 4;
558  if(dimension==2) return 1;
559  return -1;
560 
561  }
562 
564  // side é o lado do elemento, c é o noh do lado
565  int TPZQuadrilateral::ContainedSideLocId(int side,int c) {
566  switch(side) {
567  case 0:
568  case 1:
569  case 2:
570  case 3:
571  return side;
572  case 4:
573  case 5:
574  case 6:
575  case 7:
576  if(!c) return side-4;
577  if(c==1) return (side-3)%4;
578  if(c==2) return side;
579  case 8:
580  return c;
581  default:
582  PZError << "TPZShapeQuad::ContainedSideLocId, connect = " << c << endl;
583  return -1;
584  }
585  }
586 
587 
588  TPZTransform<> TPZQuadrilateral::TransformSideToElement(int side){
589 
590  if(side<0 || side>8){
591  PZError << "TPZShapeQuad::TransformSideToElement side out range\n";
592  return TPZTransform<>(0,0);
593  }
594  TPZTransform<> t(2,sidedimension[side]);
595  t.Mult().Zero();
596  t.Sum().Zero();
597 
598  switch(side){
599  case 0:
600  t.Sum()(0,0) = -1.0;
601  t.Sum()(1,0) = -1.0;
602  return t;
603  case 1:
604  t.Sum()(0,0) = 1.0;
605  t.Sum()(1,0) = -1.0;
606  return t;
607  case 2:
608  t.Sum()(0,0) = 1.0;
609  t.Sum()(1,0) = 1.0;
610  return t;
611  case 3:
612  t.Sum()(0,0) = -1.0;
613  t.Sum()(1,0) = 1.0;
614  return t;
615  case 4:
616  t.Mult()(0,0) = 1.0;
617  t.Sum() (1,0) = -1.0;
618  return t;
619  case 5:
620  t.Mult()(1,0) = 1.0;
621  t.Sum() (0,0) = 1.0;
622  return t;
623  case 6:
624  t.Mult()(0,0) = -1.0;
625  t.Sum() (1,0) = 1.0;
626  return t;
627  case 7:
628  t.Mult()(1,0) = -1.0;
629  t.Sum() (0,0) = -1.0;
630  return t;
631  case 8:
632  t.Mult()(0,0) = 1.0;
633  t.Mult()(1,1) = 1.0;
634  return t;
635  }
636  return TPZTransform<>(0,0);
637  }
638 
639 
646  int TPZQuadrilateral::GetTransformId(TPZVec<int64_t> &id)
647  {
648  int id0, id1, minid;
649  id0 = (id[0] < id[1]) ? 0 : 1;
650  id1 = (id[2] < id[3]) ? 2 : 3;
651  minid = (id[id0] < id[id1]) ? id0 : id1;//minid : menor id local
652  id0 = (minid + 1) % 4;//id anterior local (sentido antihorario)
653  id1 = (minid + 3) % 4;//id posterior local (sentido horario)
654  minid = id[minid];//minid : menor id global
655 
656  if (id[id0] < id[id1]) {//antihorario
657 
658  if (minid == id[0]) return 0;
659  if (minid == id[1]) return 2;
660  if (minid == id[2]) return 4;
661  if (minid == id[3]) return 6;
662 
663  }
664  else {//horario
665 
666  if (minid == id[0]) return 1;
667  if (minid == id[1]) return 3;
668  if (minid == id[2]) return 5;
669  if (minid == id[3]) return 7;
670  }
671  return 0;
672 
673  }
674 
678  void TPZQuadrilateral::GetGatherPermute(int transformid, TPZVec<int> &permute)
679  {
680 #ifdef PZDEBUG
681  if (permute.size() != 9) {
682  DebugStop();
683  }
684 #endif
685  int dir = 1;
686  if (transformid%2 ==1) dir = -1;
687  int runsmall = transformid/4;
688  int runlarge = runsmall+4;
689  permute[8] = 8;
690  for (int is=0; is<4; is++) {
691  permute[is] = runsmall;
692  permute[is+4] = runlarge;
693  runsmall += dir;
694  runlarge += dir;
695  if (dir == 1 && runsmall > 3) {
696  runsmall -= 4;
697  runlarge -= 4;
698  }
699  else if(dir == -1 && runsmall < 0)
700  {
701  runsmall += 4;
702  runlarge += 4;
703  }
704  }
705  }
706 
713  int TPZQuadrilateral::GetTransformId(int side, TPZVec<int64_t> &id)
714  {
715  switch (side) {
716  case 0:
717  case 1:
718  case 2:
719  case 3:
720  return 0;
721  break;
722  case 4:
723  case 5:
724  case 6:
725  case 7:
726  {
727 
728  int in1 = ContainedSideLocId(side,0);
729  int in2 = ContainedSideLocId(side,1);
730  return id[in1]<id[in2] ? 0 : 1;
731  }
732  break;
733  case 8:
734  {
735  return GetTransformId(id);
736  }
737  break;
738  default:
739  break;
740  }
741  LOGPZ_ERROR(logger,"Wrong side parameter")
742  return -1;
743  }
744 
752  void TPZQuadrilateral::GetSideHDivPermutation(int transformationid, TPZVec<int> &permgather)
753  {
754 // permgather.Resize(9);
755 #ifdef PZDEBUG
756  if (transformationid < 0 || transformationid > 8 || permgather.size() != 9) {
757  DebugStop();
758  }
759 #endif
760 
761  for (int i=0; i<9; i++)
762  {
763  permgather[i] = fPermutations[transformationid][i];
764  }
765  return;
766  int i;
767 
768  if(transformationid%2 == 0)
769  {
770  switch (transformationid)
771  {
772  case 0:
773  for(i=0; i<9; i++) permgather[i] = i;
774  break;
775  case 2:
776  for(i=0; i<4; i++) permgather[i] = (i+1)%4;
777  for(i=4; i<8; i++) permgather[i] = 4+(i+1)%4;
778  permgather[8] = 8;
779  break;
780  case 4:
781  for(i=0; i<4; i++) permgather[i] = (i+2)%4;
782  for(i=4; i<8; i++) permgather[i] = 4+(i+2)%4;
783  permgather[8] = 8;
784  break;
785  case 6:
786  for(i=0; i<4; i++) permgather[i] = (i+3)%4;
787  for(i=4; i<8; i++) permgather[i] = 4+(i+3)%4;
788  permgather[8] = 8;
789  break;
790  }
791  }
792  else
793  {
794  TPZManVector<int,4> invid(4);
795  invid[0] = 0;
796  invid[1] = 3;
797  invid[2] = 2;
798  invid[3] = 1;
799  switch (transformationid) {
800  case 1:
801  for(i=0; i<4; i++) permgather[i] = invid[i];
802  for(i=4; i<8; i++) permgather[i] = 4+invid[(i+1)%4];
803  permgather[8] = 8;
804  break;
805  case 3:
806  for(i=0; i<4; i++) permgather[i] = invid[(i+1)%4];
807  for(i=4; i<8; i++) permgather[i] = 4+invid[(i+2)%4];
808  permgather[8] = 8;
809  break;
810  case 5:
811  for(i=0; i<4; i++) permgather[i] = invid[(i+2)%4];
812  for(i=4; i<8; i++) permgather[i] = 4+invid[(i+3)%4];
813  permgather[8] = 8;
814  break;
815  case 7:
816  for(i=0; i<4; i++) permgather[i] = invid[(i+3)%4];
817  for(i=4; i<8; i++) permgather[i] = 4+invid[(i+0)%4];
818  permgather[8] = 8;
819  break;
820  default:
821  break;
822  }
823  }
824 
825 
826 
827 
828  /*
829  switch (transformationid)
830  {
831  case 0:
832  {
833  for (int i=0; i<9; i++)
834  {
835  permgather[i] = fPermutations[0][i];
836  }
837  }
838  break;
839  case 1:
840  {
841  for (int i=0; i<9; i++)
842  {
843  permgather[i] = fPermutations[1][i];
844  }
845  }
846  break;
847  case 2:
848  {
849  for (int i=0; i<9; i++)
850  {
851  permgather[i] = fPermutations[2][i];
852  }
853  }
854  break;
855  case 3:
856  {
857  for (int i=0; i<9; i++)
858  {
859  permgather[i] = fPermutations[3][i];
860  }
861  }
862  break;
863  case 4:
864  {
865  for (int i=0; i<9; i++)
866  {
867  permgather[i] = fPermutations[4][i];
868  }
869  }
870  break;
871  case 5:
872  {
873  for (int i=0; i<9; i++)
874  {
875  permgather[i] = fPermutations[5][i];
876  }
877  }
878  break;
879  case 6:
880  {
881  for (int i=0; i<9; i++)
882  {
883  permgather[i] = fPermutations[6][i];
884  }
885  }
886  break;
887  case 7:
888  {
889  for (int i=0; i<9; i++)
890  {
891  permgather[i] = fPermutations[7][i];
892  }
893  }
894  break;
895  default:
896  DebugStop();
897  break;
898  }*/
899 
900 
901  /*
902  switch (side) {
903  case 0:
904  case 1:
905  case 2:
906  case 3:
907  permgather[0] = 0;
908  break;
909  case 4:
910  case 5:
911  case 6:
912  case 7:
913  {
914  int in1 = ContainedSideLocId(side,0);
915  int in2 = ContainedSideLocId(side,1);
916  if(in1<in2)
917  {
918  permgather[0] = 0;
919  permgather[1] = 1;
920  permgather[2] = 2;
921  }
922  else
923  {
924  permgather[0] = 1;
925  permgather[1] = 0;
926  permgather[2] = 2;
927  }
928  }
929  break;
930  case 8:
931  {
932  int i;
933  int tid = pzshape::TPZShapeQuad::GetTransformId2dQ(id);
934  if(tid%2 == 0)
935  {
936  switch (tid)
937  {
938  case 0:
939  for(i=0; i<9; i++) permgather[i] = i;
940  break;
941  case 2:
942  for(i=0; i<4; i++) permgather[i] = (i+1)%4;
943  for(i=4; i<8; i++) permgather[i] = 4+(i+1)%4;
944  permgather[8] = 8;
945  break;
946  case 4:
947  for(i=0; i<4; i++) permgather[i] = (i+2)%4;
948  for(i=4; i<8; i++) permgather[i] = 4+(i+2)%4;
949  permgather[8] = 8;
950  break;
951  case 6:
952  for(i=0; i<4; i++) permgather[i] = (i+3)%4;
953  for(i=4; i<8; i++) permgather[i] = 4+(i+3)%4;
954  permgather[8] = 8;
955  break;
956  }
957  }
958  else
959  {
960  TPZManVector<int,4> invid(4);
961  invid[0] = 0;
962  invid[1] = 3;
963  invid[2] = 2;
964  invid[3] = 1;
965  switch (tid) {
966  case 1:
967  for(i=0; i<4; i++) permgather[i] = invid[i];
968  for(i=4; i<8; i++) permgather[i] = 4+invid[(i+0)%4];
969  permgather[8] = 8;
970  break;
971  case 3:
972  for(i=0; i<4; i++) permgather[i] = invid[(i+1)%4];
973  for(i=4; i<8; i++) permgather[i] = 4+invid[(i+1)%4];
974  permgather[8] = 8;
975  break;
976  case 5:
977  for(i=0; i<4; i++) permgather[i] = invid[(i+2)%4];
978  for(i=4; i<8; i++) permgather[i] = 4+invid[(i+2)%4];
979  permgather[8] = 8;
980  break;
981  case 7:
982  for(i=0; i<4; i++) permgather[i] = invid[(i+3)%4];
983  for(i=4; i<8; i++) permgather[i] = 4+invid[(i+3)%4];
984  permgather[8] = 8;
985  break;
986  default:
987  break;
988  }
989  }
990  }
991  break;
992  default:
993  break;
994  }
995  LOGPZ_ERROR(logger,"Wrong side parameter")*/
996  }
997 
998  void computedirectionsq(int inicio, int fim, TPZFMatrix<REAL> &bvec, TPZFMatrix<REAL> &t1vec,
999  TPZFMatrix<REAL> &gradx, TPZFMatrix<REAL> &directions);
1000  void computedirectionsq(int inicio, int fim, TPZFMatrix<REAL> &bvec, TPZFMatrix<REAL> &t1vec,
1001  TPZFMatrix<REAL> &gradx, TPZFMatrix<REAL> &directions)
1002  {
1003  REAL detgrad = 0.0;
1004  TPZVec<REAL> u(3);
1005  TPZVec<REAL> v(3);
1006  TPZVec<REAL> uxv(3);// result
1007 
1008  for (int ilin=0; ilin<3; ilin++)
1009  {
1010  u[ilin] = gradx(ilin, 0);
1011  v[ilin] = gradx(ilin, 1);
1012  }
1013 
1014  //TPZNumeric::ProdVetorial(u,v,uxv);
1015  uxv[0] = u[1]*v[2]-u[2]*v[1];
1016  uxv[1] = -(u[0]*v[2]-v[0]*u[2]);
1017  uxv[2] = u[0]*v[1]-v[0]*u[1];
1018 
1019  for (int pos=0; pos<3; pos++)
1020  {
1021  detgrad += uxv[pos]*uxv[pos];
1022  }
1023  detgrad = sqrt(fabs(detgrad));
1024 
1025  int cont = 0;
1026 
1027  for (int ivet=inicio; ivet<=fim; ivet++)
1028  {
1029  TPZFMatrix<REAL> Wvec(3,1);
1030  TPZVec<REAL> uxvtmp(3);
1031  REAL acumng = 0.0;
1032  // calc do g gradx*t
1033  TPZManVector<REAL,3> gvec(3,0.),Vvec(3,0.);
1034  REAL gvecnorm;
1035  for (int il=0; il<3; il++)
1036  {
1037  for (int i = 0 ; i<2; i++)
1038  {
1039  gvec[il] += gradx(il,i) * t1vec(i,ivet);
1040  Vvec[il] += gradx(il,i) * bvec(i,ivet);
1041  }
1042  u[il] = gvec[il];
1043  acumng += gvec[il]*gvec[il];
1044  }
1045  gvecnorm = sqrt(acumng);
1046 
1047  for (int il=0; il<3; il++)
1048  {
1049  Wvec(il,0) = Vvec[il]*gvecnorm/detgrad;
1050  directions(il,cont) = Wvec(il,0);
1051  }
1052  cont++;
1053  }
1054 
1055 
1056  }
1057 
1058  void TPZQuadrilateral::ComputeDirections(int side, TPZFMatrix<REAL> &gradx, TPZFMatrix<REAL> &directions, TPZVec<int> &sidevectors)
1059  {
1060  if(gradx.Cols()!=2)
1061  {
1062  DebugStop();
1063  }
1064  TPZFMatrix<REAL> bvec(2,18);
1065  TPZFMatrix<REAL> t1vec(2,18);
1066 
1067  bvec.Redim(2, 18);
1068  t1vec.Redim(2, 18);
1069  directions.Redim(3, 18);
1070  for (int lin = 0; lin<18; lin++)
1071  {
1072  for(int col = 0;col<2;col++)
1073  {
1074  bvec.PutVal(col, lin, bQuad[lin][col]);
1075  t1vec.PutVal(col, lin, tQuad[lin][col]);
1076  }
1077  }
1078  // calcula os vetores
1079 
1080  switch (side) {
1081  case 0:
1082  {
1083  }
1084  break;
1085  case 1:
1086  {
1087  }
1088  break;
1089  case 2:
1090  {
1091  }
1092  break;
1093  case 3:
1094  {
1095  }
1096  break;
1097  case 4:
1098  {
1099  directions.Redim(3, 3);
1100  sidevectors.Resize(3);
1101  int inumvec = 0, fnumvec = 2;
1102  computedirectionsq(inumvec, fnumvec, bvec, t1vec, gradx, directions);
1103  for (int ip = 0; ip < 3; ip++) {
1104  sidevectors[ip] = vectorsideorder[ip];
1105  }
1106 
1107  }
1108  break;
1109  case 5:
1110  {
1111  directions.Redim(3, 3);
1112  sidevectors.Resize(3);
1113  int inumvec = 3, fnumvec = 5;
1114  computedirectionsq(inumvec, fnumvec, bvec, t1vec, gradx, directions);
1115  for (int ip = 0; ip < 3; ip++) {
1116  sidevectors[ip] = vectorsideorder[ip+inumvec];
1117  }
1118  }
1119  break;
1120  case 6:
1121  {
1122  directions.Redim(3, 3);
1123  sidevectors.Resize(3);
1124  int inumvec = 6, fnumvec = 8;
1125  computedirectionsq(inumvec, fnumvec, bvec, t1vec, gradx, directions);
1126  for (int ip = 0; ip < 3; ip++) {
1127  sidevectors[ip] = vectorsideorder[ip+inumvec];
1128  }
1129  }
1130  break;
1131  case 7:
1132  {
1133  directions.Redim(3, 3);
1134  sidevectors.Resize(3);
1135  int inumvec = 9, fnumvec = 11;
1136  computedirectionsq(inumvec, fnumvec, bvec, t1vec, gradx, directions);
1137  for (int ip = 0; ip < 3; ip++) {
1138  sidevectors[ip] = vectorsideorder[ip+inumvec];
1139  }
1140  }
1141  break;
1142  case 8:
1143  {
1144  directions.Redim(3, 6);
1145  sidevectors.Resize(6);
1146  int inumvec = 12, fnumvec = 17;
1147  computedirectionsq(inumvec, fnumvec, bvec, t1vec, gradx, directions);
1148  for (int ip = 0; ip < 6; ip++) {
1149  sidevectors[ip] = vectorsideorder[ip+inumvec];
1150  }
1151  }
1152  break;
1153 
1154  default:
1155  DebugStop();
1156  break;
1157  }
1158 
1159 
1160  }
1161 
1162  template <class TVar>
1163  void TPZQuadrilateral::ComputeHDivDirections(TPZFMatrix<TVar> &gradx, TPZFMatrix<TVar> &directions)
1164  {
1165  TVar detjac = TPZAxesTools<TVar>::ComputeDetjac(gradx);
1166 
1167  TPZManVector<TVar, 3> v1(3),v2(3);
1168  for (int i=0; i<3; i++) {
1169  v1[i] = gradx(i,0)/detjac;
1170  v2[i] = gradx(i,1)/detjac;
1171  }
1172 
1179  for (int i=0; i<3; i++)
1180  {
1181  for (int v=0; v<3; v++)
1182  {
1183  directions(i,v) = -v2[i];
1184  directions(i,v+3) = v1[i];
1185  directions(i,v+6) = v2[i];
1186  directions(i,v+9) = -v1[i];
1187  }
1188 
1189  directions(i,12) = v1[i];
1190  directions(i,13) = v2[i];
1191  directions(i,14) = -v1[i];
1192  directions(i,15) = -v2[i];
1193 
1194  directions(i,16) = v1[i];
1195  directions(i,17) = v2[i];
1196  }
1197  }
1198 
1199  template <class TVar>
1200  void TPZQuadrilateral::ComputeHCurlDirections(TPZFMatrix<TVar> &gradx, TPZFMatrix<TVar> &directions,const TPZVec<int> &transformationIds)
1201  {
1202  const auto dim = gradx.Rows();
1203  TPZManVector<TVar, 3> v1(dim),v2(dim);
1204  for (int i=0; i<dim; i++) {
1205  v1[i] = gradx(i,0);
1206  v2[i] = gradx(i,1);
1207  }
1208  constexpr auto nEdges{4};
1209  constexpr REAL faceArea{TPZQuadrilateral::RefElVolume()};
1210  const int facePermute = transformationIds[nEdges];
1211 
1212  TPZManVector<REAL,nEdges> edgeSign(nEdges,0);
1213  for(auto iEdge = 0; iEdge < nEdges; iEdge++){
1214  edgeSign[iEdge] = transformationIds[iEdge] == 0 ? 1 : -1;
1215  }
1216 
1217  for (int i=0; i<dim; i++)
1218  {
1219  for(int iSide = 0; iSide < 4; iSide ++){
1220  int sign = iSide /2 ? -1 : 1;// sign will be : 1 1 -1 -1
1221  sign *= edgeSign[iSide];
1222  //v^{e,a} constant vector fields associated with edge e and vertex a
1223  //they are defined in such a way that v^{e,a} is normal to the edge \hat{e}
1224  //adjacent to edge e by the vertex a. the tangential component is set to be 1 /edgeLength[e] = 0.5
1225  directions(i,iSide * 2) =
1226  directions(i,iSide * 2 + 1) =
1227  //v^{e,T} constant vector fields associated with edge e and aligned with it
1228  directions(i,8 + iSide) =
1229  iSide % 2 ? sign * 0.5 * v2[i] : sign * 0.5 * v1[i];//vectors will be v1 v2 -v1 -v2
1230 
1231  sign = ((iSide + 1) / 2) %2 ? -1 : 1;// sign will be : 1 -1 -1 1
1232  sign *= edgeSign[iSide];
1233  //v^{F,e} constant vector fields associated with face F and edge e
1234  //they are defined in such a way that v^{F,e} is normal to the face \hat{F}
1235  //adjacent to face F by edge e
1236  directions(i,12 + iSide) = iSide % 2 ? sign * v1[i] : sign * v2[i];//vectors will be v2 -v1 -v2 v1
1237  directions(i,12 + iSide) /= faceArea;
1238  }
1239  //v^{F,T} orthonormal vectors associated with face F and tangent to it.
1240  directions(i,16) = fTangentVectors[2*facePermute][i];
1241  directions(i,17) = fTangentVectors[2*facePermute + 1][i];
1242  }
1243  }
1244 
1245  template <class TVar>
1246  void TPZQuadrilateral::ComputeHCurlFaceDirections(TPZVec<TVar> &v1, TPZVec<TVar> &v2, int transformationId)
1247  {
1248  for (auto i=0; i< Dimension; i++){
1249  //v^{F,T} orthonormal vectors associated with face F and tangent to it.
1250  v1[i] = fTangentVectors[2*transformationId][i];
1251  v2[i] = fTangentVectors[2*transformationId + 1][i];
1252  }//for
1253  }
1254  void TPZQuadrilateral::GetSideHDivDirections(TPZVec<int> &sides, TPZVec<int> &dir, TPZVec<int> &bilounao)
1255  {
1256  int nsides = NumSides()*2;
1257 
1258  sides.Resize(nsides);
1259  dir.Resize(nsides);
1260  bilounao.Resize(nsides);
1261 
1262  for (int is = 0; is<nsides; is++)
1263  {
1264  sides[is] = vectorsideorder[is];
1265  dir[is] = direcaoksioueta[is];
1266  bilounao[is] = bilinearounao[is];
1267  }
1268  }
1269  void TPZQuadrilateral::GetSideHDivDirections(TPZVec<int> &sides, TPZVec<int> &dir, TPZVec<int> &bilounao, TPZVec<int> &sidevectors)
1270  {
1271  int nsides = NumSides()*2;
1272 
1273  sides.Resize(nsides);
1274  dir.Resize(nsides);
1275  bilounao.Resize(nsides);
1276 
1277  for (int is = 0; is<nsides; is++)
1278  {
1279  sides[is] = vectorsideorder[is];
1280  dir[is] = direcaoksioueta[is];
1281  bilounao[is] = bilinearounao[is];
1282  }
1283  for (int i=0; i<Dimension*NumSides(); i++) {
1284  sidevectors[i] = vectorsideorder[i];
1285  }
1286  }
1287 
1288  int TPZQuadrilateral::ClassId() const{
1289  return Hash("TPZQuadrilateral");
1290  }
1291 
1292  void TPZQuadrilateral::Read(TPZStream& buf, void* context) {
1293 
1294  }
1295 
1296  void TPZQuadrilateral::Write(TPZStream& buf, int withclassid) const {
1297 
1298  }
1299 
1300 
1301 }
1302 
1303 /**********************************************************************************************************************
1304  * The following are explicit instantiation of member function template of this class, both with class T=REAL and its
1305  * respective FAD<REAL> version. In other to avoid potential errors, always declare the instantiation in the same order
1306  * in BOTH cases. @orlandini
1307  **********************************************************************************************************************/
1308 template bool pztopology::TPZQuadrilateral::CheckProjectionForSingularity<REAL>(const int &side, const TPZVec<REAL> &xiInterior);
1309 
1310 template void pztopology::TPZQuadrilateral::MapToSide<REAL>(int side, TPZVec<REAL> &InternalPar, TPZVec<REAL> &SidePar, TPZFMatrix<REAL> &JacToSide);
1311 
1312 template void pztopology::TPZQuadrilateral::BlendFactorForSide<REAL>(const int &, const TPZVec<REAL> &, REAL &, TPZVec<REAL> &);
1313 
1314 template void pztopology::TPZQuadrilateral::TShape<REAL>(const TPZVec<REAL> &loc,TPZFMatrix<REAL> &phi,TPZFMatrix<REAL> &dphi);
1315 
1316 template void pztopology::TPZQuadrilateral::ComputeHDivDirections<REAL>(TPZFMatrix<REAL> &gradx, TPZFMatrix<REAL> &directions);
1317 
1318 template void pztopology::TPZQuadrilateral::ComputeHCurlDirections<REAL>(TPZFMatrix<REAL> &gradx, TPZFMatrix<REAL> &directions, const TPZVec<int> &transformationIds);
1319 
1320 template void pztopology::TPZQuadrilateral::ComputeHCurlFaceDirections<REAL>(TPZVec<REAL> &v1, TPZVec<REAL> &v2, int transformationId);
1321 #ifdef _AUTODIFF
1322 template bool pztopology::TPZQuadrilateral::CheckProjectionForSingularity<Fad<REAL>>(const int &side, const TPZVec<Fad<REAL>> &xiInterior);
1323 
1324 template void pztopology::TPZQuadrilateral::MapToSide<Fad<REAL> >(int side, TPZVec<Fad<REAL> > &InternalPar, TPZVec<Fad<REAL> > &SidePar, TPZFMatrix<Fad<REAL> > &JacToSide);
1325 
1326 template void pztopology::TPZQuadrilateral::BlendFactorForSide<Fad<REAL>>(const int &, const TPZVec<Fad<REAL>> &, Fad<REAL> &,
1327  TPZVec<Fad<REAL>> &);
1328 template void pztopology::TPZQuadrilateral::TShape<Fad<REAL>>(const TPZVec<Fad<REAL>> &loc,TPZFMatrix<Fad<REAL>> &phi,TPZFMatrix<Fad<REAL>> &dphi);
1329 
1330 template void pztopology::TPZQuadrilateral::ComputeHDivDirections<Fad<REAL>>(TPZFMatrix<Fad<REAL>> &gradx, TPZFMatrix<Fad<REAL>> &directions);
1331 
1332 template void pztopology::TPZQuadrilateral::ComputeHCurlDirections<Fad<REAL>>(TPZFMatrix<Fad<REAL>> &gradx, TPZFMatrix<Fad<REAL>> &directions, const TPZVec<int> &transformationIds);
1333 
1334 template void pztopology::TPZQuadrilateral::ComputeHCurlFaceDirections<Fad<REAL>>(TPZVec<Fad<REAL>> &v1, TPZVec<Fad<REAL>> &v2, int transformationId);
1335 #endif
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ fabs
Definition: tfadfunc.h:140
Contains the TPZInt1d, TPZIntTriang, TPZIntQuad, TPZIntCube3D, TPZIntTetra3D, TPZIntPyram3D and TPZIn...
static int vectorsideorder[18]
Contains definitions to LOGPZ_DEBUG, LOGPZ_INFO, LOGPZ_WARN, LOGPZ_ERROR and LOGPZ_FATAL, and the implementation of the inline InitializePZLOG(string) function using log4cxx library or not. It must to be called out of "#ifdef LOG4CXX" scope.
void computedirectionsq(int inicio, int fim, TPZFMatrix< REAL > &bvec, TPZFMatrix< REAL > &t1vec, TPZFMatrix< REAL > &gradx, TPZFMatrix< REAL > &directions)
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
void CopyFrom(const TPZTransform< REAL > &cp)
Create a copy form a real transformation.
Definition: pztrnsform.cpp:62
const TPZFMatrix< T > & Mult() const
Definition: pztrnsform.h:64
Defines PZError.
static REAL sidetosidetransforms[9][3][4][3]
Definition: fad.h:54
Defines enum MElementType and contains the implementation of MElementType_NNodes(...) functions.
This class implements a simple vector storage scheme for a templated class T. Utility.
Definition: pzgeopoint.h:19
REAL val(STATE &number)
Returns value of the variable.
Definition: pzartdiff.h:23
static TVar ComputeDetjac(TPZFMatrix< TVar > &gradx)
Definition: pzaxestools.h:111
static TPZTransform SideToSideTransform(int sidefrom, int sideto)
returns the transformation which takes a point from the side sidefrom to the side sideto ...
static int direcaoksioueta[18]
static int highsides[9][3]
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
Definition: pzmanvector.h:426
Handles the numerical integration for one-dimensional problems. Numerical Integration.
Definition: pzquad.h:36
static int bilinearounao[18]
#define LOGPZ_FATAL(A, B)
Define log for fatal errors (cout)
Definition: pzlog.h:95
Abstract class defining integration rules. Numerical Integration.
Definition: tpzintpoints.h:19
static int nsidenodes[9]
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
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object reallocating the necessary storage, copying the existing objects to the new...
Definition: pzvec.h:373
Handles the numerical integration for two-dimensional problems using quadrilateral elements...
Definition: pzquad.h:156
static const double tol
Definition: pzgeoprism.cpp:23
Groups all classes defining the structure of the master element.
Definition: PrismExtend.cpp:15
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.
Contains the TPZQuadrilateral class which defines the topology of a quadrilateral element...
int64_t Rows() const
Returns number of rows.
Definition: pzmatrix.h:803
static REAL tQuad[18][2]
const TPZFMatrix< T > & Sum() const
Definition: pztrnsform.h:66
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ sqrt
Definition: tfadfunc.h:120
static REAL bQuad[18][2]
static int sidedimension[9]
#define LOGPZ_ERROR(A, B)
Define log for errors (cout)
Definition: pzlog.h:93
int Redim(const int64_t newRows, const int64_t newCols) override
Redimension a matrix and ZERO your elements.
Definition: pzfmatrix.h:616
int32_t Hash(std::string str)
Definition: TPZHash.cpp:10
static int nhighdimsides[9]
Integration rule for one point. Numerical Integration.
Definition: pzquad.h:478
MElementType
Define the element types.
Definition: pzeltype.h:52
int64_t Cols() const
Returns number of cols.
Definition: pzmatrix.h:809
static REAL MidSideNode[9][3]
int Resize(const int64_t newRows, const int64_t wCols) override
Redimension a matrix, but maintain your elements.
Definition: pzfmatrix.cpp:1016
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
Contains the declaration of TPZFlopCounter class and TPZCounter struct.
Implements an affine transformation between points in parameter space. Topology Utility.
Definition: pzmganalysis.h:14
Definition: pzeltype.h:55
Contains declaration of the TPZNumeric class which implements several methods to calculation.
int PutVal(const int64_t row, const int64_t col, const TVar &value) override
Put values without bounds checking This method is faster than "Put" if DEBUG is defined.
Definition: pzfmatrix.h:548
void Apply(TPZVec< T > &vectorin, TPZVec< T > &vectorout)
Transforms the vector.
Definition: pztrnsform.cpp:121
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