Fixing values in a poisson eqn
Ben Tay
zonexo at gmail.com
Wed Aug 1 10:16:28 CDT 2007
Hi,
I am trying to solve a pressure poisson eqn resulting from the NS eqn.
How can I fixed the pressure at some nodes while solving the poisson eqn?
I tried to make the coefficient of the diagonal location of the node
very big e.g. 1e100. I also use
call KSPSetInitialGuessNonzero(ksp,PETSC_TRUE,ierr)
and insert the original values as initial solution:
do i=1,blk(1)%size_x
do j=1,blk(1)%size_y
call VecSetValue(xx,k,blk(1)%p(i,j),INSERT_VALUES,ierr)
k=k+1
end do
end do
in my code. However, after solving the eqn, the value I got is 1e-16 or
0. So what have I done wrong?
Thanks
More information about the petsc-users
mailing list