forked from claudioperez/GeometricTransformations
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGeomTran3dFrm_Pull.m
More file actions
73 lines (58 loc) · 2.41 KB
/
Copy pathGeomTran3dFrm_Pull.m
File metadata and controls
73 lines (58 loc) · 2.41 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
function [Pres,Local] = GeomTran3dFrm_Pull(CoroData, xyz, ElemState, ElemType)
% ==========================================================================================
%
% [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
% ------------------------------------------------------------------------------------------
%
Pres = ElemState.Pres;
%% (a) Update Rotation Parameters
%---------------------------------------------------------------------------
Rotations = Transform_RotPull(CoroData, xyz, ElemState);
Pres.Rotations = Rotations;
%% (b) Isometric Transformation
%---------------------------------------------------------------------------
[Geom, Local] = Transform_IsoPull(CoroData, xyz, ElemState, Rotations);
Pres.Geom = Geom;
%% (c) Interpolation Parameters
%---------------------------------------------------------------------------
Iter = ElemState.Pres;
Incr = ElemState.Past;
nn = size(xyz,2); % number of element nodes
for i=1:nn
% Local.Triad(i).Axis = LogSO3(Local.Triad(i).Rmat);
% Local.Triad(i).Incr = LogSO3(Local.Triad(i).Rmat*Incr.Local.Triad(i).Rmat');
% Local.Triad(i).Spin = LogSO3(Local.Triad(i).Rmat*Iter.Local.Triad(i).Rmat');
% Local.u (6*(i-1)+4:6*i) = Local.Triad(i).Axis;
% Local.Du (6*(i-1)+4:6*i) = Local.Triad(i).Incr;
% Local.DDu(6*(i-1)+4:6*i) = Local.Triad(i).Spin;
Local.u (6*(i-1)+4:6*i) = LogSO3(Local.Triad(i).Rmat);
Local.Du (6*(i-1)+4:6*i) = LogSO3(Local.Triad(i).Rmat*Incr.Local.Triad(i).Rmat');
Local.DDu(6*(i-1)+4:6*i) = LogSO3(Local.Triad(i).Rmat*Iter.Local.Triad(i).Rmat');
end
end
% =========================================================================================
function ve = Deformations(xyz, CoroState, Rotations)
%
Ln = CoroState.CorotLength;
L = ElmLenOr(xyz);
%% Compute the axial deformation
ul = Ln - L;
%% Compute the basic rotational deformation
Tr = CoroState.CorotTriad;
for i=1:size(xyz,2)
vrot(:,i) = LogSO3(Tr'*Rotations(:,:,i));
end
vthetaI = vrot(:,1);
vthetaJ = vrot(:,end);
% Deformation vector
ve = [ul;
vthetaI(3);
vthetaJ(3);
vthetaJ(1)-vthetaI(1);
vthetaI(2);
vthetaJ(2)];
end