Hey, I just worked through the make_sparsity_pattern code.
I think I know how to fix the mentioned problem. But I dont understand the
how to use the "bool_dof_mask" in the correct way. It is used in he constraints.add_entries_local_to_global(...)
function.
In the make_sparsity_pattern function with a single dof_handler and a constraintmatrix, it is constructed by a fe_collection.
But I don't see how to construct the bool_dof_mask with 2 dof_handlers and respectively 2 fe_collections.
Do you have a clue?
 
Best
Gabriel
Gesendet: Dienstag, 26. März 2019 um 13:32 Uhr
Von: "Daniel Arndt" <daniel.ar...@iwr.uni-heidelberg.de>
An: "deal.II User Group" <dealii@googlegroups.com>
Betreff: [deal.II] Re: Applying boundary values in parll::distr:triang setting for two dof_handler Sparsematrux
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.
 
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
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
 
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.

Reply via email to