Re: [deal.II] Help with triangulation::face_iterator

2016-11-27 Thread Wolfgang Bangerth
On 11/27/2016 01:48 PM, RAJAT ARORA wrote: That worked but I am not sure why a reference didn't work but a const. reference did. C++ says that you can convert an argument from one type to another if a function takes a const-reference, but not if the function takes a non-const reference. It's

Re: [deal.II] Help with triangulation::face_iterator

2016-11-27 Thread RAJAT ARORA
Thank you Professor. That worked but I am not sure why a reference didn't work but a const. reference did. On Tuesday, November 22, 2016 at 7:31:47 PM UTC-5, Wolfgang Bangerth wrote: > > > Rajat, > I don't know the exact cause of the problem, but... > > > Can we pass Triangulation::face_iter

Re: [deal.II] Help with triangulation::face_iterator

2016-11-22 Thread Wolfgang Bangerth
Rajat, I don't know the exact cause of the problem, but... Can we pass Triangulation::face_iterator by reference ? I am trying to call the function | template types::boundary_id Fdm::get_face_boundary_id(typenameTriangulation::face_iterator &f_it) { } | ...you can probably avoid it if you

[deal.II] Help with triangulation::face_iterator

2016-11-22 Thread RAJAT ARORA
Hello, Can we pass Triangulation::face_iterator by reference ? I am trying to call the function template types::boundary_id Fdm::get_face_boundary_id(typename Triangulation ::face_iterator &f_it) { } by using typename DofHandler::cell_iterator cell = dof_handler.begin(); for( face_num =