Hi,

On Friday, December 15, 2017 at 11:14:24 PM UTC+1, Marek Čapek wrote:
>
> Hello,
> I have downloaded and installed 8.5.1 version of dealii library
> using candi. I needed to use calls of
>
> const IndexSet 
> <https://www.dealii.org/8.4.0/doxygen/deal.II/classIndexSet.html>& 
> DoFHandler 
> <https://www.dealii.org/8.4.0/doxygen/deal.II/classDoFHandler.html>< dim, 
> spacedim >::locally_owned_dofs ( 
> ) const
>
>
> And
>
> void DoFTools::extract_locally_relevant_dofs ( const DoFHandlerType &  
> *dof_handler*, 
>
>
> IndexSet <https://www.dealii.org/8.4.0/doxygen/deal.II/classIndexSet.html> 
> &  *dof_set*  
>
> ) 
>
>
>
>
>
> For setting up of ghosted vectors.
> May be I understand wrongly some design concepts, however it appears to me,
> that these functions do not work correctly.
> Namely, they both return IndexSet with size of the "complete universum" of 
> dofs,
>

You need to check documentation of IndexSet 
class https://www.dealii.org/developer/doxygen/deal.II/classIndexSet.html 
which is designed to represent a subset of the [0, size)
So both represent the subsets of the same set of all DoFs in your problem 
and their size() is the same,
however n_elements() will be different.

Cheers,
Denis.
 

> i.e. the indexsets are not distributed.
>
> My code is rather complicated, so I have prepared slight modification of 
> step-40,
> where the following printout shows the misbehaviour:
>
>
> pcout<<"--------------------------------------------this works 
>> correctly-------------"<<std::endl;
>>       std::vector<types::global_dof_index> n_dofs_per_core = 
>> dof_handler.n_locally_owned_dofs_per_processor    ();
>>
>>     for(std::vector<types::global_dof_index>::iterator 
>> it=n_dofs_per_core.begin();it!=n_dofs_per_core.end();++it)
>>        pcout<<"size of dofs per core according to 
>> dof_handler.n_locally_owned_dofs_per_processor() "<<*it<<std::endl;
>>
>>
>>     pcout<<"--------------------------------------------this is 
>> strange-------------"<<std::endl;
>>
>>      std::vector<IndexSet>   dof_per_core = 
>> dof_handler.locally_owned_dofs_per_processor();
>>
>>     for( std::vector<IndexSet>::iterator 
>> it=dof_per_core.begin();it!=dof_per_core.end();++it)
>>            pcout<<"size of dofs pers core according to 
>> dof_handler.locally_owned_dofs_per_processor()  "<<(*it).size()<<std::endl;
>>     
>> pcout<<"-------------------------------------------AND-------------"<<std::endl;
>>     std::cout<<"number of  locally owned dofs  
>> "<<locally_owned_dofs.size()<<std::endl;
>>         std::cout<<"number of locally relevant dofs  
>> "<<locally_relevant_dofs.size()<<std::endl;
>>
>
>
>
> It appears to me, that the data structure with Dofs in in inconsistent 
> state. I have tried both Trilinos and
> Petsc backends.
> I am adding the complete modified step-40 to the attachment.
> Please take a look at it, or maybe correct my opinion.
>
> Thank You
>
> Marek C
>
>
>
>

-- 
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 dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to