definite 3D integral by quadrature and cubature method
[result, err] = int3d(X, Y, Z, f) [result, err] = int3d(X, Y, Z, f, nf) [result, err] = int3d(X, Y, Z, f, nf, params) [result, err] = int3d(xmin, xmax, ymin, ymax, zmin, zmax, f) [result, err] = int3d(xmin, xmax, ymin, ymax, zmin, zmax, f, nf) [result, err] = int3d(xmin, xmax, ymin, ymax, zmin, zmax, f, nf, params)
a 4 by
Narray containing the abscissae of the vertices of the
a 4 by
Narray containing the ordinates of the vertices of the
a 4 by
Narray containing the third coordinates of the vertices of the
- xmin, xmax, ymin, ymax, zmin, zmax
real scalars defining a cuboid in the plane
external (function or list or string) defining the integrand
xyzis the vector of a point coordinates and
nfis the number of the function to compute.
the number of functions to integrate (default is 1)
a real vector
[minpts, maxpts, epsabs, epsrel]. The default value is
[0, 1000, 0.0, 1.d-5].
Desired bound on the absolute error.
Desired bound on the relative error.
Minimum number of function evaluations.
Maximum number of function evaluations. The number of function evaluations over each subregion is 43
the integral value or vector of the integral values.
estimates of absolute errors.
The function calculates approximations of the definite integrals
where the region of integration D is a collection of
tetrahedrons or the single cuboid [xmin,xmax] x [ymin,ymax] x [zmin,zmax] (which is
internally divided in 5 tetrahedrons).
A globally adaptive strategy is applied in order to compute
result(k) hopefully satisfying, for each
I, the following claim for accuracy:
int3d repeatedly subdivides the tetrahedrons with
greatest estimated errors and estimates the integrals and the errors over
the new subtetrahedrons until the error request is met or
maxpts function evaluations have been used.
A 43 point integration rule with all evaluation points inside the tetrahedron is applied. The rule has polynomial degree 8.
If the values of the input parameters
epsrel are selected great enough, an integration rule
is applied over each tetrahedron and the results are added up to give the
result(k). No further subdivision of the
tetrahedrons will then be applied.
int3d computes estimates to a vector of
integrals, all components of the vector are given the same treatment. That
j not equal to
estimated with the same subdivision of the region of integration. For
integrals with enough similarity, we may save time by applying
int3d to all integrands in one call. For integrals that
varies continuously as functions of some parameter, the estimates produced
int3d will also vary continuously when the same
subdivision is applied to all components. This will generally not be the
case when the different components are given separate treatment.
On the other hand this feature should be used with caution when the different components of the integrals require clearly different subdivisions.
Fortran routine dcutet.f
// computes the intergral of exp(x*x+y*y+z*z) over the // tetrahedron (0.,0.,0.),(1.,0.,0.),(0.,1.,0.),(0.,0.,1.) X = [0;1;0;0]; Y = [0;0;1;0]; Z = [0;0;0;1]; // function is computed by dynamically linked Fortran code [result, err] = int3d(X, Y, Z, 'int3dex') // Scilab function function v=f(xyz, numfun),v=exp(xyz'*xyz), endfunction [result, err] = int3d(X, Y, Z, f, 1, [0,100000,1.d-5,1.d-7]) // integration over a cube -1<=x<=1;-1<=y<=1;-1<=z<=1 function v=f(xyz, numfun), v=xyz'*xyz, endfunction [result, err] = int3d(-1,1,-1,1,-1,1, f, 1, [0,100000,1.d-5,1.d-7])
|Report an issue|
|<< int2d||Differential calculus, Integration||intc >>|