# Message Boards

0
|
1919 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
 I have some user-defined module describing my integrand which has to be computed numerically (it's much more complicated than this but bear with me): foo[x_?NumericQ, y_?NumericQ, z_?NumericQ] := Module[{f}, f = x+y+z; Return[f]];  Then I have a region I am defining with a rotated, truncated polyhedron, and using that as my integration domain which is the new V10 feature: << PolyhedronOperations polys = Flatten[Normal[Truncate[PolyhedronData["Octahedron", "Faces"], 1/3]], 1]; p1 = Polygon[{{0, 0, 0}, {0, Sqrt[3/2]/2 - 1/(2 Sqrt[6]), 1/Sqrt[3]}, {-(1/(2 Sqrt[2])), -(1/(2 Sqrt[6])), 1/Sqrt[3]}, {1/(2 Sqrt[2]), -(1/(2 Sqrt[6])), 1/Sqrt[3]}}]; p2 = Polygon[{{0, 0, 0}, {1, 1, 0}/2, {0, 1, 1}/2, {1, 0, 1}/2}]; m = Last@FindGeometricTransform[p1, p2]; rot = Flatten[Table[m[polys[[i, 1]]], {i, 1, 14}], 1]; region = ConvexHullMesh[rot];  Then when I NIntegrate over it, I get an error which doesn't exist yet in the Wolfram documentation, or on Google, or anywhere: NIntegrate[foo[x, y, z], {x, y, z} ? region] NIntegrate::ncvbr: NIntegrate failed to converge to prescribed accuracy after 5 refinements. NIntegrate obtained 0.35562326340448547 and 0.03672493677717351 for the integral and error estimates. >>  (Those numbers will change if you use the simple foo function.) The link in the error (>>) just takes me to the NIntegrate documentation. So my question is: What precisely does the ncvbr error mean? The error tag which seems related is ncvb, for example this is from the NIntegrate documentation: NIntegrate::ncvb: "NIntegrate failed to converge to prescribed accuracy after 9 recursive bisections in x near {x} = {9.43625271977563}. NIntegrate obtained 10.3032-6.74255i and 0.3168981771605228 for the integral and error estimates. >>  which is actually informative, and says I need to crank up MinRecursion and MaxRecursion. However since I am using a ConvexHullMesh to specify my domain, could something different be happening, since ncvbr specifically mentions "refinement?" In other words, would playing with Min/MaxRecursions help at all?