Re: [deal.II] Distribution of inhomogenous constraints for residual vector

55 views
Skip to first unread message

Wolfgang Bangerth

unread,
Apr 17, 2025, 12:35:38 PM4/17/25
to dea...@googlegroups.com
On 4/10/25 04:31, Balu sharma wrote:
> I am trying to separate system matrix assembly and residual vector assembly
> for solving a linear system of equation during a Newton-Raphson method,which
> should use an inhomogenous constraint. I am using AffineConstraints class from
> dealii. But based on the documentation and my trials, there is no way to apply
> inhomogenous constraints on the residual vector without already having an
> assembled stiffness matrix. The distribute_local_to_global() function only
> using residual vectors applies homogenous constraints by default.
>
> Does anyone know of a solution to this? Thanks in advance.

Take a look at step-77, which has the same premise as what you want to do.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/


Balu sharma

unread,
Apr 18, 2025, 6:47:15 AM4/18/25
to deal.II User Group
Thank you for the reply. My code is MPI parallelised, how can I use the condense() function with ghost values mentioned in the AffineConstraints class?

With regards
Subramania Sharma

Wolfgang Bangerth

unread,
Apr 21, 2025, 11:27:02 AM4/21/25
to dea...@googlegroups.com
On 4/18/25 04:47, Balu sharma wrote:
> **
>
> Thank you for the reply. My code is MPI parallelised, how can I use the
> condense() function with ghost values mentioned in the AffineConstraints class?

You can't. You need to apply constraints during the assembly of the linear
system if you work with parallel linear systems. I think you probably want to
look at step-86 as well.
Reply all
Reply to author
Forward
0 new messages