OptFEM3DP1 Toolbox: Opt/MassVFAssembling3DP1OptV3.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
MassVFAssembling3DP1OptV3.m
Go to the documentation of this file.
1 function M=MassVFAssembling3DP1OptV3(nq,nme,me,volumes,Num)
2 % Copyright:
3 % See \ref license
4
5 ElemMassVFMat=BuildElemMassVFMatFunc(Num);
6 E=ElemMassVFMat(20);
7 E=E(:)';
8 [Ig,Jg]=BuildIgJgP1VF(Num,me,nq);
9
10 I=find(E~=0);
11 Ig=Ig(I,:);
12 Jg=Jg(I,:);
13 Kg=zeros(length(I),nme);
14 E=E(I);
15 It=find(E==2);
16 Vt=volumes/10;
17 for i=It
18 Kg(i,:)=Vt;
19 end
20
21 It=find(E==1);
22 Vt=volumes/20;
23 for i=It
24 Kg(i,:)=Vt;
25 end
26
27 M=sparse(Ig(:),Jg(:),Kg(:),3*nq,3*nq);