Dear deal.II community As a beginner trying to understand this library I tried to merge two traingulations namely "cheese" and "hyper_cube" by modifying step-1 as - void first_grid () { Triangulation<2> tria1,tria2,tria_merge; /*const double R = 13.0; const double r =7.0;*/ const double left = 0.0; const double right = 1.0; const std::vector<unsigned int> holes={6,5}; GridGenerator::cheese(tria1, holes); GridGenerator::hyper_cube(tria2, left, right); GridGenerator::merge_triangulations(tria1, tria2, tria_merge); unsigned int cells = tria_merge.n_cells(4); std::ofstream out ("grid-1.vtk"); GridOut grid_out; grid_out.write_vtk (tria_merge, out); std::cout << "Grid written to grid-1.vtk" << std::endl; std::cout << "Number of cells:" << cells << std::endl; } int main () { first_grid (); //second_grid (); }
After compiling I ran into an error that - terminate called after throwing an instance of 'dealii::StandardExceptions::ExcInternalError' what(): -------------------------------------------------------- An error occurred in line <1999> of file </home/pushkar/dealii-9.0.0/source/grid/tria.cc> in function static void dealii::internal::TriangulationImplementation::Implementation::create_triangulation(const std::vector<dealii::Point<dim> >&, const std::vector<dealii::CellData<2> >&, const dealii::SubCellData&, dealii::Triangulation<2, spacedim>&) [with int spacedim = 2] The violated condition was: (n_adj_cells >= 1) && (n_adj_cells <= 2) 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 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. -------------------------------------------------------- So I am wondering that am I doing something wrong or is there any consistency check that needs to be performed while merging triangulations. Any direction in this regard will surely be beneficial. Thanks Pushkar -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/424f5aa0-942c-46e9-9f38-3cad6de0b7d4n%40googlegroups.com.