GlobalToLocal: did not converge

Numerical methods and mathematical models of Elmer
Post Reply
joeatodd
Posts: 36
Joined: 02 Feb 2012, 18:49
Antispam: Yes

GlobalToLocal: did not converge

Post by joeatodd »

Hi all,

A quick search of the forums reveals that the warning "GlobalToLocal: did not converge" has come up in a few instances.

I'm experiencing this error myself, and I'm wondering if anyone can help me understand the root cause of this? The backtrace for this error is roughly:

GlobalToLocal
PointInElement
InterpolateMeshToMesh
My Own Code

I noticed that in all instances where I receive this warning, the point is not in the element (abs(u or v or w) > 1.0).

The warning I receive is:

Code: Select all

WARNING:: GlobalToLocal: did not converge.
 rst          51  -2.5689015630632639E-002   7.1338795591145754E-002 -0.60078690760805387
 err  0.36669405763371443        2.2204460492503131E-016   1.4901161193847656E-008
 delta   2.6649089284891247E-002  -4.3319147425055502E-003   1.2560196532857872        1.6481456324882206\
E-002  -2.6791258365703704E-003  0.77680076903984019
 uvw   1.0812661110880613        1.0200576408340911        2.2701010359650704
 code         706
 x:  -207744.56931900000       -207644.31831929882       -207658.49789453449       -207727.78591142685   \
    -207643.62721310995       -207658.67278682409       -207726.73783741484
 y:  -2136583.5125600002       -2136474.0012339037       -2136568.0677596745       -2136487.4075773261   \
    -2136472.5842686645       -2136564.1595771746       -2136486.4508564649
 z:   74.919913086365781        74.282236495785170        68.006541063631758        76.971222757279506   \
     109.46510727955601        80.307106620287556        104.32772037336500
I had a suspicion it was related to degenerate elements, so I attempted to test for this by cycling all elements in my mesh and checking the return of ElementInfo() (as I understand it, this should return .FALSE. for a degenerate element). However, this didn't return any false values and so I'm a little stuck.

Thanks,

Joe
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: GlobalToLocal: did not converge

Post by raback »

Hi Joe

Well, the code tries to iteratively find the local coordinates of a point in element. One way how this could fail is that you try to find point in 3D in a 2D element and this fails if you're not exactly in the same plane. Also the element could be be degenerated i.e. any two nodes would be at same position.

-Peter
joeatodd
Posts: 36
Joined: 02 Feb 2012, 18:49
Antispam: Yes

Re: GlobalToLocal: did not converge

Post by joeatodd »

Hey Peter,

Thanks for the info. In my case, it's failing in 3D elements, and as far as I can tell, they don't appear to be degenerate.

I don't know enough about the transformation between global and local coordinate systems, but is it possible that a given element could be sufficiently distorted from its master element that some nearby points may not be defineable in a local coordinate system?

For example, if one were using a cube for a master element, would a point sufficiently far above an element of this shape:

http://image.mathcaptain.com/cms/images ... -prism.png

be undefined (i.e. beyond the height at which the two lateral planes intersect)?

Cheers,

Joe
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: GlobalToLocal: did not converge

Post by raback »

Hi Joe,

Yes, I could see that the element would be so distorted that the problem would be difficult to solve. Do you know if the point is really inside the element or not?

-Peter
joeatodd
Posts: 36
Joined: 02 Feb 2012, 18:49
Antispam: Yes

Re: GlobalToLocal: did not converge

Post by joeatodd »

Hey Peter,

In all the cases where this error occurs, it seems like the point is not within the element, so I suppose within the context of interpolation, it's probably not an important error.

Cheers,

Joe
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: GlobalToLocal: did not converge

Post by raback »

Hi Joe,

Perhaps the rough detection rules could be made to detect these cases so that Global2Local would not need to be called. In fact I would think this is usually done. For example, if (node x) < any(element x), then there can be no hit.

-Peter
Post Reply