Thanks for the suggestion, very helpful! I had not appreciated the usefulness of the Post module. I'm glad I hadn't overlooked a "Surface Integration" module or something like that.
I did have to change one thing. I am using a Multigrid Group rather than a field and I couldn't get Inquire to accept it. I tried to inquire about "valid count" which according to the User's Reference should accept any kind of object, but it still said it wanted a field. However the number of counts can be worked out from the total surface area divided by the average area of a connection element, both of which I basically had lying around of course. Once I had that worked out it all looked good. I am getting some strange behaviour though... depending on the radius of my sphere (above some maximum radius in fact) I sometimes get ERROR: Compute: Bad parameter: Member type does not match group type and the integral can't be computed... while the rendering of the sphere still looks fine. Any ideas what might be causing this? Thanks again. Greg Ball -- Astronomy Dept. Harvard University On Mon, 17 Sep 2001, Gregory D Abram wrote: > > 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, > > > > > > >
