OptFEM3DP1 Toolbox: ElemMat/ElemMassMat3DVecP1D0.m Source File

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

- Main Page
- Related Pages
- Files

- File List
- File Members

All Files Functions Variables Pages
ElemMassMat3DVecP1D0.m
Go to the documentation of this file.
1 function [Kg]=ElemMassMat3DVecP1D0(volumes)
2 % NAME
3 % [Kg]=ElemMassMat3DVecP1D0(volumes)
4 % INPUTS
5 % volumess : vector 1 x nme (elements volume)
6 % OUTPUTS
7 % Kg : matrix 16 x nme
8 % DESCRIPTION
9 % Compute P1-Lagrange Kg array for Mass matrix (see report).
10 % Numbering of local points in reference element is :
11 % P=[(0, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1)]
12 %----------------------------------------
13 % Automatic generation with sage
14 % (c) Cuvelier F. email:cuvelier@math.univ-paris13.fr
15 % Copyright:
16 % See \ref license
17 ndf=4;
18 Kg=zeros(ndf*ndf,length(volumes));
19 A10=volumes/10;
20 A20=volumes/20;
21 Kg(1,:)=A10;
22 Kg(2,:)=A20;
23 Kg(3,:)=A20;
24 Kg(4,:)=A20;
25 Kg(6,:)=A10;
26 Kg(7,:)=A20;
27 Kg(8,:)=A20;
28 Kg(11,:)=A10;
29 Kg(12,:)=A20;
30 Kg(16,:)=A10;
31 Kg([5, 9, 10, 13, 14, 15],:)=Kg([2, 3, 7, 4, 8, 12],:);