<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>I got one issue with MatMult method that I do not understand.</p>
<p>Whenever I multiply Matrix A by vector b (as shown below), the
printed result</p>
<p>show a value with an exponent that is far away form the expected
result. So I did the same</p>
<p>Matrix-vector product in python and get the expected answer
(shown below).</p>
<p>Can someone please explain what is going on, cause I need the
exact results in order to compute the norm.</p>
<p><br>
</p>
<p>Thanks<br>
</p>
<p><br>
</p>
<p><b>Matrix A</b><br>
</p>
<p>Mat Object: 1 MPI processes<br>
type: seqaij<br>
row 0: (0, 4.) (1, -1.) (4, -1.) <br>
row 1: (0, -1.) (1, 4.) (2, -1.) (5, -1.) <br>
row 2: (1, -1.) (2, 4.) (3, -1.) (6, -1.) <br>
row 3: (2, -1.) (3, 4.) (7, -1.) <br>
row 4: (0, -1.) (4, 4.) (5, -1.) (8, -1.) <br>
row 5: (1, -1.) (4, -1.) (5, 4.) (6, -1.) (9, -1.) <br>
row 6: (2, -1.) (5, -1.) (6, 4.) (7, -1.) (10, -1.) <br>
row 7: (3, -1.) (6, -1.) (7, 4.) (11, -1.) <br>
</p>
<p><br>
</p>
<p><b>Vector b</b></p>
<p><br>
Vec Object: 1 MPI processes<br>
type: seq<br>
0.998617<br>
0.997763<br>
0.997763<br>
0.998617<br>
0.996705<br>
0.994672<br>
0.994672<br>
0.996705<br>
0.993529<br>
0.989549<br>
0.989549<br>
0.993529<br>
0.997285<br>
0.995611<br>
0.995611<br>
0.997285<br>
</p>
<p><br>
</p>
<p><b>PETSc Results with : MatMult (A,x,
some_vector_to_store_the_result)</b></p>
<p>Vec Object: 1 MPI processes<br>
type: seq<br>
2.<br>
1.<br>
1.<br>
2.<br>
1.<br>
0.<br>
<b>1.11022e-16</b><br>
1.</p>
<p><br>
</p>
<p><br>
</p>
<p><b>Python result:</b></p>
<p><span style="color: rgb(213, 213, 213); font-family: monospace; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(56, 56, 56); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">[ 2. 0.999999 0.999999 2. 0.990577 -0.015165 -0.015165 0.990577]</span></p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
</body>
</html>