s on the orientation of the mesh. We shall use the asecond orientation, i.e., <code>elem(t,1)&lt; elem(t,2)&lt; elem(t,3)</code> not the positive orientation. Given an <code>elem</code>, the asecond orientation can be constructed by</p>

<pre><code>    [elem,bdFlag] = sortelem(elem,bdFlag);  % ascend ordering

</code></pre>
<p>Note that <code>bdFlag</code> should be sorted as well.</p>
<p>The local edge is also asecond <code>[2 3; 1 3; 1 2]</code> so that the local orientation is consistent with the global 