forked from claudioperez/GeometricTransformations
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTransform_RotPull.m
More file actions
32 lines (30 loc) · 1.14 KB
/
Transform_RotPull.m
File metadata and controls
32 lines (30 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
function Rotations = Transform_RotPull(TranData, xyz, ElemState)
% ==========================================================================================
%
% [1] Perez, C.M., and Filippou F. C.. "On Nonlinear Geometric Transformations of Finite
% Elements" Int. J. Numer. Meth. Engrg. 2024 (Expected)
%
% ==========================================================================================
% function by Claudio M. Perez 2023
% ------------------------------------------------------------------------------------------
%
nn = size(xyz,2); % number of element nodes
% Rotation update type
switch TranData.RotName
case 'Iter'
[~, ~, incr] = ExtrReshu(ElemState, 6, nn);
Past = ElemState.Pres;
case 'Incr'
[~, incr, ~] = ExtrReshu(ElemState, 6, nn);
Past = ElemState.Past;
case 'Init'
[incr, ~, ~] = ExtrReshu(ElemState, 6, nn);
Past = ElemState.Past;
otherwise
end
R0 = Past.Rotations;
if TranData.Quaternion
for i=1:nn, Rotations(:,:,i) = ExpSU2(Qvec2Quat(incr(4:6,i)))*R0(:,:,i); end
else
for i=1:nn, Rotations(:,:,i) = ExpSO3(incr(4:6,i))*R0(:,:,i); end
end