<div dir="ltr">Mike<div><br></div><div>as long as P is a sparse matrix with compatible rows and cols (i.e. rows(P)= cols(A) = rows (A)) , MatPtAP will compute the result. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno lun 31 mag 2021 alle ore 16:52 Mark Adams <<a href="mailto:mfadams@lbl.gov">mfadams@lbl.gov</a>> ha scritto:<br></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"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 31, 2021 at 9:20 AM Michael Wick <<a href="mailto:michael.wick.1980@gmail.com" target="_blank">michael.wick.1980@gmail.com</a>> wrote:<br></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">Hi PETSc team:<div><br></div><div>I am considering implementing a skew roller boundary condition for my elasticity problem. The method is based on this journal paper: <a href="http://inside.mines.edu/~vgriffit/pubs/All_J_Pubs/18.pdf" target="_blank">http://inside.mines.edu/~vgriffit/pubs/All_J_Pubs/18.pdf</a></div><div><br></div><div>Or you may find the method in the attached Bathe's slides, pages 9 -10.</div><div><br></div><div>Roughly speaking, a (very) sparse matrix T will be created which takes the shape [ I, O; O, R], where R is a 3x3 rotation matrix. And the original linear problem K U = F will be modified into (T^t K T) (T^t U) = T^t F. In doing so, one can enforce a roller boundary condition on a slanted surface.</div><div><br></div><div>I think it can be an easy option if I can generate the T matrix and do two matrix multiplications to get T^t K T. I noticed that there is a MatPtAP function. Yet, after reading a previous discussion, it seems that this function is not designed for this purposes (<a href="https://lists.mcs.anl.gov/pipermail/petsc-users/2018-June/035477.html" target="_blank">https://lists.mcs.anl.gov/pipermail/petsc-users/2018-June/035477.html</a>).</div></div></blockquote><div><br></div><div>Yes, and no. It is motivated and optimized for a Galerkin coarse grid operator for AMG solvers, but it is a projection and it should be fine. If not, we will fix it.</div><div><br></div><div>We try to test our methods of "empty" operators , but I don't know if MatPtAP has ever been tested for super sparse P. Give it a shot and see what happens.</div><div><br></div><div>Mark</div><div> </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"><div><br></div><div>I assume I can only call MatMatMult & MatTransposeMatMult to do this job, correct? Is there any existingly PETSc function to do T^t K T in one call?</div><div><br></div><div>Thanks,</div><div><br></div><div>Mike</div><div><br></div></div>
</blockquote></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Stefano</div>