[petsc-users] Doubts related MatCreateDense()

2016-02-11 Thread Kaushik Kulkarni
Hi all, Could you help me with my doubts: *Doubt 1*: Initially I tried to create a matrix with MatCreateMPIDense(); I received a compilation error stating that no such function existed. *Doubt 2*: So I continued working with MatCreateDense(). And I set the global size to 10 cross 10. Now when I

[petsc-users] example of Parallel running DG code with dynamic mesh refinement?

2016-02-11 Thread Wei Zhang
Dear everyone: I am planning to write a parallel running DG N-S solver where I want to do mesh refinement. I want to know if there is any example I can start with? /Wei

Re: [petsc-users] Providing Interpolation/Injections to Multigrid infrastructure

2016-02-11 Thread Barry Smith
> On Feb 11, 2016, at 1:36 PM, Boris Boutkov wrote: > > Hello All, > > I'm currently working on hooking into the PETSc multi-grid infrastructure by > creating my own DMShell and providing my own interpolation and injection > operators. The issue I am currently facing is that while PCSetUp_MG

[petsc-users] Providing Interpolation/Injections to Multigrid infrastructure

2016-02-11 Thread Boris Boutkov
Hello All, I'm currently working on hooking into the PETSc multi-grid infrastructure by creating my own DMShell and providing my own interpolation and injection operators. The issue I am currently facing is that while PCSetUp_MG is running, PETSc begins by attempting to create an interpolatio

Re: [petsc-users] DIVERGED_PCSETUP_FAILED

2016-02-11 Thread Michele Rosso
I am using periodic along x and Neumann along y. I remove the nullspace via -ksp_constant_null_space. Matt's suggestion worked; I will also give a try to umfpack and cholesky. Thanks, Michele On 02/11/2016 06:50 AM, Matthew Knepley wrote: On Thu, Feb 11, 2016 at 12:30 AM, Dave May

Re: [petsc-users] The matrix viewer

2016-02-11 Thread Matthew Knepley
On Thu, Feb 11, 2016 at 12:56 PM, wen zhao wrote: > Hi barry > > I have a question about the viewer of a matrix. I use a PCcholesky method > to factor matrix. and i use this codes to get a factored matrix F. > > ierr = PCSetType(pc,PCCHOLESKY);CHKERRQ(ierr); > ierr = PCFactorSetMatSolverP

[petsc-users] The matrix viewer

2016-02-11 Thread wen zhao
Hi barry I have a question about the viewer of a matrix. I use a PCcholesky method to factor matrix. and i use this codes to get a factored matrix F. ierr = PCSetType(pc,PCCHOLESKY);CHKERRQ(ierr); ierr = PCFactorSetMatSolverPackage(pc,MATSOLVERMUMPS);CHKERRQ(ierr); ierr = PCFactorSet

Re: [petsc-users] PCFIELDSPLIT question

2016-02-11 Thread Hom Nath Gharti
Perfect! Thanks a lot Matt! Hom Nath On Thu, Feb 11, 2016 at 1:34 PM, Matthew Knepley wrote: > On Thu, Feb 11, 2016 at 11:47 AM, Hom Nath Gharti > wrote: >> >> Thanks all. With further help from Stefano Zhampini I was able to >> solve my small test case using PCFieldSPlit option. I had to add >

Re: [petsc-users] PCFIELDSPLIT question

2016-02-11 Thread Matthew Knepley
On Thu, Feb 11, 2016 at 11:47 AM, Hom Nath Gharti wrote: > Thanks all. With further help from Stefano Zhampini I was able to > solve my small test case using PCFieldSPlit option. I had to add > call PCSetType(pc,PCFIELDSPLIT,ierr) > > Now I am trying to use same technique in my actual problem and

Re: [petsc-users] PCFIELDSPLIT question

2016-02-11 Thread Hom Nath Gharti
Thanks all. With further help from Stefano Zhampini I was able to solve my small test case using PCFieldSPlit option. I had to add call PCSetType(pc,PCFIELDSPLIT,ierr) Now I am trying to use same technique in my actual problem and got the error: PETSC ERROR: Fields must be sorted when creating sp

Re: [petsc-users] DIVERGED_PCSETUP_FAILED

2016-02-11 Thread Matthew Knepley
On Thu, Feb 11, 2016 at 12:30 AM, Dave May wrote: > > > On 11 February 2016 at 07:05, Michele Rosso wrote: > >> I tried setting -mat_superlu_dist_replacetinypivot true: it does help to >> advance the run past the previous "critical" point but eventually it stops >> later with the same error. >>

Re: [petsc-users] Parallel FEM code using PETSc

2016-02-11 Thread Vincent Huber
Hello, I’m not convinced the following will be find simple enough but Feel++ match the other expectations. In the example on the main page of the web site, you only have to change the line a+=on(_range=boundaryfaces(mesh), _rhs=l, _element=u, _expr=cst(0.) ); to

Re: [petsc-users] Create DM matrix

2016-02-11 Thread Dave May
On 11 February 2016 at 09:16, Sang pham van wrote: > I insert the lines below into my code, but it does not work: > Look more carefully at the calling pattern of the standard implementation DMCreateMatrix_DA() calls DMCreateMatrix_DA_3d_MPIAIJ() DMCreateMatrix_DA() allocates the matrix. If in

Re: [petsc-users] Create DM matrix

2016-02-11 Thread Sang pham van
I insert the lines below into my code, but it does not work: PetscErrorCode ierr; PetscInt xs,ys,nx,ny,i,j,slot,gxs,gys,gnx,gny; PetscInt m,n,dim,s,*cols = NULL,k,nc,*rows = NULL,col,cnt,l,p,*dnz = NULL,*onz = NULL; PetscInt istart,iend,jstart,jend,kstart