<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi<div>I have a huge matrix U for all processors (PETSC_COMM_WORLD). I only want to copy only two rows (i,j) for each local processor. i,j is different for each processor and not related to rank. &nbsp;I was trying to use a vector filter (like, 00000010000). However, if the vector is&nbsp;PETSC_COMM_WORLD, it will be changed by different processor. So, how to make it ?<span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "></span></div><div>Thank you</div><div><br></div><div>My original code is&nbsp;</div><div><br></div><div>Vec
 filter</div><div>VecCreate(PETSC_COMM_WORLD,&amp;filter);</div><div>VecSetsizes(filter,PETSC_DECIDE,m);</div><div>VecSetFromOptions(filter);</div><div><br></div><div>Vecset(filter,0);</div><div>VecSetValue(filter,i,1,INSERT_VALUES);</div><div><br></div><div>...</div><div>MatMult(U, filter,ui);</div><div><br></div><div>If I create filter with&nbsp;PETSC_COMM_SELF, it is impossible for U and filter to multiply.</div><div><br></div><div><br></div><div><br></div><div><br></div></td></tr></table><br>


      <hr size=1><a href="http://cn.rd.yahoo.com/mail_cn/tagline/card/*http://card.mail.cn.yahoo.com/">  好玩贺卡等你发,邮箱贺卡全新上线!</a>