Hi all
I can't work out why the snippet of code crashes deal with the error message
below. If I comment out the line
std::cout << cell->user_index() << std::endl;
it works fine.
How are the user_index and the user_pointer related? From the documentation
they appear unrelated.
// code
for (typename Triangulation<dim>::active_cell_iterator cell =
triangulation.begin_active() ;
cell != triangulation.end(); ++cell) {
std::cout << cell->user_index() << std::endl;
}
for (typename Triangulation<dim>::active_cell_iterator cell =
triangulation.begin_active() ;
cell != triangulation.end(); ++cell) {
cell->clear_user_pointer();
}
//output and error message
0
0
0
0
--------------------------------------------------------
An error occurred in line <640> of file
</Users/andrewmcbride/lib/deal_svn/deal.II/deal.II/include/grid/tria_objects.h>
in function
void*&
dealii::internal::Triangulation::TriaObjects<G>::user_pointer(unsigned int)
[with G = dealii::internal::Triangulation::TriaObject<3>]
The violated condition was:
user_data_type == data_unknown || user_data_type == data_pointer
The name and call sequence of the exception was:
ExcPointerIndexClash()
Additional Information:
(none)
Regards
Andrew
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii