Hello,

This is to report what I think is a bug in 
GridTools::get_active_neighbors().

The following code should compile but it does not.

#include <deal.II/grid/tria.h>
#include <deal.II/dofs/dof_handler.h>
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_tools.h>
using namespace dealii;

template<int dim>
class Test{
public: 
    Test(Triangulation<dim> *tria) : triangulation(triangulation), 
dof_handler(*tria){}
    
    void run(){
        typename DoFHandler<dim>::active_cell_iterator cell;
  
        for (cell = dof_handler.begin_active(); cell != dof_handler.end(); 
++cell){
            std::vector<typename DoFHandler<dim>::active_cell_iterator> 
neighbors;
            GridTools::get_active_neighbors(cell, neighbors); 
    }
    }
private:
    Triangulation<dim>* triangulation;
    DoFHandler<dim> dof_handler;
};

int main(){
    Triangulation<2> triangulation;
    GridGenerator::hyper_cube(triangulation, -1, 1);
    Test<2> test(&triangulation);
    test.run();
}

I think somehow the compiler cannot resolve the generic type 
MeshType::active_cell_iterator into the specific one 
DoFHandler<dim>::active_cell_iterator, although from what I understand in 
the documentation it should. Probably some template specification missing 
somewhere, but I can't find it.

In my code I fixed it easily by copying the function directly to my own 
files and specifying appropriately, but I think it would be nice to report 
the bug.

Cheers,
Andreas 

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/27895150-8268-4f88-96e9-634172564a44%40googlegroups.com.

Reply via email to