<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">I want to do 3 steps of gauss seidel from a Mat A to another Mat B. Is there a way to do this?
<div><br>
</div>
<div>I mean, what I can think of is to get the column vectors of B by</div>
<div>
<p style="margin-right: 0px; margin-left: 0px; font-size: 14px; font-family: Menlo;">
ierr = MatGetColumnVector(B,v,col);CHKERRQ(ierr);</p>
<p style="margin-right: 0px; margin-left: 0px; font-size: 14px; font-family: Menlo;">
<br>
</p>
<div>and apply Gauss seidel from A to v:</div>
<div>
<p style="margin-right: 0px; margin-left: 0px; font-size: 14px; font-family: Menlo;">
ierr = MatSOR(A, v, <span style="color: #2934d5">1</span>, (SOR_FORWARD_SWEEP|SOR_ZERO_INITIAL_GUESS),
<span style="color: #2934d5">0</span>, <span style="color: #2934d5">3</span>, <span style="color: #2934d5">
0</span>, x);CHKERRQ(ierr);</p>
<p style="margin-right: 0px; margin-left: 0px; font-size: 14px; font-family: Menlo;">
<br>
</p>
<p style="margin-right: 0px; margin-left: 0px;">But then I have to form another matrix C whose columns are composed by v, and I'm not sure how to do that. </p>
<p style="margin-right: 0px; margin-left: 0px;"><br>
</p>
<p style="margin-right: 0px; margin-left: 0px;">Best,</p>
<p style="margin-right: 0px; margin-left: 0px;">Hui</p>
<p style="margin-right: 0px; margin-left: 0px;"><br>
</p>
</div>
</div>
</div>
</body>
</html>