Hello,
I am stuck on this snipplet of code:
for
(std::vector<hp::DoFHandler<2>::active_cell_iterator>::const_iterator
cell_ptr = cell_list.begin (); cell_ptr != cell_list.end (); ++cell_ptr)
if (cell->point_inside ((*cell_ptr)->vertex (0)) &&
(cell->point_inside ((*cell_ptr)->vertex (3))))
(*cell_ptr)->get_dof_values (solution, cell_dof_values);
cell->set_dof_values (cell_dof_values, solution_patch);
cell_list is of type const
std::vector<hp::DoFHandler<2>::active_cell_iterator>. The program passes
this code a few houndred times without a problem and suddenly it breaks
down with the following error:
--------------------------------------------------------
An error occurred in line <1230> of file
</home2/mbuerg/deal.II/deal.II/include/dofs/dof_accessor.templates.h> in
function
static unsigned int
dealii::internal::DoFAccessor::Implementation::get_vertex_dof_index(const
dealii::hp::DoFHandler<dim, spacedim>&, unsigned int, unsigned int,
unsigned int) [with int dim = 2, int spacedim = 2]
The violated condition was:
this_fe_index != numbers::invalid_unsigned_int
The name and call sequence of the exception was:
ExcInternalError()
Additional Information:
(none)
Stacktrace:
-----------
#0 ./example1_new: unsigned int
dealii::internal::DoFAccessor::Implementation::get_vertex_dof_index<2,
2>(dealii::hp::DoFHandler<2, 2> const&, unsigned int, unsigned int,
unsigned int)
#1 ./example1_new: dealii::DoFAccessor<2, dealii::hp::DoFHandler<2, 2>
>::vertex_dof_index(unsigned int, unsigned int, unsigned int) const
#2 ./example1_new: void
dealii::internal::DoFAccessor::get_dof_indices<dealii::hp::DoFHandler<2,
2> >(dealii::DoFAccessor<2, dealii::hp::DoFHandler<2, 2> > const&,
std::vector<unsigned int, std::allocator<unsigned int> >&, unsigned int)
#3 ./example1_new: dealii::DoFAccessor<2, dealii::hp::DoFHandler<2, 2>
>::get_dof_indices(std::vector<unsigned int, std::allocator<unsigned
int> >&, unsigned int) const
#4 ./example1_new: void
dealii::internal::DoFCellAccessor::Implementation::get_dof_indices<2,
2>(dealii::DoFCellAccessor<dealii::hp::DoFHandler<2, 2> > const&,
std::vector<unsigned int, std::allocator<unsigned int> >&)
#5 ./example1_new: void
dealii::internal::DoFCellAccessor::Implementation::get_dof_values<2, 2,
dealii::TrilinosWrappers::Vector,
double*>(dealii::DoFCellAccessor<dealii::hp::DoFHandler<2, 2> > const&,
dealii::TrilinosWrappers::Vector const&, double*, double*)
#6 ./example1_new: void
dealii::DoFCellAccessor<dealii::hp::DoFHandler<2, 2>
>::get_dof_values<dealii::TrilinosWrappers::Vector,
double>(dealii::TrilinosWrappers::Vector const&,
dealii::Vector<double>&) const
#7 ./example1_new:
LaplaceProblem::h_refine_cell(std::vector<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::hp::DoFHandler<2,
2> > >,
std::allocator<dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::hp::DoFHandler<2,
2> > > > >)
#8 ./example1_new: LaplaceProblem::refine_grid()
#9 ./example1_new: LaplaceProblem::run()
#10 ./example1_new: main
--------------------------------------------------------
I have no idea, why it does not find the correct fe_index.
(*cell_ptr)->active_fe_index () returns 3, which is fine.
Does some has a hint?
Thanks,
Markus
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii