On 2/2/19 12:32 AM, Praveen C wrote:
> Thank you for this tip. For my need, I only require the starting global index 
> on each partition since I am using local_element to do some operations like 
> multiplying by a local time step which is different for each cell. The 
> local_range function gave this info. Here is a sample usage in my code
> 
> for(; cell!=endc; ++cell)
> if(cell->is_locally_owned())
>        {
> constunsignedintcell_no = cell_number (cell);
> 
>           cell->get_dof_indices (dof_indices);
> for(unsignedinti=0; i<fe.dofs_per_cell; ++i)
>           {
> unsignedinti_loc = dof_indices[i] - local_range.first;
>              newton_update.local_element(i_loc) = dt(cell_no) *
>                                                   
> right_hand_side.local_element(i_loc) *
>                                                   inv_mass_matrix[cell_no][i];
>           }
>        }
> 
> If there is a possibility, I would like to request to retain this simple 
> function in the library.

No :-) The reason why it was scheduled for removal is that it only works in 
case the locally owned range is really just a single interval. But that's not 
always the case. For example, you may have reordered degrees of freedom in 
ways so that the locally owned elements form several ranges. The existing 
function can't express this, but the new one can.

If you just need the first element, use
   *vector.locally_owned_elements().begin()

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

Reply via email to