Changing code from dealii 9.0.1 to 9.2.0 : some issues with Constriant Matrix

59 views
Skip to first unread message

Aditya Pratap Singh

unread,
Nov 8, 2021, 4:32:43 PM11/8/21
to deal.II User Group
Hi,

I was trying to change my code written with dealii 9.0.1 to make it work with dealii 9.2.0 where I am facing some problem.

One small issue which I noticed is the way how dealii constructs the Constraint Matrix has probably changed. In order to illustrate this thing, I have prepared an example (code along with input attached to the mail for reference ) where I read a triangulation, Mark PBC Boundary IDs, add periodicity, mark periodic faces and then print the constraint matrix info.

For code if compiled with dealii 9.0.1. the output is :

Periodic Constraints info:
    0 8:  1
    1 9:  1
    4 10:  1
    5 11:  1
    12 16:  1
    13 17:  1

Periodic Constraints info:
    0 12:  1
    1 13:  1
    2 14:  1
    3 15:  1
    8 16:  1
    9 17:  1

whereas same code compiled with dealii 9.2.0 and ran with same example gave the following output:

Periodic Constraints info:
    8 0:  1
    9 1:  1
    10 4:  1
    11 5:  1
    16 12:  1
    17 13:  1

Periodic Constraints info:
    12 0:  1
    13 1:  1
    14 2:  1
    15 3:  1
    16 8:  1
    17 9:  1

The order in which Periodic info is received for plus and and minus faces has reversed, May I know if this behavior was desired or is just a bug ?

Looking forward to some response.

Regards,
Aditya  
example-code.cc
2D-testmodel.inp

Wolfgang Bangerth

unread,
Nov 8, 2021, 5:06:58 PM11/8/21
to dea...@googlegroups.com
Aditya:
The end result of the two should be the same, right? I don't know
whether anyone remembers what specific patch changed this, but unless
you have concrete reasons to believe that one way is correct and the
other is wrong, it seems to me that it doesn't matter which way around
constraints are built.

Or maybe I don't quite understand why you worry about the change?

Best
W.

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

Aditya Pratap Singh

unread,
Nov 22, 2021, 10:15:42 AM11/22/21
to deal.II User Group
Hi,

Sorry for the late reply but I was trying to work around my problem. 

As you mentioned, it may not generally matter how the constraint matrix is built but I have been working on a problem that involves Periodic Boundary conditions with inhomogeneity. So, here it becomes important for me to declare slave and master correctly. As I am unable to find the origin of why the order got reversed for the same problem but different version of dealii, I am unable to solve the problem using my code (which was otherwise working correctly for the earlier version of dealii). 

Looking forward to some help.

Kind Regards,
Aditya

Wolfgang Bangerth

unread,
Nov 22, 2021, 10:56:57 PM11/22/21
to dea...@googlegroups.com
On 11/22/21 8:15 AM, Aditya Pratap Singh wrote:
>
> As you mentioned, it may not generally matter how the constraint matrix is
> built but I have been working on a problem that involves Periodic Boundary
> conditions with inhomogeneity. So, here it becomes important for me to declare
> slave and master correctly. As I am unable to find the origin of why the order
> got reversed for the same problem but different version of dealii, I am unable
> to solve the problem using my code (which was otherwise working correctly for
> the earlier version of dealii).

Aditya,
it would probably help to understand what specific patch broke your code. Do
you know how to bisect a git history?

Best
W>
Reply all
Reply to author
Forward
0 new messages