ActiveCellIterator<dim, dim, DoFHandlerType>::type,
Point<dim>>
my_pair = GridTools::find_active_cell_around_point(mapping, *dh, p);
- AssertThrow(!my_pair.first->is_artificial(),
+ AssertThrow(my_pair.first.state() == IteratorState::valid &&
+ !my_pair.first->is_artificial(),
VectorTools::ExcPointNotAvailableHere());
cell = my_pair.first;
ActiveCellIterator<dim, dim, DoFHandlerType>::type,
Point<dim>>
my_pair = GridTools::find_active_cell_around_point(mapping, *dh, p);
- AssertThrow(!my_pair.first->is_artificial(),
+ AssertThrow(my_pair.first.state() == IteratorState::valid &&
+ !my_pair.first->is_artificial(),
VectorTools::ExcPointNotAvailableHere());
cell = my_pair.first;
ActiveCellIterator<dim, dim, DoFHandlerType>::type,
Point<dim>>
my_pair = GridTools::find_active_cell_around_point(mapping, *dh, p);
- AssertThrow(!my_pair.first->is_artificial(),
+ AssertThrow(my_pair.first.state() == IteratorState::valid &&
+ !my_pair.first->is_artificial(),
VectorTools::ExcPointNotAvailableHere());
cell = my_pair.first;
cell_point =
GridTools::find_active_cell_around_point(mapping, dof, point);
- AssertThrow(cell_point.first->is_locally_owned(),
+ AssertThrow(cell_point.first.state() == IteratorState::valid &&
+ cell_point.first->is_locally_owned(),
ExcPointNotAvailableHere());
Assert(GeometryInfo<dim>::distance_to_unit_cell(cell_point.second) < 1e-10,
ExcInternalError());
cell_point =
GridTools::find_active_cell_around_point(mapping, dof, point);
- AssertThrow(cell_point.first->is_locally_owned(),
+ AssertThrow(cell_point.first.state() == IteratorState::valid &&
+ cell_point.first->is_locally_owned(),
ExcPointNotAvailableHere());
Assert(GeometryInfo<dim>::distance_to_unit_cell(cell_point.second) < 1e-10,
ExcInternalError());
cell_point =
GridTools::find_active_cell_around_point(mapping, dof, point);
- AssertThrow(cell_point.first->is_locally_owned(),
+ AssertThrow(cell_point.first.state() == IteratorState::valid &&
+ cell_point.first->is_locally_owned(),
ExcPointNotAvailableHere());
Assert(GeometryInfo<dim>::distance_to_unit_cell(cell_point.second) < 1e-10,
ExcInternalError());
cell_point =
GridTools::find_active_cell_around_point(mapping, dof, point);
- AssertThrow(cell_point.first->is_locally_owned(),
+ AssertThrow(cell_point.first.state() == IteratorState::valid &&
+ cell_point.first->is_locally_owned(),
ExcPointNotAvailableHere());
Assert(GeometryInfo<dim>::distance_to_unit_cell(cell_point.second) < 1e-10,
ExcInternalError());
cell_point =
GridTools::find_active_cell_around_point(mapping, dof, point);
- AssertThrow(cell_point.first->is_locally_owned(),
+ AssertThrow(cell_point.first.state() == IteratorState::valid &&
+ cell_point.first->is_locally_owned(),
ExcPointNotAvailableHere());
Assert(GeometryInfo<dim>::distance_to_unit_cell(cell_point.second) < 1e-10,
ExcInternalError());
cell_point =
GridTools::find_active_cell_around_point(mapping, dof_handler, p);
+ AssertThrow(cell_point.first.state() == IteratorState::valid,
+ ExcPointNotAvailableHere());
+
Quadrature<dim> q(
GeometryInfo<dim>::project_to_unit_cell(cell_point.second));
cell_point =
GridTools::find_active_cell_around_point(mapping, dof_handler, p);
+ AssertThrow(cell_point.first.state() == IteratorState::valid,
+ ExcPointNotAvailableHere());
+
Quadrature<dim> q(
GeometryInfo<dim>::project_to_unit_cell(cell_point.second));
cell_point =
GridTools::find_active_cell_around_point(mapping, dof_handler, p);
+ AssertThrow(cell_point.first.state() == IteratorState::valid,
+ ExcPointNotAvailableHere());
+
const Quadrature<dim> q(
GeometryInfo<dim>::project_to_unit_cell(cell_point.second));
cell_point =
GridTools::find_active_cell_around_point(mapping, dof_handler, p);
+ AssertThrow(cell_point.first.state() == IteratorState::valid,
+ ExcPointNotAvailableHere());
+
Quadrature<dim> q(
GeometryInfo<dim>::project_to_unit_cell(cell_point.second));
const int proc,
Vector<double> & value) const
{
- try
- {
- typename DoFHandler<dim>::active_cell_iterator cell =
- GridTools::find_active_cell_around_point(dof_handler, point);
+ typename DoFHandler<dim>::active_cell_iterator cell =
+ GridTools::find_active_cell_around_point(dof_handler, point);
- if (cell->is_locally_owned())
- VectorTools::point_value(dof_handler, solution, point, value);
- }
- catch (GridTools::ExcPointNotFound<dim> &p)
- {}
+ if (cell.state() == IteratorState::valid && cell->is_locally_owned())
+ VectorTools::point_value(dof_handler, solution, point, value);
std::vector<double> tmp(value.size());
for (unsigned int i = 0; i < value.size(); ++i)
const int proc,
Vector<PetscScalar> &value) const
{
- try
- {
- typename DoFHandler<dim>::active_cell_iterator cell =
- GridTools::find_active_cell_around_point(dof_handler, point);
-
- if (cell->is_locally_owned())
- VectorTools::point_value(dof_handler,
- locally_relevant_solution,
- point,
- value);
- }
- catch (GridTools::ExcPointNotFound<dim> &p)
- {}
+ typename DoFHandler<dim>::active_cell_iterator cell =
+ GridTools::find_active_cell_around_point(dof_handler, point);
+
+ if (cell.state() == IteratorState::valid && cell->is_locally_owned())
+ VectorTools::point_value(dof_handler,
+ locally_relevant_solution,
+ point,
+ value);
std::vector<double> tmp(value.size());
std::vector<double> tmp2(value.size());
const int proc,
Vector<double> & value) const
{
- try
- {
- typename DoFHandler<dim>::active_cell_iterator cell =
- GridTools::find_active_cell_around_point(dof_handler, point);
+ typename DoFHandler<dim>::active_cell_iterator cell =
+ GridTools::find_active_cell_around_point(dof_handler, point);
- if (cell->is_locally_owned())
- VectorTools::point_value(dof_handler, solution, point, value);
- }
- catch (GridTools::ExcPointNotFound<dim> &p)
- {}
+ if (cell.state() == IteratorState::valid && cell->is_locally_owned())
+ VectorTools::point_value(dof_handler, solution, point, value);
std::vector<double> tmp(value.size());
for (unsigned int i = 0; i < value.size(); ++i)
const int proc,
Vector<double> & value) const
{
- try
- {
- const typename DoFHandler<dim>::active_cell_iterator cell =
- GridTools::find_active_cell_around_point(dof_handler, point);
+ const typename DoFHandler<dim>::active_cell_iterator cell =
+ GridTools::find_active_cell_around_point(dof_handler, point);
+ if (cell.state() == IteratorState::valid)
+ {
if (cell->is_locally_owned())
VectorTools::point_value(dof_handler, solution, point, value);
}
- catch (GridTools::ExcPointNotFound<dim> &p)
- {
- pcout << "Point: " << point << " is not inside a non-artificial cell!"
- << std::endl;
- }
-
+ else
+ pcout << "Point: " << point << " is not inside a non-artificial cell!"
+ << std::endl;
std::vector<double> tmp(value.size());
for (unsigned int i = 0; i < value.size(); ++i)