I tried as you suggested but it seems there is a little error still. I 
found the constructor in TriaActiveIterator (5/8 constructor) though. 

I wrote :

*typename DoFHandler<dim>::active_cell_iterator cell_2 
(cell_1->get_triangulation(), cell_1->level(), cell_1->index(), 
dof_handler_2);*

and the error says (translated from french):
no matching function for the call to *« 
dealii::TriaActiveIterator<dealii::DoFCellAccessor<dealii::DoFHandler<2, 2>, 
false> >::TriaActiveIterator(const dealii::Triangulation<2, 2>&, int, int, 
const dealii::DoFHandler<2, 2>&) » 
*
so this apparently match what I wrote.

A bit further down in the error when enumerating the 8 existing constructor 
I got 
*"no known conversion to convert argument 1 from 
« const dealii::Triangulation<2, 2> » to 
« const dealii::Triangulation<2, 2>* »*

So the constructor is expected a pointer (as the doc of TriaActiveIterator 
says) but is getting a value. However I checked the doc of 
*get_triangulation()* and it  return a reference so I am confused now.

Also for the creation of the second iterator, I have to indicate at some 
point the dof_handler I want to link to it, so I guess the last argument 
should be* dof_handler_2* rather than *cell_1-> get_dof_handler()*, 
otherwise there is no difference between iterator cell_1 and cell_2 as far 
as I can tell ? 

Best,

Sylvain

El martes, 13 de julio de 2021 a la(s) 17:26:49 UTC+2, Wolfgang Bangerth 
escribió:

> On 7/13/21 4:02 AM, Sylvain Mathonnière wrote:
> > This sounds like what I need to do indeed. However, I cannot find a 
> function 
> > with such arguments in the help of *DoFHandler*. The closest I could 
> find is 
> > in *DoFAccessor*
> > 
> > *DoFAccessor (
> > const Triangulation< dim, spacedim > *  tria,
> > const int  level,
> > const int  index,
> > const DoFHandler< dim, spacedim > *  dof_handler  )*
> > 
> > Is this the one you were refering to ? but then I do not know how to 
> apply it 
> > to obtain an iterator "cell_2" on the 2nd cell.
>
> The call was this:
> DoFHandler::active_cell_iterator cell_2 (cell_1->get_triangulation(),
> cell_1->level(),
> cell_1->index(),
> cell_1->get_dof_handler());
>
> Note that it's the *iterator* type I'm using here. The class that's behind 
> this is TriaActiveIterator, which indeed has the constructor you need here.
>
> Best
> W>
>
> -- 
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: [email protected]
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/a0891ad8-260a-446e-b5a9-087224f6f1e4n%40googlegroups.com.

Reply via email to