[petsc-users] nonzero prescribed boundary condition

Tian(ICT) rongtian at ncic.ac.cn
Mon May 9 21:19:45 CDT 2011


I forgot to add that when I switched back to force loading, everything works 
well and the SNES solver converges.

----- Original Message ----- 
From: "Tian(ICT)" <rongtian at ncic.ac.cn>
To: "PETSc users list" <petsc-users at mcs.anl.gov>
Sent: Tuesday, May 10, 2011 10:15 AM
Subject: Re: [petsc-users] nonzero prescribed boundary condition


> Dear Barry, Thanks a lot for quick answering.
> I checked the development documents and found the new version of 
> MatZeroRows() does support the nonzero prescribed boundary conditions.
>
> I followed up with more details.
> I am using Petasc 2.3.3. to solve a nonlinear problem, e.g. using SNES 
> solvers.
> I used a displacement-controlled load (as this type of loading works well 
> for all cases).
> This is the reason the nonzero prescribed boundary came up.
>
> In FormJacobian, I modified Jacobian and residual to satisfy the nonzero 
> prescribed boundary.
> In FormFunction, I modified the solution to the known solution(this should 
> not be necessary as the modified Jacobian and rhs should give the 
> prescribed solution also)
>
> Now I found another issue, no matter if I prescried the solution or not in 
> FormFunction,
> SNES solver always call FormFunction and never call FormJacobian.
> Of course the solver finally diverged or converged to a zero solution.
>
> So my quick follow up question is How a displacement-controled load is 
> done corrently in Petsc 2.3.3?
>
> Rong
>
> ----- Original Message ----- 
> From: "Barry Smith" <bsmith at mcs.anl.gov>
> To: "PETSc users list" <petsc-users at mcs.anl.gov>
> Sent: Tuesday, May 10, 2011 9:31 AM
> Subject: Re: [petsc-users] nonzero prescribed boundary condition
>
>
>
>   In petsc-dev http://www.mcs.anl.gov/petsc/petsc-as/developers/index.html 
> we have modified the calling sequence for MatZeroRows() so that it can 
> automatically adjust the appropriate right hand side values for the zeroed 
> rows to support zero or non-zero prescribed boundary conditions easily.
>
>    Barry
>
> On May 9, 2011, at 8:18 PM, Tian(ICT) wrote:
>
>> Dear all,
>>
>> I got this question long ago and searched the prior posting but did not 
>> find the solution.
>> The question is about nonzero prescribed boundary condition.
>> My understanding is that MatZeroRows() works only for zero prescribed 
>> value, not non-zero value.
>> For the non-zero values, we have to remove the rows associated with the 
>> boundary, but this
>> will lead to a zero dignal and accordingly the rows in r.h.s should also 
>> be removed.
>> My question is that does MatZeroRows() also works for nonzero prescribed 
>> boundary and if so how to do it simply?
>>
>> Rong
>
>
> 



More information about the petsc-users mailing list