18 std::map<REAL,int> vals;
19 for(
int i=0; i<3; i++) vals[
fabs(axis[i])] = i;
21 auto it = vals.rbegin();
23 Cross(axis, gen, orto1);
26 for (
int i=0; i<3; i++) {
30 Cross(orto1, axis, orto2);
31 for (
int i=0; i<3; i++) {
32 fRotation(0,i) = orto1[i];
33 fRotation(1,i) = orto2[i];
34 fRotation(2,i) = axis[i];
42 int nnodes = TGeo::NNodes;
43 for (
int in=0; in<nnodes; in++) {
44 int64_t nodeindex = TGeo::fNodeIndexes[in];
46 gmesh.
NodeVec()[nodeindex].GetCoordinates(co);
48 for (
int i=0; i<3; i++) {
50 for (
int j=0; j<3; j++) {
51 localco[i] += fRotation(i,j)*co[i]-fOrigin[i];
54 REAL radius =
sqrt(localco[0]*localco[0]+localco[1]*localco[1]);
56 REAL theta =
atan2(localco[1],localco[0]);
58 fCornerCo(0,in) = theta;
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 ...
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
void SetCylinderAxis(const TPZVec< REAL > &axis)
axis direction with the vertical axis
Contains declaration of TPZGeoElMapped class which implements a geometric element using its ancestral...
TVar Norm(const TPZFMatrix< TVar > &A)
Returns the norm of the matrix A.
#define DebugStop()
Returns a message to user put a breakpoint in.
TPZAdmChunkVector< TPZGeoNode > & NodeVec()
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ sqrt
REAL co[8][3]
Coordinates of the eight nodes.
This class implements a geometric mesh for the pz environment. Geometry.
Groups all classes which model the geometry.
void ComputeCornerCoordinates(TPZGeoMesh &gmesh)
compute the corner coordinates of the corner nodes
void Cross(const TPZVec< T > &x1, const TPZVec< T > &x2, TPZVec< T > &result)