@@ -1350,7 +1350,7 @@ Parameters
13501350 Thickness:: Float64 = 100.0 # thickness of the slab
13511351 Lb:: Float64 = 200.0 # Length at which all the bending is happening (Lb<=Length)
13521352 θ_max:: Float64 = 45.0 # max bending angle, (must be converted into radians)
1353- direction:: Float64 = 1.0 # Direction of the bending angle (from left to right or right to left)
1353+ direction:: Float64 = - 1.0 # Direction of the bending angle (-1= left to right or 1.0= right to left)
13541354 d_decoupling:: Float64 = 100 # decoupling depth of the slab
13551355 type_bending:: Symbol = :Ribe # Mode Ribe | Linear | Customize
13561356 WeakzoneThickness:: Float64 = 0.0 # Thickness of the weakzone
@@ -1422,6 +1422,10 @@ function compute_slab_surface(trench::Trench)
14221422 l = l + dl;
14231423 it = it + 1 ;
14241424 end
1425+ Top[:,1 ] *= direction
1426+ Bottom[:,1 ] *= direction
1427+ WeakZone[:,1 ] *= direction
1428+
14251429 return Top, Bottom, WeakZone
14261430end
14271431
@@ -1464,6 +1468,7 @@ function find_slab_distance!(ls, d, X,Y,Z, Top, Bottom, trench::Trench)
14641468 # Perform rotation of 3D coordinates along the angle from Start -> End:
14651469 Xrot = X .- Start[1 ];
14661470 Yrot = Y .- Start[2 ];
1471+
14671472 StrikeAngle = - atand ((End[2 ]- Start[2 ])/ (End[1 ]- Start[1 ]))
14681473 Rot3D! (Xrot,Yrot,Z, StrikeAngle, 0.0 )
14691474
@@ -1472,8 +1477,6 @@ function find_slab_distance!(ls, d, X,Y,Z, Top, Bottom, trench::Trench)
14721477 # dl
14731478 dl = Length/ n_seg;
14741479 l = 0 # length at the trench position
1475- # D = @SVector [0.0, -Thickness,-Thickness,0.0]
1476-
14771480 D = @SVector [Top[1 ,2 ], Bottom[1 ,2 ], Bottom[1 ,2 ],Top[1 ,2 ] ]
14781481
14791482 # Construct the slab
0 commit comments