[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to zero all values on a particular row?
- To: petsc-users@xxxxxxxxxxx
- Subject: How to zero all values on a particular row?
- From: "Ben Tay" <zonexo@xxxxxxxxx>
- Date: Sun, 10 Jun 2007 22:13:04 +0800
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=T/TOsjNn2vc9Lw+4+LPPlohgfJqAo/e6G45Y1PjrLQxyNuAnozHP/OCIrxRO5D1rqWt2yQ6eFia0lm6iFxYMRxSl9FIiK7oIXrpD6qvSoxc/3EdCnQSp5vZ2BkhO8eCrdKBLq8Wky7TKP3maH0/yFUvS9cZbEjDxg7BchXkDmDE=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=Rj9T6OPMIiEE7VQwvcDQYZcZdXump3fuKhZp3EDynIDE9mz21eAfKzBerwRG3Ds5moXFe/mHHRfBK0/zF7wvMnU5/Nex4OutGLycbjZ260ltOQ1GzpwWL/vHxDjBoo+UP/uY5Boypl0+T+d5fnQfVE7ZEJhJAUtdzlmFQzUrRk0=
- Reply-to: petsc-users@xxxxxxxxxxx
- Sender: owner-petsc-users@xxxxxxxxxxx
Hi,
I need to insert values into a matrix and then solve this poisson eqn as part of my cfd code. For efficiency sake, I simply use
"do j=1,size_y
do i=1,size_x
matsetvalue ....
end do
end do"
to insert values into all the cells
Then for specific cells, I need to enter some other values. In other words, for specific rows of the matrix, I need to zero the whole row and insert new values. How can I do that?
I tried to use MatZeroRows but it says it's not for unassembled matrix. But I need to zero the particular row, insert values, and then finally assembly it. Is there a command to do this?
Thanks