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()
{
{
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