Lets see - Simpson's rule.  Isn't that something like subdivide the domain,
then multiply the area of each part by the area of the part, sum and divide
by the total area?  You can use Post(... "connections") to average the
values at the vertices of the each triangle, leaving the result associated
with the triangles, rather than the vertices;  Measure(... "elements")
gives you the area of each triangle, and without the "elements" argument
gives you the total surface area.  You can use Compute to do the
multiplication of average scalar value*area for each triangle, then sum the
results by using Statistics to get the mean value and multiplying by the
number of values (which Inquire(... "items", "data)) wil give you.  Then
multiply these three values, and you have an approximate integral.

In the attached example I have generated a bogus scalar field, done your
trick of isosurfacing the distance to the normal, and doing the
integration.

Greg

(See attached file: integrate_example.cfg)(See attached file:
integrate_example.net)


Greg Ball <[EMAIL PROTECTED]>@opendx.watson.ibm.com on 09/17/2001
03:25:37 PM

Please respond to [email protected]

Sent by:  [EMAIL PROTECTED]


To:   [email protected]
cc:
Subject:  [opendx-users] Numerical integration with DX



Hi DX weenies,

I've been lurking on this list for a while and I have found the answers
posted here to be very informative, so thanks for that.  Till now my own
experience with DX has gone pretty smoothly.

Now I am looking for a capability which doesn't seem to be mentioned in
the documentation, or the archives.  Apologies if I have missed something
obvious here.

What I want to do is perform surface integration on a 2-d surface in
3-space.  I have a scalar component on a field in 3-space, with regular
connections.  Right now, I am marking positions, calculating the distance
from the origin, taking that through isosurface, and marking the scalar
component again. This gives me a new field.  The positions are irregular
and are in the form of a sphere.  The scalar field is interpolated onto
this sphere.  It looks fine when rendered.

Now I want to calculate the integral of the scalar over the surface.  It
seems that in terms of the computational work I'm almost there, but I
can't figure out how to proceed.

Any help appreciated.

Thanks,

Greg Ball

--
Astronomy Dept.
Harvard University





Attachment: integrate_example.cfg
Description: Binary data

Attachment: integrate_example.net
Description: Binary data

Reply via email to