Differing results for same trimmed structure on different background meshes #920
-
Dear all, I am using the trimming functionality of Nutils. When playing around with different background meshes, I obtained different results even though I expected from the underlying methodology that they should be the same. I add a simple example below which computes the area of a triangle in different background meshes. The nodes of the triangle are: [0,0.9;0.9,0;0.9,0.9]. Am I doing a mistake in the definition of the background mesh or the evaluation of the integral?
The reference area is 0.405 which I obtain with the second background mesh definition. For the other two cases, I obtain 0.4034640609100461 and 0.406677201144048, respectively. The geometry and the quadrature points for the first background mesh look as follows. Which seems to be fine, leaving it unclear to me whether there is a problem with the weights respectively the mapping. Any help is appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi Michael, apologies for the late reply! |
Beta Was this translation helpful? Give feedback.
Hi Michael, apologies for the late reply!
Your issue is the effect of the
ndivisions
argument of thetrim
method, which at its default value of 8 causes the edge intersections to be rounded to a uniform partition of 2^8=256 intervals. The reason for this rounding operation is twofold: 1. it helps to match edge intersections in neighbouring elements, and 2. it is a measure to discard nearly vanishing elements as they round down to zero. In general the rounding error is negligible against that of the linear interpolation of the levelset function, but this does not apply in your case where the interpolation is exact. What should help though is to increasendivisions
, for example to 32, which…