<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18999"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=140484003-18012011><FONT size=2>See the 
emails in this thread "KSPLSQR convergence criterion" for</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140484003-18012011><FONT size=2>explicit 
calls for LSQR and some more info.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140484003-18012011><FONT size=2><A 
href="http://lists.mcs.anl.gov/pipermail/petsc-users/2010-August/thread.html#6784">http://lists.mcs.anl.gov/pipermail/petsc-users/2010-August/thread.html#6784</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=140484003-18012011><FONT 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=140484003-18012011><FONT 
size=2>Chetan</FONT></SPAN></DIV><BR>
<BLOCKQUOTE 
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
  <DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
  <HR tabIndex=-1>
  <FONT size=2><B>From:</B> petsc-users-bounces@mcs.anl.gov 
  [mailto:petsc-users-bounces@mcs.anl.gov] <B>On Behalf Of </B>Gaurish 
  Telang<BR><B>Sent:</B> Monday, January 17, 2011 01:16 AM<BR><B>To:</B> 
  petsc-users@mcs.anl.gov<BR><B>Subject:</B> [petsc-users] using KSPLSQR and 
  SKPCGNE<BR></FONT><BR></DIV>
  <DIV></DIV>Hi,<BR><BR>I am new to PETSc and I wanted to solve some least 
  squares problems with it. On searching the net I found that KSPLSQR() and 
  KSPCGNE() solve the least squares system |Ax-b|<BR><BR>But I don't really know 
  how to use these functions to get my answer. This manual page did not help: <A 
  href="http://www.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-current/docs/manualpages/KSP/KSPLSQR.html">http://www.mcs.anl.gov/petsc/petsc-2/snapshots/petsc-current/docs/manualpages/KSP/KSPLSQR.html</A><BR><BR>Apparently 
  no tutorial code uses these functions. <BR><BR>If anyone could could give a 
  small code snippet of how to use these functions (assuming A and b are given) 
  then it would be really helpful. 
<BR><BR>Thanks,<BR><BR>Gaurish<BR></BLOCKQUOTE></BODY></HTML>