Marios Karaoulis <marios.karaoulis@gmail.com> wrote in message <8e295512-97e5-44e1-a95f-5e59af177653@o10g2000vby.googlegroups.com>...> Hi all,> > I have two vector field J1 and J2, in 3D space (x,y,z) and calculated> at some discrete points (extracted in a txt file from comsol.> > I need to volume integrate the> triple_integration of (J1 dot J2), which is expressed as> > triple_integration ( J1(x)*J2(x) + J1(y)*J2(y) + J1(z)*J2(z) ).> > > I have found that http://www-users.math.umd.edu/~jmr/241/tripleint.html> , but in my case, I have no analytically expression of the funstion.> I guess I could interpolate using TriScatinterp, but is any other way> to do that?

You could you partition the volume by Delaunay tetrahedron (help DelaunayTri). Over each tetrahedron Tj, approximate the integral by:

Ij = |Tj|/4 sum(i) dot(J1,J2)(xi)

where {xi}={x1,x2,x3,x4} are four corners of Tj. and |Tj| is the volume