| OptFEM2D Toolbox for Matlab V1.2b1 Matlab/Octave Optimized P1-Lagrange Finite Element Method in 2D

- Main Page
- Related Pages
- Files

- File List
- File Members

All Files Functions Pages
BuildIkFunc.m
Go to the documentation of this file.
1 function GetI=BuildIkFunc(Num,nq)
2 % function GetI=BuildIkFunc(Num,nq)
3 % Build GetI function associated with global vectors field numerotation Num.
4 % Used by AssemblingStiffElasP1 functions.
5 %
6 % see report
7 %
8 % OptFEM2DP1 [V1.2b1] - Copyright (C) 2013 CJS (LAGA)
9 %
10 % This file is part of OptFEM2DP1.
11 % OptFEM2DP1 is free software: you can redistribute it and/or modify
12 % it under the terms of the GNU General Public License as published by
13 % the Free Software Foundation, either version 3 of the License, or
14 % (at your option) any later version.
15 %
16 % OptFEM2DP1 is distributed in the hope that it will be useful,
17 % but WITHOUT ANY WARRANTY; without even the implied warranty of
18 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 % GNU General Public License for more details.
20 %
21 % You should have received a copy of the GNU General Public License
22 % along with this program. If not, see <http://www.gnu.org/licenses/>.
23 switch Num
24 case 0
25 GetI=@(me,k) [2*me(1,k)-1, 2*me(1,k), 2*me(2,k)-1, 2*me(2,k), 2*me(3,k)-1, 2*me(3,k)];
26 case 1
27 GetI=@(me,k) [me(1,k) me(1,k)+nq me(2,k) me(2,k)+nq me(3,k) me(3,k)+nq];
28 case 2
29 GetI=@(me,k) [2*me(:,k)-1;2*me(:,k)]';
30 case 3
31 GetI=@(me,k) [me(:,k); me(:,k)+nq]';
32 end