<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 11 Mar 2021, at 2:48 PM, Mathieu Dutour <<a href="mailto:mathieu.dutour@gmail.com" class="">mathieu.dutour@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class="">On Thu, 11 Mar 2021 at 13:52, Mark Adams <<a href="mailto:mfadams@lbl.gov" class="">mfadams@lbl.gov</a>> wrote:<br class=""></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class="">Mathieu, <div class="">We have "FieldSplit" support for fields, but I don't know if it has ever been pushed to 1000's of fields so it might fall down. It might work.</div><div class="">FieldSplit lets you manipulate the ordering, say field major (j) or node major (i).</div></div></blockquote><div class="">I just looked at it and FieldSplit appears to be used in preconditioner so not exactly relevant.</div><div class=""><br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr" class=""><div class="">What was unsatisfactory?</div><div class="">It sounds like you made a rectangular matrix A(1000,3e5) . Is that correct?</div></div></blockquote><div class="">That is incorrect. The matrix is of size (N, N) with N = 1000 * 3e^5. It is a square</div><div class="">matrix coming from an implicit scheme.</div><div class=""><br class=""></div><div class="">Since the other answer appears to have the same misunderstanding, let me try</div><div class="">to re-explain my point:</div><div class="">--- In many contexts we need a partial differential equation that is not scalar.</div><div class="">For example, the shallow water equation has b = 3 fields: H, HU, HV. There are other</div><div class="">examples like wave modelling where we have something like b = 1000 fields (in a</div><div class="">discretization).</div></div></div></div></blockquote><div><br class=""></div><div>I think what you want is MatBAIJ (<a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateBAIJ.html" class="">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateBAIJ.html</a>) with bs = 1000, but just like Matt and Mark, I’m not quite sure I understand your notations from below 100%.</div><div><br class=""></div><div>Thanks,</div><div>Pierre</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class="">--- So, if we work with say an unstructured grid with N nodes then the total number</div><div class="">of variables of the system will be N_tot = 3N or N_tot = 1000N.</div><div class=""><br class=""></div><div class="">The linear system has N_tot unknowns and N_tot equations. The entries </div><div class="">can be written as idx = (i , j) with 1 <= i <= b and 1 <= j <= N.</div><div class=""><br class=""></div><div class="">Thus the non-zero entries in the matrix will be of two kinds:</div><div class="">--- (idx1, idx2) with idx1 = (i , j) and idx2 = (i' , j) , 1 <= i, i' <= b and 1 <= j <= N.</div><div class="">Together those define a block in the matrix.</div><div class=""><br class=""></div><div class="">--- (idx1, idx2) with idx1 = (i , j) and idx2 = (i, j'), 1<= i <= b and 1<= j, j' <= N.</div><div class="">For each unknown idx1, there will be about 6 unknowns idx2 of this form.</div><div class=""><br class=""></div><div class="">Otherwise, the block matrices do not have the same coefficients, so a tensor</div><div class="">product approach does not appear to be workable.</div><div class=""><br class=""></div><div class=""> Mathieu</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
</blockquote></div>
</blockquote></div></div>
</div></blockquote></div><br class=""></body></html>