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

- Main Page
- Related Pages
- Files

- File List
- File Members

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

    00001 function h=GetMaxLengthEdges(q,me)
    00002 % function h=GetMaxLengthEdges(q,me)
    00003 %   Computation of the maximal value of edge lengths
    00004 %
    00005 % Parameters:
    00006 %  q: Array of vertices coordinates, `2\times\nq` array. <br/>
    00007 %  `{\q}(\il,j)` is the
    00008 %  `\il`-th coordinate of the `j`-th vertex, `\il\in\{1,2\}` and
    00009 %  `j\in\ENS{1}{\nq}`
    00010 %  me: Connectivity array, `3\times\nme` array ('int32'). <br/>
    00011 %  `\me(\jl,k)` is the storage index of the
    00012 %  `\jl`-th  vertex of the `k`-th triangle in the array `\q` of vertices coordinates, `\jl\in\{1,2,3\}` and
    00013 %       `k\in{\ENS{1}{\nme}}`.
    00014 %
    00015 % Return values:
    00016 %  h: maximal length of an edge in the mesh
    00017 % Copyright:
    00018 %   See \ref license
    00019 U=q(:,me(1,:))-q(:,me(2,:));
    00020 V=q(:,me(2,:))-q(:,me(3,:));
    00021 W=q(:,me(3,:))-q(:,me(1,:));
    00022
    00023 h=sqrt(max([sum(U.^2,1),sum(W.^2,1),sum(W.^2,1)]));
    00024

All Files Functions