Re: [Libmesh-users] PetscVector

2011-12-28 Thread Roy Stogner
On Wed, 28 Dec 2011, Ataollah Mesgarnejad wrote: I think this is the case since when  I run my program with current version of Libmesh it shows that I'm trying to access a non-local/ghosted dof: No index 11 in ghosted vector. Vector contains [45,81) And empty ghost array.  <- ( What is this ?

Re: [Libmesh-users] PetscVector

2011-12-28 Thread Roy Stogner
On Wed, 28 Dec 2011, Roy Stogner wrote: > Trying to swap two vectors that have different types (ghosted vs > parallel vs serial) or that are ghosted in different ways would be my > guess. IIRC PetscVector::swap() is pretty low-level; we don't try to > regenerate or enforce the consistency of any

Re: [Libmesh-users] PetscVector

2011-12-28 Thread Roy Stogner
On Wed, 28 Dec 2011, Ataollah Mesgarnejad wrote: > I am initializing a PetscVector from a Vec ( PetscVector > x_vector(x) ). Then I follow what I saw in your implementation of SNES > solver ( > http://libmesh.sourceforge.net/doxygen/petsc__nonlinear__solver_8C_source.php), > swapping my vector wi

[Libmesh-users] PetscVector

2011-12-28 Thread Ataollah Mesgarnejad
Dear all, I am initializing a PetscVector from a Vec ( PetscVector x_vector(x) ). Then I follow what I saw in your implementation of SNES solver ( http://libmesh.sourceforge.net/doxygen/petsc__nonlinear__solver_8C_source.php), swapping my vector with the solution vector of my system to make sure

Re: [Libmesh-users] PetscVector::add_vector fails at nodes on the subdomain boundary

2009-06-07 Thread Mengda Wu
Never mind! I found the problem. It was my fault. As the force is time-dependent, I need to do "close()" to finalize assembly properly every time step. Maybe this issue can be added somewhere in the document. Mengda 2009/6/7 Mengda Wu > Hi all, > >I have a code which runs OK in serial vers

[Libmesh-users] PetscVector::add_vector fails at nodes on the subdomain boundary

2009-06-07 Thread Mengda Wu
Hi all, I have a code which runs OK in serial version but when I tried to go to parallel. The result is wrong. I checked the matrix and rhs. The matrix is assembled correctly but the rhs is wrong. After a long time of debugging. I finally found it is because PetscVector::add_vector fails to add