Re: surface integration using unsorted numerical data
- From: "John D'Errico" <woodchips@xxxxxxxxxxxxxxxx>
- Date: Thu, 8 May 2008 10:26:04 +0000 (UTC)
yiannis p <yiannis000@xxxxxxxxxxx> wrote in message
<8173673.1210241162728.JavaMail.jakarta@xxxxxxxxxxxxxxxxxxxxxx>...
Thank you Johnthe summation and what is it calculates for avez.
You have been very helpful.
I have one question though as to which numerical method you are using for
Lets see if I can give a simple explanation...
This works by effectively transforming each
triangle to an equilateral one. This comes
from the computation of A - a determinant
that computes the area of each triangle. As
it turns out, that determinant is also the
determinant of the Jacobian matrix needed
for the implicit change of variables.
Then I multiply by the average of the z values
at each corner node, which would be correct
were each triangle truly equilateral. Sum up
the areas over all triangles in the triangulation,
and you are done. Its all neatly vectorized of
course.
% Compute the areas of each triangle in tri.
A = abs((xy(tri(:,2),1)-xy(tri(:,1),1)).*(xy(tri(:,3),2)-xy(tri(:,1),2)) - ...
(xy(tri(:,3),1)-xy(tri(:,1),1)).*(xy(tri(:,2),2)-xy(tri(:,1),2)))/2;
avez = z(tri(:,1)) + z(tri(:,2)) + z(tri(:,3));
integral = sum(A.* avez/3)
John
.
- Follow-Ups:
- Re: surface integration using unsorted numerical data
- From: yiannis p
- Re: surface integration using unsorted numerical data
- References:
- Re: surface integration using unsorted numerical data
- From: John D'Errico
- Re: surface integration using unsorted numerical data
- From: yiannis p
- Re: surface integration using unsorted numerical data
- Prev by Date: Re: list box-seletion via mouse
- Next by Date: Re: Copy y-axis
- Previous by thread: Re: surface integration using unsorted numerical data
- Next by thread: Re: surface integration using unsorted numerical data
- Index(es):
Relevant Pages
|