[petsc-users] Neumann BC for interface elliptic problem

Marco Cisternino marco.cisternino at polito.it
Tue Sep 13 05:56:35 CDT 2011


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?
Thanks.

     Marco

-- 
Marco Cisternino
PhD Student
Politecnico di Torino
Email:marco.cisternino at polito.it



More information about the petsc-users mailing list