merge_triangulation error

147 views
Skip to first unread message

Vinayak Vijay

unread,
Nov 16, 2023, 4:05:11 AM11/16/23
to deal.II User Group
Hello,

I am trying to merge two triangulations into a single one. However, I am getting the following error:

An error occurred in line <11736> of file </tmp/vinayak/spack-stage/spack-stage-dealii-9.4.2-4haiezd5dty7b537inhxmeebwxllx4gs/spack-src/source/grid/tria.cc> in function
    void dealii::Triangulation<<anonymous>, <anonymous> >::create_triangulation(const std::vector<dealii::Point<spacedim> >&, const std::vector<dealii::CellData<dim> >&, const dealii::SubCellData&) [with int dim = 1; int spacedim = 3]
The violated condition was:
    !(correct(i, j) ^ (neighbor->direction_flag() == (*cell)->direction_flag()))
Additional information:
    (none)

I am using the dealii 9.4.0 version.

I have attached the two triangulations that need to be merged and the .cc file to reproduce the error. 
Can someone help me with this?

Thanks
Vinayak
merge_test.cc
triangulation2.vtk
triangulation1.vtk

Vinayak Vijay

unread,
Nov 20, 2023, 4:13:23 AM11/20/23
to deal.II User Group
Hello,

I also tried to do the same using the GridGenerator::replicate_triangulation(triangulation1,{2},triangulation2) function. This should result in a triangulation (triangulation1) to be repeated in the three-coordinate axis two times. However, it results in the same error.
Please note that the triangulations are with dim=1 and spacedim=2. 

I am not sure where things are going wrong. Could someone help me with this?

Thanks
Vinayak

Daniel Arndt

unread,
Nov 20, 2023, 10:30:14 AM11/20/23
to dea...@googlegroups.com
Vinayak,

Would you have a minimal reproducer?

Best,
Daniel

--
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 the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/a9aaa852-3ad8-40c7-a0db-87d339c37cb2n%40googlegroups.com.

Vinayak Vijay

unread,
Nov 20, 2023, 11:09:11 AM11/20/23
to deal.II User Group
Hello Daniel,

Yes, I do. In addition to the files from my first post, here are the files for the issue with replicate_triangulation() function. These files are sufficient to test both merge_triangulation() and replicate_triangulation() functions for my problem.

Thanks
Vinayak
triangulation2.vtk
merge_test.cc
triangulation1.vtk
CMakeLists.txt

Vinayak Vijay

unread,
Nov 29, 2023, 10:24:42 AM11/29/23
to deal.II User Group
Hello,

A gentle reminder for this issue. Can someone help me with this?

Thanks
Vinayak

Wolfgang Bangerth

unread,
Dec 12, 2023, 8:58:08 PM12/12/23
to dea...@googlegroups.com

Vinayak,
apologies for taking so long -- I guess this fell in a category where everyone
looks at the error and doesn't think that they have the knowledge to say what
the problem is.

I took a look yesterday and figured out what is going wrong. The fix is in
https://github.com/dealii/dealii/pull/16345
and is already in mainline. I confirmed that your test now works, as well as
the second test with replicate_triangulation.

Best
W.


On 11/16/23 02:05, Vinayak Vijay wrote:
> *** Caution: EXTERNAL Sender ***
> --
> The deal.II project is located at http://www.dealii.org/
> <http://www.dealii.org/>
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> <https://groups.google.com/d/forum/dealii?hl=en>
> ---
> You received this message because you are subscribed to the Google Groups
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dealii+un...@googlegroups.com
> <mailto:dealii+un...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/b1383a90-2c59-4245-b7df-adc8371ff638n%40googlegroups.com <https://groups.google.com/d/msgid/dealii/b1383a90-2c59-4245-b7df-adc8371ff638n%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Vinayak Vijay

unread,
Dec 13, 2023, 3:27:00 AM12/13/23
to deal.II User Group
Thank you so much Prof. Bangerth!

Regards
Vinayak
Reply all
Reply to author
Forward
0 new messages