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

- Main Page
- Related Pages
- Files

- File List
- File Members

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

    00001 function AElem=ElemMassWMat2DP1(area,w)
    00002 % function AElem=ElemMassWMat2DP1(area,w)
    00003 %   Computation of the element weighted mass matrix for
    00004 %  `P_1`-Lagrange finite elements
    00005 %
    00006 % Parameters:
    00007 %  area: triangle area
    00008 %  w: values of the weight function at the triangle vertices,
    00009 %  `3\times 1` array
    00010 %
    00011 % Return values:
    00012 %  AElem: Element weighted mass matrix, `3\times 3` matrix
    00013 %
    00014 % Example:
    00015 %  @verbatim
    00016 %    area=1/2.;
    00017 %    w=ones(3,1);
    00018 %    AElem=ElemMassWMat2DP1(area);
    00019 %  @endverbatim
    00020 % Copyright:
    00021 %   See \ref license
    00022   AElem=(area/30)*[ 3*w(1)+w(2)+w(3), w(1)+w(2)+w(3)/2, w(1)+w(2)/2+w(3); ...
    00023                     w(1)+w(2)+w(3)/2, w(1)+3*w(2)+w(3), w(1)/2+w(2)+w(3); ...
    00024                     w(1)+w(2)/2+w(3), w(1)/2+w(2)+w(3), w(1)+w(2)+3*w(3)];

All Files Functions