I'm new to deal.II and I'm having a similar problem. I'm trying to extend 
the FEFieldFunction class with an extrapolated_value method that handles 
this exception.

Here's the relevant method:

template<int dim, typename DoFHandlerType, typename VectorType>
double ExtrapolatedField<dim,DoFHandlerType,VectorType>::
       extrapolated_value(const Point<dim> &point,
                          const unsigned int) {
   double val;
   try {
       val = this->value(point);
   }
   catch (GridTools::ExcPointNotFound<dim>) {
      val = this->value(this->get_nearest_boundary_vertex(point));
   }
   return val;
}


It appears to me that the exception isn't being caught by my try-catch 
construct. The program aborts with the error:

----------------------------------------------------
Exception on processing:

--------------------------------------------------------
An error occurred in line <1411> of file 
</home/zimmerman/Repos/dealii/source/grid/grid_tools.cc> in function
    std::pair<typename MeshType<dim, spacedim>::active_cell_iterator, 
dealii::Point<dim> > dealii::GridTools::find_active_cell_around_point(const 
dealii::Mapping<dim, spacedim>&, const MeshType<dim, spacedim>&, const 
dealii::Point<spacedim>&) [with int dim = 2; MeshType = dealii::DoFHandler; 
int spacedim = 2; typename MeshType<dim, spacedim>::active_cell_iterator = 
dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2>, 
false> >]
The violated condition was:
    best_cell.first.state() == IteratorState::valid
The name and call sequence of the exception was:
    ExcPointNotFound<spacedim>(p)
Additional Information:
The point <0.487084 -0.116491> could not be found inside any of the 
subcells of a coarse grid cell.
--------------------------------------------------------

Aborting!
----------------------------------------------------


After digging through the source code and documentation a bit, I was 
worried that this is the expected behavior of AssertThrow and that I could 
not suppress the abort signal. But this mailing this thread gives me hope.

Any advice?

Thanks,

Alex

On Tuesday, January 21, 2014 at 5:29:37 PM UTC+1, Timo Heister wrote:
>
> > I'm using 8.0.0. 
> > Should I upgrade? 
>
> 8.1.0 has many bugfixes and new features over 8.0.0 and it fixes your 
> problem, so that kind of makes sense. 
>
> -- 
> Timo Heister 
> http://www.math.clemson.edu/~heister/ 
>

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

Reply via email to