Branch sharedtria

it is work in progress. In a nutshell, the idea is to wrap shared triangulation into another class and encapsulate all renumbering and distribution of DoFs for the parallel case. So that to the user it behaves similar to the distributed triangulation class. The only exception being that there are no artificial cells (only locally owned and ghost). 

The main modifications are related to policies distribute_dofs and renumber_dofs. 
The ugly thing is that the new NumberCache is returned, whereas the current one 
is provided as a non-const reference to be updated within policy's methods. 
That's because we call DoFRenumbering functions from within the policy class.
I tried to use only NumberCache provided via reference, but there were some issues with the current code in parallel triangulation.

Another family of issues are related to renumbering routines. So far, the same code as in distributed case is used and inside the policy new numbers are gathered among processors. Then sequential renumbering is called and finally NumberCache-related things are updated.

Step 18 was updated to use the class. 

On 10/30/2014 07:50 AM, Denis wrote:
> In include/deal.II/grid/tria_accessor.templates.h:
>
>> @@ -2984,6 +2990,13 @@ bool
>>  CellAccessor<dim,spacedim>::is_locally_owned () const
>>  {
>>    Assert (this->active(), ExcMessage("is_locally_owned() only works on active cells!"));
>> +
>> +  const parallel::shared::Triangulation<dim,spacedim> *pst
>> +    = dynamic_cast<const parallel::shared::Triangulation<dim,spacedim> *>(this->tria);
>> +
>> +  if (pst != 0)
>> +    return (this->subdomain_id() == pst->locally_owned_subdomain());
>> +
>>  #ifndef DEAL_II_WITH_P4EST
>>    return true;
>>  #else
>
> alternatively, one could change it by using both DEAL_II_WITH_P4EST and
> DEAL_II_WITH_MPI, and return true in no-mpi case. What do you think?

Sure, but if you already introduce an intermediate class for all of the 
parallel triangulation, might as well use it and not care whether it's a 
parallel::distributed or parallel::shared Triangulation -- they both 
have the member function you're using here.


-- 
------------------------------------------------------------------------
Wolfgang Bangerth               email:            bangerth@math.tamu.edu
                                 www: http://www.math.tamu.edu/~bangerth/