29 HWCart[0] = HWCylCoords[0];
30 HWCart[1] = HWCylCoords[1] *
cos(HWCylCoords[2]);
31 HWCart[2] = HWCylCoords[1] *
sin(HWCylCoords[2]);
43 HWCyl[1] =
sqrt(cart[1] * cart[1] + cart[2] * cart[2]);
44 HWCyl[2] =
atan2(cart[2], cart[1]);
57 HWCart[0] = Rot(0,0) * PrincipalCoords[0] + Rot(0,1) * PrincipalCoords[1] + Rot(0,2) * PrincipalCoords[2];
58 HWCart[1] = Rot(1,0) * PrincipalCoords[0] + Rot(1,1) * PrincipalCoords[1] + Rot(1,2) * PrincipalCoords[2];
59 HWCart[2] = Rot(2,0) * PrincipalCoords[0] + Rot(2,1) * PrincipalCoords[1] + Rot(2,2) * PrincipalCoords[2];
68 const REAL tempWithXi = (1. /
sqrt(3.)) * HWCylCoords[0];
69 const REAL tempWithRho =
sqrt(2. / 3.) * HWCylCoords[1];
70 PrincipalCoords[0] = tempWithXi + tempWithRho *
cos(HWCylCoords[2]);
71 PrincipalCoords[1] = tempWithXi + tempWithRho *
cos(HWCylCoords[2]-(2. * M_PI / 3.));
72 PrincipalCoords[2] = tempWithXi + tempWithRho *
cos(HWCylCoords[2]+(2. * M_PI / 3.));
81 if ((A.
Rows() != 2 && A.
Cols() != 2) || (Ainv.
Rows() != 2 && Ainv.
Cols() != 2)) {
85 Ainv(0,0)= A(1,1)/(-(A(0,1)*A(1,0)) + A(0,0)*A(1,1));
86 Ainv(0,1)= -(A(0,1)/(-(A(0,1)*A(1,0)) + A(0,0)*A(1,1)));
87 Ainv(1,0)= -(A(1,0)/(-(A(0,1)*A(1,0)) + A(0,0)*A(1,1)));
88 Ainv(1,1)= A(0,0)/(-(A(0,1)*A(1,0)) + A(0,0)*A(1,1));
96 if ((A.
Rows() != 3 && A.
Cols() != 3) || (Ainv.
Rows() != 3 && Ainv.
Cols() != 3)) {
100 Ainv(0,0)= (A(1,2)*A(2,1) - A(1,1)*A(2,2))/(A(0,2)*A(1,1)*A(2,0) - A(0,1)*A(1,2)*A(2,0) - A(0,2)*A(1,0)*A(2,1) + A(0,0)*A(1,2)*A(2,1) + A(0,1)*A(1,0)*A(2,2) - A(0,0)*A(1,1)*A(2,2));
101 Ainv(0,1)= (A(0,2)*A(2,1) - A(0,1)*A(2,2))/(-(A(0,2)*A(1,1)*A(2,0)) + A(0,1)*A(1,2)*A(2,0) + A(0,2)*A(1,0)*A(2,1) - A(0,0)*A(1,2)*A(2,1) - A(0,1)*A(1,0)*A(2,2) + A(0,0)*A(1,1)*A(2,2));
102 Ainv(0,2)= (A(0,2)*A(1,1) - A(0,1)*A(1,2))/(A(0,2)*A(1,1)*A(2,0) - A(0,1)*A(1,2)*A(2,0) - A(0,2)*A(1,0)*A(2,1) + A(0,0)*A(1,2)*A(2,1) + A(0,1)*A(1,0)*A(2,2) - A(0,0)*A(1,1)*A(2,2));
103 Ainv(1,0)= (A(1,2)*A(2,0) - A(1,0)*A(2,2))/(-(A(0,2)*A(1,1)*A(2,0)) + A(0,1)*A(1,2)*A(2,0) + A(0,2)*A(1,0)*A(2,1) - A(0,0)*A(1,2)*A(2,1) - A(0,1)*A(1,0)*A(2,2) + A(0,0)*A(1,1)*A(2,2));
104 Ainv(1,1)= (A(0,2)*A(2,0) - A(0,0)*A(2,2))/(A(0,2)*A(1,1)*A(2,0) - A(0,1)*A(1,2)*A(2,0) - A(0,2)*A(1,0)*A(2,1) + A(0,0)*A(1,2)*A(2,1) + A(0,1)*A(1,0)*A(2,2) - A(0,0)*A(1,1)*A(2,2));
105 Ainv(1,2)= (A(0,2)*A(1,0) - A(0,0)*A(1,2))/(-(A(0,2)*A(1,1)*A(2,0)) + A(0,1)*A(1,2)*A(2,0) + A(0,2)*A(1,0)*A(2,1) - A(0,0)*A(1,2)*A(2,1) - A(0,1)*A(1,0)*A(2,2) + A(0,0)*A(1,1)*A(2,2));
106 Ainv(2,0)= (A(1,1)*A(2,0) - A(1,0)*A(2,1))/(A(0,2)*A(1,1)*A(2,0) - A(0,1)*A(1,2)*A(2,0) - A(0,2)*A(1,0)*A(2,1) + A(0,0)*A(1,2)*A(2,1) + A(0,1)*A(1,0)*A(2,2) - A(0,0)*A(1,1)*A(2,2));
107 Ainv(2,1)= (A(0,1)*A(2,0) - A(0,0)*A(2,1))/(-(A(0,2)*A(1,1)*A(2,0)) + A(0,1)*A(1,2)*A(2,0) + A(0,2)*A(1,0)*A(2,1) - A(0,0)*A(1,2)*A(2,1) - A(0,1)*A(1,0)*A(2,2) + A(0,0)*A(1,1)*A(2,2));
108 Ainv(2,2)= (A(0,1)*A(1,0) - A(0,0)*A(1,1))/(A(0,2)*A(1,1)*A(2,0) - A(0,1)*A(1,2)*A(2,0) - A(0,2)*A(1,0)*A(2,1) + A(0,0)*A(1,2)*A(2,1) + A(0,1)*A(1,0)*A(2,2) - A(0,0)*A(1,1)*A(2,2));
114 const REAL SQRT1_3 = 1. /
sqrt(3.);
115 const REAL SQRT1_6 = 1. /
sqrt(6.);
120 Rot(1, 0) = M_SQRT2*SQRT1_3;
121 Rot(1, 1) = -SQRT1_6;
122 Rot(1, 2) = -SQRT1_6;
124 Rot(2, 1) = M_SQRT1_2;
125 Rot(2, 2) = -M_SQRT1_2;
TPZFlopCounter atan2(const TPZFlopCounter &val1, const TPZFlopCounter &val2)
Returns the arc tangent in radians and increments the counter of the Arc Tangent. ATAN2 returns the ...
Templated vector implementation.
Contains TPZMatrixclass which implements full matrix (using column major representation).
#define DebugStop()
Returns a message to user put a breakpoint in.
int64_t Rows() const
Returns number of rows.
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ sqrt
int64_t Cols() const
Returns number of cols.
Contains the declaration of TPZFlopCounter class and TPZCounter struct.
TPZFlopCounter cos(const TPZFlopCounter &orig)
Returns the cosine in radians and increments the counter of the Cosine.