Hello,
I have downloaded and installed 8.5.1 version of dealii library
using candi. I needed to use calls of
And
void DoFTools::extract_locally_relevant_dofs |
( |
const DoFHandlerType & |
dof_handler, |
|
|
IndexSet & |
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,
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