On 6/18/25 12:39, Silviu Predoiu wrote:
>
> *The Issue*
> I'm trying to use a .STEP file to load a 3D geometry that is a bit more
> complex - it has holes, for instance. I would like meshes to get closer to the
> original geometry, upon refinement. To this end, I tried a number of
> approaches (listed below), and eventually settled on using my own custom-made
> manifolds (more details below). Starting with a somewhat coarse grid, each of
> the original cells has its own manifold, and refinement produces points using
> transfinite interpolation. The problem is that the ChartManifold::pull_back is
> called with points that seem very far away from the manifold itself. I
> expected that if vertices v0, v1, v2, v3 were the corners of a quadrangle
> representing a face, pull_back would be called with a point that is not too
> far from the said quadrangle. Instead, I get this (which seems to sugest that
> perhaps pull_back is called on the wrong manifold; below, the point is the
> argument of pull_back, while the colored curves are the 4 lines bounding the
> quadrangle):
> Figure_1.png
> Does anyone know what kind of points ChartManifold<3, 3, i>::pull_back is
> supposed to handle? (i = 1, 2, and 3).
Silviu:
good detective work already!
I agree that the expectation would be that pull_back() would only be called
for points that are "not too far" from the face on which the surrounding
points are located. I think a good test would be to add something like the
following to your custom manifold:
diameter = some kind of measure of the distance between the surrounding
points
center = some way of defining the center of the surrounding points
Assert (point is less than diameter away from center, ExcInternalError());
This way, your program will abort when you get into a situation as you show in
the figure. If you run the program in the debugger, you can get a backtrace
and see how it happened that a function called your manifold with points
located in that way. Perhaps that reveals a bug, or at least a situation you
may not have anticipated.
Best
W.