[petsc-users] Neumann BC for interface elliptic problem
Matthew Knepley
knepley at gmail.com
Tue Sep 13 06:39:31 CDT 2011
On Tue, Sep 13, 2011 at 5:56 AM, Marco Cisternino <
marco.cisternino at polito.it> wrote:
> Hi to everybody,
> I'm trying to solve this equation
> nabla(k*nabla(u))=f,
> with neumann homogeneous boundary conditions, where k is piecewise
> constant and f is a zero mean source (compatibility is respected).
> To do this I solve an extended by transmission conditions linear system,
> obtained with FD second order scheme.
> Everything works fine with dirichlet bc and with neumann bc too, if the
> interface, where k jumps, cut the computational domain.
> But if the interface is in the middle of the computational domain,
> something wrong happens where the processes overlap, with an overall loss of
> symmetry: the source, the interface and the bc are symmetric.
> I use gmres with asm. These are the lines to create the nullspace
>
> has_cnst=PETSC_TRUE
> call MatNullSpaceCreate(MPI_CART_**COMM,has_cnst,0,PETSC_NULL_**
> OBJECT,nsppoi,ierr)
> call KSPSetNullSpace(ksppoi,nsppoi,**ierr)
>
> Ask me everything you need to better understand the problem.
> Could you help me?
>
If you have matrices, or submatrices, which must be symmetric, you can check
this using
http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatIsSymmetric.html
Thanks,
Matt
> Thanks.
>
> Marco
>
> --
> Marco Cisternino
> PhD Student
> Politecnico di Torino
> Email:marco.cisternino at polito.**it <Email%3Amarco.cisternino at polito.it>
>
>
--
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110913/8054b03f/attachment.htm>
More information about the petsc-users
mailing list