<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Dear PETSc users,</div><div class=""><br class=""></div><div class="">maybe this is an easy question, but I can’t find the information right away in the user’s guide nor online.</div><div class=""><br class=""></div><div class="">What I am currently doing and which works fine:</div><div class="">To solve a partial differential equation for the quantity q on a parallel distributed grid, which is represented by the Distributed Array MyDA, I am currently creating the associated sparse matrix for the KSP solver via</div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">DAGetMatrix(MyDA, MATMPIAIJ, &MyMatrix);</span></div></div><div class=""><br class=""></div><div class="">The solution vector and right hand side vector are created via</div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">DACreateGlobalVector(MyDA, &MyRightHandSideVector);</span></div></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">VecDuplicate(MyRightHandSideVector, &GlobalSolutionVector);</span></div></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><br class=""></div><div class="">The DA is constructed using <span style="font-family: Menlo; font-size: 11px; font-variant-ligatures: no-common-ligatures;" class="">DACreate3d()</span><span style="font-family: Menlo; font-size: 11px;" class=""> </span>with the corresponding regular structured grid information. </div><div class=""><br class=""></div><div class="">And here is my problem:</div><div class="">Now, I would like to solve a coupled system of equations for the quantities q1 and q2 on the same grid. I.e., the matrix should just get the double number of rows and columns, the vectors contain twice the number of entries (e.g. first all q1s and then all q2s). And I would like to be sure that the entries of q1 and q2, which are associated with the same grid cell are located on the same processor.</div><div class="">Is there already a pre-defined structures available (such as <span style="font-family: Menlo; font-size: 11px;" class="">MATMPIAIJ</span>) within PETSc to enlarge such a single equation to store the entries of coupled equations? Such as</div><div class=""><span style="font-family: Menlo; font-size: 11px;" class="">DACreateTwiceTheGlobalVector()</span>?</div><div class=""><br class=""></div><div class="">The equation is (simplified) of the form</div><div class="">d/dt q1 + grad q2 = 0</div><div class="">d/dt q2 + f(q1) = 0</div><div class="">with an arbitrary function f depending on q1.</div><div class=""><br class=""></div><div class="">Thanks a lot for your help in advance,</div><div class="">Rolf</div></body></html>