Hi. Thanks a lot for the advice.
I will Try it tomorrow and send a response whether it works.

Regards

Gabriel




Gabriel Peters
Endenicher Str. 310
53121 Bonn
00491525/5478185
gabriel.pet...@koeln.de

Am 26.03.19 um 13:32 schrieb Daniel Arndt

> Gabriel,
>
>
> > I am trying to apply boundary conditions on a Sparsematrix with two
> > Dof_handlers in a parallel::distributed::trinagulation setting for the
> > Step-35 tutorial.
> > ( Same context as in this thread
> > https://groups.google.com/forum/#!topic/dealii/9ibgrQ0mFBs).
> >
> > At initializing the gradient_operator, I have an object with two
> > Dof_Handlers, which I use for a sparsity pattern.
> >
> > DoFTools::make_sparsity_pattern
> > (dof_handler_velocity,dof_handler_pressure,dsp);
> >
> > But when I apply boundary values to a PETSCWrapper::SparseMatrix using
> > this sparsity pattern I get the following error
> > at the function MatrixTools::apply_boundary_values"
> >
> >                       The violated condition was: !has_ghost_elements()
> >
>
> This issue does not come unexpected if you don't tell
> DoFTools::make_sparsity_pattern about the constraints you wan't to use.  :-)
>
>
> >
> > I tried another way to apply the boundary conditions with the use of a
> > COnstraintMatrix as in the Step-40 tutorial. But in that case the
> > make_sparsity_pattern function doesn't work, when I use the commandd:
> >
> > DoFTools::make_sparsity_pattern
> > (dof_handler_velocity,dof_handler_pressure,dsp,constraints_velocity,false);
> >
> > (There I get the error "candidate expects 3 arguments, 5 provided).
> >
>
> A function taking two DoFHandle objects and an AffineConstraints (resp.
> ConstraintMatrix) object is simply not yet implemented.
> It should not be terribly difficult to do that, though. You could
> essentially just give the overload of DoFTools::make_sparsity_pattern
> you are looking at
> (https://github.com/dealii/dealii/blob/master/source/dofs/dof_tools_sparsity.cc#L212-L350)
>
> some more (defaulted) parameters and replace sparsity.add_entries(...) with
> constraints.add_entries_local_to_global(...).
>
> Do you want to give it a shot? We would happily take such a contribution!
> Feel free to ask if you have any questions, but
> https://github.com/dealii/dealii/wiki/Contributing should give a good
> overview.
>
> Best,
> Daniel
>
> --
> 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.

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