The user_index is a placeholder for you, the user, to store some data. By 
default, all user_indices are set to zero until you set a value with 
cell->set_user_index() 
<https://www.dealii.org/developer/doxygen/deal.II/classTriaAccessor.html#a05a980fd7ad40aeb25307b845cc8de41>
.

On Sunday, November 13, 2016 at 8:04:18 PM UTC+1, Sudarshan Kumar wrote:
>
> Thanks  a lot  Gupta,
>  
> It is right, working fine now.  However  I am wondering why  the 
> user_index()  is not giving the answer.
>
> On Sunday, November 13, 2016 at 3:16:05 PM UTC-3, Deepak Gupta wrote:
>>
>> Dear Sudharshan,
>>
>> Probably you are looking for cell->index(). Am I right?
>>
>> best
>> Deepak
>>
>> On Sun, Nov 13, 2016 at 7:03 PM, Sudarshan Kumar <[email protected]> 
>> wrote:
>>
>>>
>>> typename DoFHandler<dim>::active_cell_
>>> iterator
>>>       cell = dof_handler.begin_active(),
>>>       endc = dof_handler.end();
>>>
>>>    for (; cell!=endc; ++cell)
>>>    { std::cout<<cell->user_index()<<std::endl;
>>>   }
>>>
>>> it just  print only  zero.  i.e    user_index() actually not finding the 
>>> cell index.
>>>
>>> Help is appreciated.
>>>
>>> -- 
>>> 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].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to