<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Ranjeet, <br>
</p>
<p>the number of nonzeros in your stiffness matrix depends on the
problem and the discretization. I think it is used internally to
optimize the matrix routines. Do *not* underestimate this number,
as it could break the code. A too generous estimate will lead to
slower code. (@Experts: please correct me if i am wrong). <br>
</p>
<p>In tutorial 0 the Poisson equation is solved with P1 elements,
i.e., you have one degree of freedom on every vertex in your
triangulation. If you test the equation with the i-th test
function (assuming nice ordering this is the hat-function on
vertex i) you get nonzeros from every ansatz function j that
overlaps with the i-th function. That is, in row i you get a
nonzero for each vertex j that is connected to i with an edge and
for i itself. <br>
</p>
<p>So you have to have some additional information on the grid to
guess the number of nonzeros. In tutorial 0 someone decided that
in 2D they won't need triangular grids with more than 7 edges
connecting to a single vertex (1 << dim+1 = 2^dim+1 = 8). <br>
</p>
<p>In tutorial 5 a higher order method is used and so there is more
than one basis function per element. This is why the number of
non-zeros depends on the polynomial degree. Because I am not
familiar with the details of this tutorial (and refinement in
general) I can't tell you why they chose this estimate in
particular. <br>
</p>
<p>Cheers, <br>
</p>
<p>Gregor</p>
<p><br>
</p>
<div class="moz-cite-prefix">Am 23.07.19 um 07:03 schrieb Ranjeet
kumar:<br>
</div>
<blockquote type="cite"
cite="mid:CAHmP3ZJkZDFujUFdWofh4Z6_LBraD7RAqMu7VRcXMkGoJJG=wg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi,
<div>I am new to dune-pdelab and currently exploring the
tutorials. </div>
<div>It will be a great help if you could explain how the number
of nonzero per rows determined in the
initialization BCRSMatrixBackend? In tutorial 0, it is
initialized with the <b>(1<<dim+1)</b>, whereas in
tutorial 5 with the <b>pow(1+2*degree,dim)</b>? </div>
<div><br>
</div>
<div>Thank you,</div>
<div>Kind regards,</div>
<div>Ranjeet</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
dune-pdelab mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dune-pdelab@lists.dune-project.org">dune-pdelab@lists.dune-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.dune-project.org/mailman/listinfo/dune-pdelab">https://lists.dune-project.org/mailman/listinfo/dune-pdelab</a></pre>
</blockquote>
</body>
</html>