Hello Wolfgang,
thanks for your message.
May I know which method or keywords can be used to stand for the non-existing cell and could I use cell->at_boundary() to check whether the cell exists or not?
I would like to know how we can identify if the object of dealii::IteratorRange<dealii::TriaActiveIterator<dealii::DoFCellAccessor<3, 3, false> > >::IteratorOverIterators does not exist. I have tried ==NULL and nullptr, however, it doe snot work.
There is the code snippet below, please take a look:
for (const auto &cell : solid_3d.dof_handler_ref.active_cell_iterators())
{
if(cell->at_boundary()){
continue;
}//to check whether the cell exists
for (unsigned int f = 0; f < cell->n_faces(); ++f)
{
auto neighbor = cell->neighbor(f);//find the neighbor ,but not sure if it exists
if(neighbor->at_boundary())
continue;//check if the neighbor of cell exists
int neighbor_index = neighbor->active_cell_index();//get the global index of the cell if it exists
...