Error with Transfinite Interpolation

52 views
Skip to first unread message

Juan Carlos Araujo Cabarcas

unread,
Jan 17, 2018, 3:05:48 PM1/17/18
to deal.II User Group
Dear all,

Since the inclusion of Transfinite interpolation, I have been successful on working with this powerful technique in my research. I had coded a mesh implementing concentric circles, where the inner most is shifted a small distance s. All concentric circles are labeled 100+i, where i is in a loop on all circles.

The mesh was working after 4/Apr/17 when I added the following entry in the forum:
https://groups.google.com/forum/#!topic/dealii/hCZqv9g6mKk

I installed the development version of dealii on the 17/nov/17. The details of the installation are also in the forum:
https://groups.google.com/forum/#!topic/dealii/ee2w2X987ig

and recently I went back and tried to run thhis code, obtaining the error at the end of the email.

I prepared a minimal example that includes the definition of my grid. It includes how I colorize each face as explained before, and the rest are colorized "1" as the documentation suggests.

The symptoms are the following:
- If I use refinement=0, everything works and the mesh looks quite nice in zeros.vtk and surface with lines mode in Paraview.
- For any higher refinement, it gives the error below.

Maybe there has been a major change in TransfiniteInterpolation since Apr/2017, or maybe the way I colorize is not good anymore for some weird reason. Any ideas or comments would be greatly appreciated.

Juan Carlos Araújo,
Umeå Universitet.



terminate called after throwing an instance of 'dealii::Mapping<2, 2>::ExcTransformationFailed'
  what(): 
--------------------------------------------------------
An error occurred in line <1554> of file </path/dealii/source/grid/manifold_lib.cc> in function
    typename dealii::Triangulation<dim, spacedim>::cell_iterator dealii::TransfiniteInterpolationManifold<dim, spacedim>::compute_chart_points(const dealii::ArrayView<const dealii::Point<spacedim> >&, dealii::ArrayView<dealii::Point<dim> >) const [with int dim = 2; int spacedim = 2; typename dealii::Triangulation<dim, spacedim>::cell_iterator = dealii::TriaIterator<dealii::CellAccessor<2, 2> >]
The violated condition was:
    false
Additional information:
   
--------------------------------------------------------

Aborted (core dumped)


mesh_test.cc

David Wells

unread,
Jan 18, 2018, 11:59:50 AM1/18/18
to deal.II User Group
Hey there,

I have some familiarity with the transfinite interpolation implementation and am looking into this now. It looks like, in the transformation, one of the 'reference cell points' is calculated as {20, 20}: I don't yet see why. I suspect that we now create a twisted cell (or something else that is poorly conditioned) or that there is an issue with how we compute chart points: either way, its either something we need to catch with a better error message or a bug we need to fix.

Over the last few months Martin has added a lot of optimizations to the TFI code, in addition to using it in a more general setting during mesh refinement: put another way, our implementation has changed substantially, so this problem is at least in an area of the library where we have recently made huge changes.

Thanks,
David Wells

David Wells

unread,
Jan 18, 2018, 6:39:51 PM1/18/18
to deal.II User Group
I figured it out: we have an optimization that assumes in one particular place that, if we have eight points, they must be the vertices of a cube. However, in 2D, we use eight points to place new points on quadrilaterals: assuming these are the vertices of a cube is wrong. The original assumption created a bad initial value for a quasi-newton solver, which then failed to converge.

I got rid of the cube assumption. see https://github.com/dealii/dealii/pull/5761 for more information.

Do you mind if I use a modified version of your code for a new test in deal.II?


Thanks,
David Wells

On Wednesday, January 17, 2018 at 3:05:48 PM UTC-5, Juan Carlos Araujo Cabarcas wrote:

Juan Carlos Araujo Cabarcas

unread,
Jan 18, 2018, 8:54:09 PM1/18/18
to deal.II User Group
Thanks a lot for looking at this issue so quickly!

No problem, you can use it. That was the idea of sharing the minimal example! I am always happy to contribute with the library.

So, does this mean that the way I colorize is correct? if there is a better/simpler way plz let me know.
Is the solution merged with the latest master branch? I would like to have a working library for this particular example.

David Wells

unread,
Jan 18, 2018, 10:11:49 PM1/18/18
to deal.II User Group
I have to admit that I didn't read your code carefully enough to really understand how you did the coloring. Regardless, its probably fine: using a 2D approximation for a 2D calculation gets rid of the error in the example you provided :)

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/7rhZad4KWOw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Wells

unread,
Jan 22, 2018, 4:18:27 PM1/22/18
to deal.II User Group
We merged the fix this morning into the development branch, including a test based on your code.

A suggestion: on some versions of GCC, calling 'abs' results in calling the C function 'int abs(int)': to be safe, use std::abs.

Let me know if things work :)

Thanks,
David Wells
Reply all
Reply to author
Forward
0 new messages