OptFEM3DP1 Toolbox: base/BuildIkFunc.m Source File

| OptFEM3DP1 Toolbox 20130614_170440 Matlab/Octave Optimized P1-Lagrange Finite Element Method in 3D

- Main Page
- Related Pages
- Files

- File List
- File Members

All Files Functions Variables Pages
BuildIkFunc.m
Go to the documentation of this file.
1 function GetI=BuildIkFunc(Num,nq)
2 % function GetI=BuildIkFunc(Num,nq)
3 % Definition of the GetI function depending on the
4 % global numbering of vector fields Num.
5 % Used by AssemblingStiffElasP1 functions.
6 %
7 % See report
8 % Copyright:
9 % See \ref license
10 switch Num
11 case 0
12 GetI=@(me,k) [3*me(1,k)-2,3*me(1,k)-1, 3*me(1,k), ...
13 3*me(2,k)-2,3*me(2,k)-1, 3*me(2,k), ...
14 3*me(3,k)-2,3*me(3,k)-1, 3*me(3,k), ...
15 3*me(4,k)-2,3*me(4,k)-1, 3*me(4,k)];
16 case 1
17 GetI=@(me,k) [me(1,k), me(1,k)+nq, me(1,k)+2*nq, ...
18 me(2,k), me(2,k)+nq, me(2,k)+2*nq, ...
19 me(3,k), me(3,k)+nq, me(3,k)+2*nq, ...
20 me(4,k), me(4,k)+nq, me(4,k)+2*nq];
21 case 2
22 GetI=@(me,k) [3*me(:,k)-2;3*me(:,k)-1;3*me(:,k)]';
23 case 3
24 GetI=@(me,k) [me(:,k); me(:,k)+nq;me(:,k)+2*nq]';
25 end