<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:verdana,helvetica,sans-serif;font-size:12pt"><div style="font-family: verdana,helvetica,sans-serif; font-size: 12pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><span style="font-style: italic;">You do not need another matrix to do lumping. Just give the mass matrix in</span><br style="font-style: italic;"><span style="font-style: italic;">both arguments, and then use</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;"> -pc_type jacobi -pc_jacobi_rowsum</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;"> Matt</span><br><br>Thank you Matt.<br>However, I want to do more than a row sum, which is perfectly fine for first order elements. For higher order elements, I have to use a special quadrature
rule to construct the lumped diagonal matrix.<br><br>With this in mind, could you please answer my two questions again? Thank you very much.<br><br>Shi<br><br><br>On Mon, Mar 31, 2008 at 4:04 PM, Shi Jin <<a ymailto="mailto:jinzishuai@yahoo.com" href="mailto:jinzishuai@yahoo.com">jinzishuai@yahoo.com</a>> wrote:<br>><br>> Hi there,<br>><br>> I am trying to solve a mass matrix linear system by KSPSolve. Right now, I<br>> am passing the mass matrix itself (let's call it M) to KSPSetOperators() as<br>> the Pmat argument. In order to speed up the convergence, I have constructed<br>> the lumped mass matrix (named lumpedM). For a linear finite element, this is<br>> simply a diagonal matrix with entries equal to the sum of the row on M. It<br>> is a common practice to replace M with lumpedM to have faster convergence<br>> without losing the order of accuracy.<br>><br>> What I want to do is to still solve the M matrix
but use lumpedM to<br>> precondition it. This way hopefully the number of iterations would be<br>> greatly reduced. In Petsc code, I tried<br>><br>> ierr = KSPSetOperators( solMP, M, lumpedM, SAME_PRECONDITIONER);<br>><br>> However, instead of giving faster convergence, it actually takes more<br>> iterations to convergence than the regular one. Therefore, I wonder if<br>> setting lumpedM as Pmat is the correct way to do it. Could you please<br>> advice? I think right now lumpedM is taken as the input to compute the<br>> preconditioning matrix, using whatever method is specified by -pc_type .<br>> What I really want to do is to simply set lumpedM as the precondition<br>> matrix, without spending time to compute anything.<br>> Thank you very much.<br>><br>> Shi<br>><br>><br>><br>><br>><br>> --<br>> Shi Jin, PhD<br>><br>><br>> ________________________________<br>>
Like movies? Here's a limited-time offer: Blockbuster Total Access for one<br>> month at no cost.<br><br><br><br>-- <br>What most experimenters take for granted before they begin their<br>experiments is infinitely more interesting than any results to which<br>their experiments lead.<br>-- Norbert Wiener<br><br></div><br></div></div><br>
<hr size=1><a href="http://us.rd.yahoo.com/evt=47519/*http://tc.deals.yahoo.com/tc/blockbuster/text1.com
">No Cost - Get a month of Blockbuster Total Access</a> now. Sweet deal for Yahoo! users and friends.</body></html>