Dear all,

 I am trying to apply deal.II for my research. But, the segmentation fault 
happens in the refine_grid() function that comes from step-26.cc tutorial 
example.

The reason why I think the segmentation error occurs in this function are 
as follows...

template <int dim>
void Step6<dim>::refine_grid (const unsigned int min_grid_level,
      const unsigned int max_grid_level)
{
  Vector<float> estimated_error_per_cell (triangulation.n_active_cells());

  KellyErrorEstimator<dim>::estimate (dof_handler,
                                      QGauss<dim-1>(Qp+1),
                                      typename FunctionMap<dim>::type(),
                                      solution_FSA,
                                      estimated_error_per_cell);

  GridRefinement::refine_and_coarsen_fixed_number (triangulation,
                                                   estimated_error_per_cell,
                                                   0.2, 0.1);
  
  if(triangulation.n_levels() >max_grid_level)
for(typename Triangulation<dim>::active_cell_iterator 
    cell = triangulation.begin_active(max_grid_level); cell != 
triangulation.end(); ++cell)
cell->clear_refine_flag ();
  std::cout<<"It must be here!!!!   1"<<std::endl;
  for(typename Triangulation<dim>::active_cell_iterator 
cell = triangulation.begin_active(min_grid_level); cell != 
triangulation.end(min_grid_level); ++cell)
cell->clear_coarsen_flag ();
  std::cout<<"It must be here!!!!   2"<<std::endl;
  SolutionTransfer<dim>  solution_trans(dof_handler);
 
  ...


As you can see, in the above function, I use "std::cout<<" to check where 
the segmentation error happens.

In the result, "It must be here!!!!   1" is printed before the segmentation 
error happens, but ""It must be here!!!!   2" is not printed since the 
segmentation erorr happens. 

So, I think the segmentation error happens due to "cell->clear_coarsen_flag 
();" , but I don't know why...

FYI, in the above function, I set min_grid_level=0 and max_grid_level=3.

Is there anyone who  can help me...?

Thank you .

Kyusik.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to