cell = container.begin_active(),
endc = container.end();
- // go through all active cells and look. if the vertex is part of that cell
+ // go through all active cells and look if the vertex is part of that cell
//
// in 1d, this is all we need to care about. in 2d/3d we also need to worry
// that the vertex might be a hanging node on a face or edge of a cell; in
// the bits/find_cells_adjacent_to_vertex_6 testcase. thus, if we
// haven't yet found the vertex for the current cell we also need to
// look at the mid-points of edges
+ //
+ // as a final note, deciding whether a neighbor is actually coarses is
+ // simple in the case of isotropic refinement (we just need to look at
+ // the level of the current and the neighboring cell). however, this
+ // isn't so simple if we have used anisotropic refinement since then
+ // the level of a cell is not indicative of whether it is coarser or
+ // not than the current cell. ultimately, we want to add all cells on
+ // which the vertex is, independent of whether they are coarser or
+ // finer and so in the 2d case below we simply add *any* *active* neighbor.
+ // in the worst case, we add cells multiple times to the adjacent_cells
+ // list, but std::set throws out those cells already entered
for (; cell != endc; ++cell)
{
for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_cell; v++)
adjacent_cells.insert(cell);
// as explained above, in 2+d we need to check whether
- // this vertex is on a face behind which there is a coarser
- // neighbor. if this is the case, then we need to also
- // add this neighbor
+ // this vertex is on a face behind which there is a
+ // (possibly) coarser neighbor. if this is the case,
+ // then we need to also add this neighbor
if (dim >= 2)
for (unsigned int vface = 0; vface < dim; vface++)
{
if (!cell->at_boundary(face)
&&
- (cell->neighbor(face)->level() < cell->level()))
+ cell->neighbor(face)->active())
{
- // there is a coarser cell behind a face to which the
- // vertex belongs. the vertex we are looking at is
- // then either a vertex of that coarser neighbor,
- // or it is a hanging node on one of the faces of
- // that cell. in either case, it is adjacent
- // to the vertex, so add it to the list as well
- // (if the cell was already in the list then
- // the std::set makes sure that we get it only
+ // there is a (possibly )coarser cell behind a
+ // face to which the vertex belongs. the
+ // vertex we are looking at is then either a
+ // vertex of that coarser neighbor, or it is a
+ // hanging node on one of the faces of that
+ // cell. in either case, it is adjacent to the
+ // vertex, so add it to the list as well (if
+ // the cell was already in the list then the
+ // std::set makes sure that we get it only
// once)
adjacent_cells.insert (cell->neighbor(face));
goto next_cell;
{
template <int dim, template<int, int> class Container, int spacedim>
void find_active_cell_around_point_internal(const Container<dim,spacedim>& container,
- std::set<typename Container<dim,spacedim>::active_cell_iterator>& searched_cells,
+ std::set<typename Container<dim,spacedim>::active_cell_iterator>& searched_cells,
std::set<typename Container<dim,spacedim>::active_cell_iterator>& adjacent_cells)
{
typedef typename Container<dim,spacedim>::active_cell_iterator cell_iterator;
// update the searched cells
searched_cells.insert(adjacent_cells.begin(), adjacent_cells.end());
// now we to collect all neighbors
- // of the cells in adjacent_cells we
+ // of the cells in adjacent_cells we
// have not yet searched.
std::set<cell_iterator> adjacent_cells_new;
-
+
typename std::set<cell_iterator>::const_iterator
cell = adjacent_cells.begin(),
endc = adjacent_cells.end();
adjacent_cells.insert(it);
break;
}
- }
+ }
}
}
std::vector<cell_iterator> adjacent_cells_tmp =
find_cells_adjacent_to_vertex(container, vertex);
-
+
// Make sure that we have found
// at least one cell adjacent to vertex.
Assert(adjacent_cells_tmp.size()>0, ExcInternalError());
// in the grid.
// As long as we have not found
// the cell and have not searched
- // every cell in the triangulation,
+ // every cell in the triangulation,
// we keep on looking.
const unsigned int n_cells =get_tria(container).n_cells();
bool found = false;
}
//udpate the number of cells searched
cells_searched += adjacent_cells.size();
- // if we have not found the cell in
+ // if we have not found the cell in
// question and have not yet searched every
- // cell, we expand our search to
+ // cell, we expand our search to
// all the not already searched neighbors of
// the cells in adjacent_cells. This is
// what find_active_cell_around_poin_internal
std::vector<cell_iterator> adjacent_cells_tmp =
find_cells_adjacent_to_vertex(container, vertex);
-
+
// Make sure that we have found
// at least one cell adjacent to vertex.
Assert(adjacent_cells_tmp.size()>0, ExcInternalError());
// in the grid.
// As long as we have not found
// the cell and have not searched
- // every cell in the triangulation,
+ // every cell in the triangulation,
// we keep on looking.
const unsigned int n_cells =get_tria(container).n_cells();
bool found = false;
{
const Point<dim> p_cell = mapping[(*cell)->active_fe_index()].transform_real_to_unit_cell(*cell, p);
-
+
// calculate the infinity norm of
// the distance vector to the unit cell.
const double dist = GeometryInfo<dim>::distance_to_unit_cell(p_cell);
}
//udpate the number of cells searched
cells_searched += adjacent_cells.size();
- // if we have not found the cell in
+ // if we have not found the cell in
// question and have not yet searched every
- // cell, we expand our search to
+ // cell, we expand our search to
// all the not already searched neighbors of
// the cells in adjacent_cells.
if(!found && cells_searched < n_cells)
+++ /dev/null
-
-DEAL::Checking Q1 in 1d:
-DEAL::Checking Q1 in 2d:
-DEAL::Checking Q1 in 3d:
-DEAL::Checking Q2 in 1d:
-DEAL::Checking Q2 in 2d:
-DEAL::Checking Q2 in 3d:
-DEAL::Checking Q3 in 1d:
-DEAL::Checking Q3 in 2d:
-DEAL::Checking Q3 in 3d:
-DEAL::Checking DGQ0 in 1d:
-DEAL::Checking DGQ0 in 2d:
-DEAL::Checking DGQ0 in 3d:
-DEAL::Checking DGQ1 in 1d:
-DEAL::Checking DGQ1 in 2d:
-DEAL::Checking DGQ1 in 3d:
-DEAL::Checking DGQ3 in 1d:
-DEAL::Checking DGQ3 in 2d:
-DEAL::Checking DGQ3 in 3d:
-DEAL::Checking DGP0 in 1d:
-DEAL::Checking DGP0 in 2d:
-DEAL::Checking DGP0 in 3d:
-DEAL::Checking DGP1 in 1d:
-DEAL::Checking DGP1 in 2d:
-DEAL::Checking DGP1 in 3d:
-DEAL::Checking DGP3 in 1d:
-DEAL::Checking DGP3 in 2d:
-DEAL::Checking DGP3 in 3d:
-DEAL::Checking Nedelec1 in 2d:
-DEAL::Checking Nedelec1 in 3d:
-DEAL::Checking RaviartThomas0 in 2d:
-DEAL::4
-DEAL::1
-DEAL:cg::Starting value 1.2
-DEAL:cg::Convergence step 10 value 0
-DEAL::L2_Error : 0
-DEAL::Checking RaviartThomas1 in 2d:
-DEAL::8
-DEAL::2
-DEAL:cg::Starting value 1.4
-DEAL:cg::Convergence step 12 value 0
-DEAL::L2_Error : 0
-DEAL::Checking RaviartThomas2 in 2d:
-DEAL::12
-DEAL::2
-DEAL:cg::Starting value 1.4
-DEAL:cg::Convergence step 14 value 0
-DEAL::L2_Error : 0
-DEAL::Checking RaviartThomasNodal0 in 2d:
-DEAL::4
-DEAL::1
-DEAL:cg::Starting value 0.49
-DEAL:cg::Convergence step 10 value 0
-DEAL::L2_Error : 0
-DEAL::Checking RaviartThomasNodal1 in 2d:
-DEAL::8
-DEAL::2
-DEAL:cg::Starting value 0.29
-DEAL:cg::Convergence step 12 value 0
-DEAL::L2_Error : 0
-DEAL::Checking RaviartThomasNodal2 in 2d:
-DEAL::12
-DEAL::3
-DEAL:cg::Starting value 0.23
-DEAL:cg::Convergence step 16 value 0
-DEAL::L2_Error : 0
-DEAL::Checking RaviartThomasNodal0 in 3d:
-DEAL::16
-DEAL::1
-DEAL:cg::Starting value 0.47
-DEAL:cg::Convergence step 9 value 0
-DEAL::L2_Error : 0
-DEAL::Checking RaviartThomasNodal1 in 3d:
-DEAL::64
-DEAL::4
-DEAL:cg::Starting value 0.20
-DEAL:cg::Convergence step 12 value 0
-DEAL::L2_Error : 0
-DEAL::Checking RaviartThomasNodal2 in 3d:
-DEAL::144
-DEAL::9
-DEAL:cg::Starting value 0.13
-DEAL:cg::Convergence step 15 value 0
-DEAL::L2_Error : 0
-DEAL::Checking FE_Q<1>(1)3 in 1d:
-DEAL::Checking FE_DGQ<1>(2)2 in 1d:
-DEAL::Checking FE_DGP<1>(3)1 in 1d:
-DEAL::Checking FE_Q<2>(1)3 in 2d:
-DEAL::Checking FE_DGQ<2>(2)2 in 2d:
-DEAL::Checking FE_DGP<2>(3)1 in 2d:
-DEAL::Checking FE_Q<3>(1)3 in 3d:
-DEAL::Checking FE_DGQ<3>(2)2 in 3d:
-DEAL::Checking FE_DGP<3>(3)1 in 3d:
-DEAL::Checking FE_Q<1>(1)3FE_DGQ<1>(2)2 in 1d:
-DEAL::Checking FE_DGQ<1>(2)2FE_DGP<1>(3)1 in 1d:
-DEAL::Checking FE_DGP<1>(3)1FE_DGQ<1>(2)2 in 1d:
-DEAL::Checking FE_Q<2>(1)3FE_DGQ<2>(2)2 in 2d:
-DEAL::Checking FE_DGQ<2>(2)2FE_DGP<2>(3)1 in 2d:
-DEAL::Checking FE_DGP<2>(3)1FE_DGQ<2>(2)2 in 2d:
-DEAL::Checking FE_Q<1>(1)3FE_DGP<1>(3)1FE_Q<1>(1)3 in 1d:
-DEAL::Checking FE_DGQ<1>(2)2FE_DGQ<1>(2)2FE_Q<1>(3)3 in 1d:
-DEAL::Checking FE_DGP<1>(3)1FE_DGP<1>(3)1FE_Q<1>(2)3 in 1d:
-DEAL::Checking FE_Q<2>(1)3FE_DGP<2>(3)1FE_Q<2>(1)3 in 2d:
-DEAL::Checking FE_DGQ<2>(2)2FE_DGQ<2>(2)2FE_Q<2>(3)3 in 2d:
-DEAL::Checking FE_DGP<2>(3)1FE_DGP<2>(3)1FE_Q<2>(2)3 in 2d:
-DEAL::Checking FE_DGQ<3>(1)3FE_DGP<3>(3)1FE_Q<3>(1)3 in 3d:
-DEAL::Checking (FESystem<2>(FE_Q<2>(1),3))3FE_DGQ<2>(0)1FE_Q<2>(1)3 in 2d:
-DEAL::Checking FE_DGQ<2>(3)1FESystem<2>(FE_DGQ<2>(0),3)1FESystem<2>(FE_Q<2>(2),1, FE_DGQ<2>(0),1)2 in 2d:
-DEAL::Checking FE_DGQ<2>(3)1FE_Nedelec<2>(1)2 in 2d:
-DEAL::Checking FE_Nedelec<2>(1)1FESystem<2>(FE_DGQ<2>(1),2)1FESystem<2>(FE_Q<2>(2),1, FE_Nedelec<2>(1),2)2 in 2d: