NeoPZ
TPZIntQuadQuarterPoint.cpp
Go to the documentation of this file.
1 //
2 // TPZIntQuadQuarterPoint.cpp
3 // PZ
4 //
5 // Created by Philippe Devloo on 6/1/15.
6 //
7 //
8 
10 
11 
13 void TPZIntQuadQuarterPoint::Point(int ip, TPZVec<REAL> &pos, REAL &w) const
14 {
15  TPZManVector<REAL,2> ptr(2);
16  TPZIntQuad::Point(ip/2, ptr, w);
17  REAL theta = (ptr[0]+1.)*M_PI/8.;
18  REAL rrange = 1./cos(theta);
19  REAL r = (ptr[1]+1.)*rrange/2.;
20  w *= r*rrange*M_PI/4.;
21  //std::cout << "ip " << ip << " ptr " << ptr << " theta " << theta << " rrange " << rrange << " r " << r << std::endl;
22 
23  REAL xi,eta;
24  xi = r*cos(theta);
25  eta = r*sin(theta);
26  //std::cout << "xi " << xi << " eta " << eta << std::endl;
27  if (ip%2) {
28  pos[0] = -1.+2.*xi;
29  pos[1] = -1.+2.*eta;
30  }
31  else
32  {
33  pos[0] = -1.+2.*eta;
34  pos[1] = -1.+2.*xi;
35  }
36  switch (fCorner) {
37  case 0:
38  break;
39  case 1:
40  pos[0] = -pos[0];
41  break;
42  case 2:
43  pos[0] = -pos[0];
44  pos[1] = -pos[1];
45  break;
46  case 3:
47  pos[1] = -pos[1];
48  break;
49  default:
50  DebugStop();
51  break;
52  }
53  //std::cout << "pos " << pos << std::endl;
54 }
55 
58 {
59  TPZIntQuad::SetOrder(ord, type);
61 }
62 
Implements a vector class which allows to use external storage provided by the user. Utility.
Definition: pzquad.h:16
virtual int NPoints() const
Returns number of points for the cubature rule related.
Definition: pzquad.cpp:145
sin
Definition: fadfunc.h:63
virtual void SetOrder(TPZVec< int > &ord, int type=0)
set the integration order
#define DebugStop()
Returns a message to user put a breakpoint in.
Definition: pzerror.h:20
int fNPoints
number of integration points
virtual void Point(int ip, TPZVec< REAL > &pos, REAL &w) const
Returns i-th point at master element and related weight.
Definition: pzquad.cpp:153
virtual void SetOrder(TPZVec< int > &ord, int type=0)
Set the order and the type of integration rule :
Definition: pzquad.cpp:176
virtual void Point(int ip, TPZVec< REAL > &pos, REAL &w) const
return the weight and position of the integration point
TPZFlopCounter cos(const TPZFlopCounter &orig)
Returns the cosine in radians and increments the counter of the Cosine.
Definition: pzreal.h:514
int fCorner
corner associated with the integration rule