1
int3d Scilab Group Scilab Function int3d
3
int3d - definite 3D integral by quadrature and cubature method
6
[result,err]=int3d(X,Y,Z,f [,nf[,params]])
8
X : a 4 by NUMTET array containing the abscissae of the vertices
9
of the NUMTET tetrahedrons.
11
Y : a 4 by NUMTET array containing the ordinates of the vertices
12
of the NUMTET tetrahedrons.
14
Z : a 4 by NUMTET array containing the third coordinates of the
15
vertices of the NUMTET tetrahedrons.
17
f : external (function or list or string) defining the integrand
18
f(xyz,nf), where xyz is the vector of a point coordinates and
19
nf the number functions
21
nf : the number of function to integate (default is 1)
23
params : real vector [minpts, maxpts, epsabs, epsrel]. default value
24
is [0, 1000, 0.0, 1.d-5].
27
: Desired bound on the absolute error.
30
: Desired bound on the relative error.
33
: Minimum number of function evaluations.
36
: Maximum number of function evaluations. The number of
37
function evaluations over each subregion is 43
39
result : the integral value,or vector of the integral values.
41
err : Estimates of absolute errors.
44
The function calculates an approximation to a given vector of definite
47
I I I (F ,F ,...,F ) dx(3)dx(2)dx(1),
49
where the region of integration is a collection of NUMTET tetrahedrons
52
F = F (X(1),X(2),X(3)), J = 1,2,...,NUMFUN.
54
A globally adaptive strategy is applied in order to compute
55
approximations result(k) hopefully satisfying, for each component of I,
56
the following claim for accuracy:
57
ABS(I(K)-RESULT(K))<=MAX(EPSABS,EPSREL*ABS(I(K))) int3d repeatedly
58
subdivides the tetrahedrons with greatest estimated errors and estimates
59
the integrals and the errors over the new subtetrahedrons until the error
60
request is met or MAXPTS function evaluations have been used. A 43 point
61
integration rule with all evaluation points inside the tetrahedron is
62
applied. The rule has polynomial degree 8. If the values of the input
63
parameters EPSABS or EPSREL are selected great enough, an integration
64
rule is applied over each tetrahedron and the results are added up to
65
give the approximations RESULT(K). No further subdivision of the
66
tetrahedrons will then be applied. When int3d computes estimates to a
67
vector of integrals, all components of the vector are given the same
68
treatment. That is, I(Fj) and I(Fk) for j not equal to k, are estimated
69
with the same subdivision of the region of integration. For integrals
70
with enough similarity, we may save time by applying int3d to all
71
integrands in one call. For integrals that varies continuously as
72
functions of some parameter, the estimates produced by int3d will also
73
vary continuously when the same subdivision is applied to all components.
74
This will generally not be the case when the different components are
75
given separate treatment. On the other hand this feature should be used
76
with caution when the different components of the integrals require
77
clearly different subdivisions.
83
deff('v=f(xyz,numfun)','v=exp(xyz''*xyz)')
84
[RESULT,ERROR]=int3d(X,Y,Z,'int3dex')
85
// computes the integrand exp(x*x+y*y+z*z) over the
86
//tetrahedron (0.,0.,0.),(1.,0.,0.),(0.,1.,0.),(0.,0.,1.)
91
Fortran routine dqtet.f
95
Jarle Berntsen, The Computing Centre,
96
University of Bergen, Thormohlens gt. 55,
99
Email.. jarle@eik.ii.uib.no
101
Ronald Cools, Dept. of Computer Science,
102
Katholieke Universiteit Leuven, Celestijnenlaan 200A,
103
B-3030 Heverlee, Belgium
104
Phone.. 32-16-201015 (3562)
105
Email.. ronald@cs.kuleuven.ac.be
107
Terje O. Espelid, Department of Informatics,
108
University of Bergen, Thormohlens gt. 55,
109
N-5008 Bergen, Norway
111
Email.. terje@eik.ii.uib.no