| OptFEM2DP1 Toolbox 1.2b4 Matlab/Octave Optimized P1-Lagrange Finite Element Method in 2D

- Main Page
- Related Pages
- Files

- File List
- File Members

base/BuildIkFunc.m
Go to the documentation of this file.

    00001 function GetI=BuildIkFunc(Num,nq)
    00002 % function GetI=BuildIkFunc(Num,nq)
    00003 %   Definition of the GetI function depending on the
    00004 %   parameter Num of global numbering of degrees of freedom.
    00005 %   Used by StiffElasAssemblingP1 functions.
    00006 %
    00007 % Parameters:
    00008 % Num: Choice of the numbering of degrees of freedom
    00009 %    - 0 global alternate numbering with local alternate numbering (classical method),
    00010 %    - 1 global block numbering with local alternate numbering,
    00011 %    - 2 global alternate numbering with local block numbering,
    00012 %    - 3 global block numbering with local block numbering.
    00013 % nq: total number of vertices, also denoted by `\nq`.
    00014 %
    00015 % See report
    00016
    00017 % Copyright:
    00018 %   See \ref license
    00019 switch Num
    00020 case 0
    00021   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)];
    00022 case 1
    00023   GetI=@(me,k) [me(1,k) me(1,k)+nq me(2,k) me(2,k)+nq me(3,k) me(3,k)+nq];
    00024 case 2
    00025   GetI=@(me,k) [2*me(:,k)-1;2*me(:,k)]';
    00026 case 3
    00027   GetI=@(me,k) [me(:,k); me(:,k)+nq]';
    00028 end

All Files Functions