Hi Gabriel,

I believe that you are still using the standard deal.II SparseMatrix class; 
is this correct? If so, this class won't work with fully distributed 
calculations. You will need to use either the Trilinos or PETSc wrappers 
since not all information is available on the local processor with the 
default SparseMatrix class.

Either way: I believe the error message you encountered is a result of a 
bug in deal.II. I don't think that the routine 
GridTools::get_finest_common_cells(), which is called by that particular 
make_sparsity_pattern variant, works with distributed triangulations. If 
you want to use distributed triangulations you will need to set up the 
coupled sparsity pattern in a different way.

If you want to parallelize step-35, it may be better to start by looking at 
step-32, which shows how to implement the Stokes equations (coupled to a 
Boussinesq equation) in a fully distributed setting. I believe they set up 
the coupling of the matrix with velocity and pressure blocks in a different 
way that should work for you.

Does this make sense?

Thanks,
David Wells



On Sunday, February 17, 2019 at 4:29:06 PM UTC-5, gabriel...@koeln.de wrote:
>
> Hey everybody, 
> I have a problem with initializing a Sparsematrix in a parallel program.
>  am using a parallel::distributed::triangulaton (as in the Step40 
> tutorial) on 
> the Navier Stokes Projection solver from the step35 tutorial.
> The problem arises in the function 
>
> NavierStokesProjection<dim>::initialize_gradient_operator()
> {
> {
> DynamicSparsityPattern 
> <https://www.dealii.org/current/doxygen/deal.II/classDynamicSparsityPattern.html>
>  
> dsp(dof_handler_velocity.n_dofs(), dof_handler_pressure.n_dofs());
> DoFTools::make_sparsity_pattern 
> <https://www.dealii.org/current/doxygen/deal.II/group__constraints.html#ga38d88a1a559e9fc65d60f3e168921ba5>
>  
> (dof_handler_velocity, dof_handler_pressure, dsp);
> sparsity_pattern_pres_vel.copy_from (dsp);
> }
>
> where I have to use two different FE-spaces, one for the pressure and one 
> for the velocity.
> To perform this in parallel I used the following code (according to the 
> sparsematrices in step40)
>
> {
> DynamicSparsityPattern 
> dsp(locally_relevant_dofs_vel.size(),locally_relevant_dofs_pres.size());
> DoFTools::make_sparsity_pattern (dof_handler_velocity, 
> dof_handler_pressure, dsp); 
> sparsity_pattern_pres_vel.copy_from (dsp);
> }
>
> This code compilates fine, but when Running it with MPI, it stops in the 
> "make_sparsity_pattern" line with the error code
> "this->is_artificial() == false
> Additional information:
> Cant asks for Dofs on articial cells."
>
> Does somebody know how I can fix this? 
>
> My last try was to use the Indexsets instead of their size, when declaring 
> dsp.
> But unfortunately DynamicSparsityPattern can only take on IndexSet.
>
>
> Thanks a lot
>
> Gabriel
>
>
>
>
>

-- 
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