So after waiting a while, I decided to dive in the source code and see what this exception was talking about. (I guess everyone is busy making preparations for the workshop, thanks!)
According to Doxygen manual, This exception is raised when: "Triangulation objacts can either access a user pointer or a user index. What you tried to do is trying to access one of those after using the other." (BTW "OBJACT" is misspelled) So I went back to step-18 and saw that after partitioning the triangulation in create_coarse_grid() the setup_quadrature_point_history() is called which uses set_user_pointer() for quadrature points. After that the program moves to the function refine_grid() and there it tries to call the partition_triangulation without first clearing the user data (notice triangulation was set to access user pointer). However partition_triangulation now is accessing a user index (n_mpi_processes or this_mpi_process) and this leads to the Error according to the above mentioned assertion. I hope I understood it correctly , if so the step 18 is buggy. I solved the problem by adding triangulation.clear_user_data() right at the top and inside refine_initial_grid() and that solved the problem. I am not sure however if the results are the same as the one given in the tutorial, since I haven't check them yet. Could someone please confirm this? And maybe explain to me why the the user_data should always be one of the pointer or index and the reasoning behind using such an assertion? My other question is there also the possibility to stack up user data on a triangulation without the need to clear the data in the triangulation? Thanks a lot in advance, Armin Ghajar Jazi On Fri, Jul 27, 2012 at 1:08 PM, Armin Ghajar Jazi <[email protected]> wrote: > BTW > following is the message from the assertion which was violated. > > An error occurred in line <715> of file > </home/ghajar_jazi/deal.II/include/deal.II/grid/tria_objects.h> in > function > unsigned int& > dealii::internal::Triangulation::TriaObjects<G>::user_index(unsigned > int) [with G = dealii::internal::Triangulation::TriaObject<3>] > The violated condition was: > user_data_type == data_unknown || user_data_type == data_index > The name and call sequence of the exception was: > ExcPointerIndexClash() > Additional Information: > (none) > > > On Fri, Jul 27, 2012 at 12:48 PM, Armin Ghajar Jazi > <[email protected]> wrote: >> Hello Dealers again! >> >> I am running the step 18, and getting the following run-time error: >> >> #0 /home/ghajar_jazi/deal.II/lib/libdeal_II.g.so.7.1.0: >> dealii::internal::Triangulation::TriaObjects<dealii::internal::Triangulation::TriaObject<3> >>>::user_index(unsigned int) >> #1 /home/ghajar_jazi/deal.II/lib/libdeal_II.g.so.7.1.0: >> dealii::TriaAccessor<3, 3, 3>::user_index() const >> #2 /home/ghajar_jazi/deal.II/lib/libdeal_II.g.so.7.1.0: >> #3 /home/ghajar_jazi/deal.II/lib/libdeal_II.g.so.7.1.0: >> dealii::Triangulation<3, >> 3>::save_user_indices_hex(std::vector<unsigned int, >> std::allocator<unsigned int> >&) const >> #4 /home/ghajar_jazi/deal.II/lib/libdeal_II.g.so.7.1.0: >> dealii::Triangulation<3, 3>::save_user_indices(std::vector<unsigned >> int, std::allocator<unsigned int> >&) const >> #5 /home/ghajar_jazi/deal.II/lib/libdeal_II.g.so.7.1.0: void >> dealii::GridTools::get_face_connectivity_of_cells<3, >> 3>(dealii::Triangulation<3, 3> const&, dealii::SparsityPattern&) >> #6 /home/ghajar_jazi/deal.II/lib/libdeal_II.g.so.7.1.0: void >> dealii::GridTools::partition_triangulation<3, 3>(unsigned int, >> dealii::Triangulation<3, 3>&) >> #7 ./step-18: Step18::TopLevel<3>::refine_initial_grid() >> #8 ./step-18: Step18::TopLevel<3>::do_initial_timestep() >> #9 ./step-18: Step18::TopLevel<3>::run() >> #10 ./step-18: main >> >> Since I havent changed anything in this examples, I am thinking maybe >> this is due to a faulty compilation? (Edit: I recompiled deal from a >> clean state, but the error still persisted ) >> >> Any inputs would be highly appreciated. >> >> Armin Ghajar Jazi >> >> PhD candidate at >> Chair of Fluid Mechanics >> Universität Siegen >> Paul-Bonatz-Str. 9-11 >> Room A315 >> D-57068 Siegen >> Germany >> >> Phone: ++49-(0)271-740-4675 >> Fax : ++49-(0)271-740-2666 >> E-mail: [email protected] >> Internet: www.uni-siegen.de/fb11/lfst > > > > -- > Armin Ghajar Jazi > > PhD candidate at > Chair of Fluid Mechanics > Universität Siegen > Paul-Bonatz-Str. 9-11 > Room A315 > D-57068 Siegen > Germany > > Phone: ++49-(0)271-740-4675 > Fax : ++49-(0)271-740-2666 > E-mail: [email protected] > Internet: www.uni-siegen.de/fb11/lfst -- Armin Ghajar Jazi PhD candidate at Chair of Fluid Mechanics Universität Siegen Paul-Bonatz-Str. 9-11 Room A315 D-57068 Siegen Germany Phone: ++49-(0)271-740-4675 Fax : ++49-(0)271-740-2666 E-mail: [email protected] Internet: www.uni-siegen.de/fb11/lfst _______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
