Re: [deal.II] Re: Bug Report in GridTools::get_active_neighbors()

2019-11-29 Thread Simon Sticko
Hi,
Fixed in #9108, already merged in. I should probably have written that here for 
completeness. Sorry.

Best,
Simon

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/eb765d3a-d9bc-4669-928d-01c281f73911%40googlegroups.com.


Re: [deal.II] Re: Bug Report in GridTools::get_active_neighbors()

2019-11-29 Thread Wolfgang Bangerth
On 11/28/19 2:46 AM, Simon Sticko wrote:
> Hi,
> I think it's just the documentation that can be slightly improved here.
> 
> The function get_active_child_cells has a similar signature but it has
> this note in its documentation:
> 
> * @note Since in C++ the MeshType template argument can not be deduced from
> * a function call, you will have to specify it after the function name, as
> * for example in
> * @code
> *   GridTools::get_active_child_cells > (cell)
> * @endcode
> */
> template 
> std::vector
> get_active_child_cells(const typename MeshType::cell_iterator &cell);

Yes, that's precisely correct!


> The same note should maybe be added to get_active_neighbors for clarity.

Would either of the two of you want to propose a patch that does this?

Best
  Wolfgang

-- 

Wolfgang Bangerth  email: bange...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/6407181e-2f17-222b-3689-082c5ccb518e%40colostate.edu.


[deal.II] Re: Bug Report in GridTools::get_active_neighbors()

2019-11-28 Thread Simon Sticko
Hi,
I think it's just the documentation that can be slightly improved here.

The function get_active_child_cells has a similar signature but it has 
this note in its documentation:

* @note Since in C++ the MeshType template argument can not be deduced from
* a function call, you will have to specify it after the function name, as
* for example in
* @code
*   GridTools::get_active_child_cells > (cell)
* @endcode
*/
template 
std::vector
get_active_child_cells(const typename MeshType::cell_iterator &cell);

The same note should maybe be added to get_active_neighbors for clarity.

Best,
Simon

On Thursday, November 28, 2019 at 10:03:17 AM UTC+1, Andreas Kyritsakis 
wrote:
>
> 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 
> #include 
> #include 
> #include 
> using namespace dealii;
>
> template
> class Test{
> public: 
> Test(Triangulation *tria) : triangulation(triangulation), 
> dof_handler(*tria){}
> 
> void run(){
> typename DoFHandler::active_cell_iterator cell;
>   
> for (cell = dof_handler.begin_active(); cell != dof_handler.end(); 
> ++cell){
> std::vector::active_cell_iterator> 
> neighbors;
> GridTools::get_active_neighbors(cell, neighbors); 
> }
> }
> private:
> Triangulation* triangulation;
> DoFHandler 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::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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/0a78a60f-89d1-4c6a-9ba3-724d7112c355%40googlegroups.com.