OptFEM3DP1 Toolbox: Opt/ComputeVolumesOpt.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
ComputeVolumesOpt.m
Go to the documentation of this file.
1 function volumes=ComputeVolumesOpt(me,q)
2 % Copyright:
3 % See \ref license
4 for i=1:3
5 D21{i}=q(i,me(2,:))-q(i,me(1,:));
6 D31{i}=q(i,me(3,:))-q(i,me(1,:));
7 D41{i}=q(i,me(4,:))-q(i,me(1,:));
8 end
9
10 volumes=abs((D21{1}.*(D31{2}.*D41{3}-D31{3}.*D41{2})+ ...
11 D31{1}.*(D41{2}.*D21{3}-D41{3}.*D21{2})+ ...
12 D41{1}.*(D21{2}.*D31{3}-D21{3}.*D31{2}))/6.);