Skip to content
Snippets Groups Projects
Commit e5ca6a26 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

Axis = 3 by default for cyl shell

parent 7bc2b4c1
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -498,7 +498,8 @@ double Transformation(int Dim, int Type, struct Element * Element, MATRIX3x3 * J
L = Element->JacobianCase->Para[7];
if(Element->JacobianCase->NbrParameters >= 9){
Message::Error("Too many parameters for cylindrical transformation Jacobian. "
"Valid parameters: Radius1 Radius2 Axis CenterX CenterY CenterZ Power 1/Infinity");
"Valid parameters: Radius1 Radius2 Axis CenterX CenterY CenterZ "
"Power 1/Infinity");
}
}
else if(Type == JACOBIAN_VOL_UNI_DIR_SHELL){
......@@ -521,7 +522,6 @@ double Transformation(int Dim, int Type, struct Element * Element, MATRIX3x3 * J
if(L) B = (B*B-A*A*L)/(B-A*L);
if(Type == JACOBIAN_VOL_UNI_DIR_SHELL){
/* R is the distance from the plane whose normal vector is parallel to the
axis and which contains the point (Ca,0,0),(0,Ca,0) or (0,0,Ca), for Axis
equal to 1, 2, 3 respectively*/
......@@ -535,7 +535,8 @@ double Transformation(int Dim, int Type, struct Element * Element, MATRIX3x3 * J
if ( (fabs(R) > fabs(B) + 1.e-2*fabs(B)) ||
(fabs(R) < fabs(A) - 1.e-2*fabs(A)) ){
Message::Error("Bad parameters for unidirectional transformation Jacobian:" "Rint=%g, Rext=%g, R=%g", A, B, R);
Message::Error("Bad parameters for unidirectional transformation Jacobian:"
"Rint=%g, Rext=%g, R=%g", A, B, R);
}
if (B == R) {
......@@ -572,6 +573,7 @@ double Transformation(int Dim, int Type, struct Element * Element, MATRIX3x3 * J
}
}
else if(Type == JACOBIAN_VOL_CYL_SHELL){
if(!Axis) Axis = 3; // usual 2D case
switch(Axis) {
case 1: R = sqrt(SQU(Y-Cy)+SQU(Z-Cz)); YR = (Y-Cy)/R; ZR = (Z-Cz)/R; dRdy = (Y-Cy)/R; dRdz = (Z-Cz)/R; break;
case 2: R = sqrt(SQU(X-Cx)+SQU(Z-Cz)); XR = (X-Cx)/R; ZR = (Z-Cz)/R; dRdx = (X-Cx)/R; dRdz = (Z-Cz)/R; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment