[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fixing values in a poisson eqn
- To: petsc-users@xxxxxxxxxxx
- Subject: Fixing values in a poisson eqn
- From: Ben Tay <zonexo@xxxxxxxxx>
- Date: Wed, 01 Aug 2007 23:16:28 +0800
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=N/+AWrzLj75xUnfeGgtXyPgVS2rYxhtrvVBsFMwIU38DTAhcOrno/9focxUrmhr4wKPHHZ9y4067OA/yhBfYT0Z2mEMFs0uNSjvZGCTkaEeZJ9gFyteRmsNuyQJLuxpePvk12E/qJCKkanQR+b58ZgZkYvUFFyxp14mq9ve2UIU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=mKFYYlimJKNvhqy8t1fVTJkmyk143suBhg52YfGn2dr2SQK0JQZf/KfMKlsKDH+gF5lv0lNgiSOy8tEE2AHBopyqWGMaKdVrkXOliIajFgo+M6EA34u13zcQPT5tPCp+4Kla1qDWd1AzWplRDHe3u5v7qPBIZlsReUEYNLq7LTk=
- Reply-to: petsc-users@xxxxxxxxxxx
- Sender: owner-petsc-users@xxxxxxxxxxx
- User-agent: Thunderbird 2.0.0.5 (Windows/20070716)
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