[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fixing values in a poisson eqn
- To: petsc-users@xxxxxxxxxxx
- Subject: Re: Fixing values in a poisson eqn
- From: "Matthew Knepley" <knepley@xxxxxxxxx>
- Date: Wed, 1 Aug 2007 10:28:41 -0500
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gbcErfs94ypvpnZb/ojnA33LrSDeS1JsO2IFq3nGYXBqrbG+kZpgzTDAmxqIDeR0NgLa0WGSciUedCqh0kYchGnhapCPQtnpPKaQ1oyc54eH2RdmrOkBkpQdlEwhqGtS3vHVK+4yw/KEl8rFqYd6ivb45jQHyjB9XEiB6HvXqe4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=X/CVaTnHekMY5KQG7cb7F4yfYACO5ZapUvVDm1iKY3gjP/xHITid/cHBGs1BD8+/yKvVWlWkEtOuRnwEekzFw9nfEIypMlTDbyq5eNiZDesAL8kzyoc1L6UNe0OeD2eaK/1bHzVVoNspK8lMjhST4SKz0JtwPpBVwaDA9XzYzoU=
- In-reply-to: <46B0A3CC.9050806@gmail.com>
- References: <46B0A3CC.9050806@gmail.com>
- Reply-to: petsc-users@xxxxxxxxxxx
- Sender: owner-petsc-users@xxxxxxxxxxx
On 8/1/07, Ben Tay <zonexo@xxxxxxxxx> wrote:
> 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
When you form the Jacobian, the row associated with the unknown should
be the identity (not a big number as above).
> call KSPSetInitialGuessNonzero(ksp,PETSC_TRUE,ierr)
Should not matter.
> 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
You want the boundary value on the rhs, not the solution.
> in my code. However, after solving the eqn, the value I got is 1e-16 or
> 0. So what have I done wrong?
I would look at an example, like SNES ex5.
Matt
> Thanks
>
>
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener