comparison +parametrization/Ti.m @ 717:8e4274ee6dd8 feature/utux2D

Merge with feature/poroelastic
author Martin Almquist <malmquist@stanford.edu>
date Sat, 03 Mar 2018 14:58:21 -0800
parents 6f4eb3da8978
children edb1d60b0b77
comparison
equal deleted inserted replaced
666:2d85f17a8aec 717:8e4274ee6dd8
19 B = g2(0); 19 B = g2(0);
20 C = g3(0); 20 C = g3(0);
21 D = g4(0); 21 D = g4(0);
22 22
23 function o = S_fun(u,v) 23 function o = S_fun(u,v)
24 if isrow(u) && isrow(v)
25 flipped = false;
26 else
27 flipped = true;
28 u = u';
29 v = v';
30 end
31
24 x1 = g1(u); 32 x1 = g1(u);
25 x2 = g2(v); 33 x2 = g2(v);
26 x3 = g3(1-u); 34 x3 = g3(1-u);
27 x4 = g4(1-v); 35 x4 = g4(1-v);
36
28 o1 = (1-v).*x1(1,:) + u.*x2(1,:) + v.*x3(1,:) + (1-u).*x4(1,:) ... 37 o1 = (1-v).*x1(1,:) + u.*x2(1,:) + v.*x3(1,:) + (1-u).*x4(1,:) ...
29 -((1-u)*(1-v).*A(1,:) + u*(1-v).*B(1,:) + u*v.*C(1,:) + (1-u)*v.*D(1,:)); 38 -((1-u).*(1-v).*A(1,:) + u.*(1-v).*B(1,:) + u.*v.*C(1,:) + (1-u).*v.*D(1,:));
30 o2 = (1-v).*x1(2,:) + u.*x2(2,:) + v.*x3(2,:) + (1-u).*x4(2,:) ... 39 o2 = (1-v).*x1(2,:) + u.*x2(2,:) + v.*x3(2,:) + (1-u).*x4(2,:) ...
31 -((1-u)*(1-v).*A(2,:) + u*(1-v).*B(2,:) + u*v.*C(2,:) + (1-u)*v.*D(2,:)); 40 -((1-u).*(1-v).*A(2,:) + u.*(1-v).*B(2,:) + u.*v.*C(2,:) + (1-u).*v.*D(2,:));
32 41
33 o = [o1;o2]; 42 if ~flipped
43 o = [o1;o2];
44 else
45 o = [o1'; o2'];
46 end
34 end 47 end
35 48
36 obj.S = @S_fun; 49 obj.S = @S_fun;
37 end 50 end
38 51