Dear all,
I need to build a codim-one mesh consisting of two parallel planes. The planes needs to be on the x,z plane and split along the y coordinate. This is the code I am using
Triangulation<2,3> triangulation1, triangulation, triangulation2;
Point<3> P1(-1,0,-1), P2(1,0,1), P3(-1,-1,-1), P4(1,-1,1);
std::vector<unsigned int> repetitions(2);
repetitions[0]=2;
repetitions[1]=2;
GridGenerator::subdivided_hyper_rectangle(triangulation1,repetitions, P3, P4);
GridGenerator::subdivided_hyper_rectangle(triangulation2,repetitions, P1, P2);
GridGenerator::merge_triangulations(triangulation1, triangulation2, triangulation);
And I get
An error occurred in line <406> of file </Users/nicolagiuliani/dealii/source/grid/grid_reordering.cc> in function
void dealii::internal::GridReordering2d::GridReordering::build_graph(const std::vector<CellData<2> > &)
The violated condition was:
false
The name and call sequence of the exception was:
ExcInternalError()
Additional Information:
This exception -- which is used in many places in the library -- usually indicates that some condition which the author of the code thought must be satisfied at a certain point in an algorithm, is not fulfilled. An example would be that the first part of an algorithm sorts elements of an array in ascending order, and a second part of the algorithm later encounters an an element that is not larger than the previous one.
There is usually not very much you can do if you encounter such an exception since it indicates an error in deal.II, not in your own program. Try to come up with the smallest possible program that still demonstrates the error and contact the deal.II mailing lists with it to obtain help.
I have noted that instead if I try the following
Triangulation<2,3> triangulation1, triangulation, triangulation2;
Point<3> P1(-1,-1,0), P2(1,1,0), P3(-1,-1,-1), P4(1,1,-1);
std::vector<unsigned int> repetitions(2);
repetitions[0]=2;
repetitions[1]=2;
GridGenerator::subdivided_hyper_rectangle(triangulation1,repetitions, P3, P4);
GridGenerator::subdivided_hyper_rectangle(triangulation2,repetitions, P1, P2);
GridGenerator::merge_triangulations(triangulation1, triangulation2, triangulation);
It works just fine as expected. Do you have any idea about what's going on?
Bests,
Nicola