Re: [petsc-users] some questions about snes

2014-02-21 Thread Jed Brown
Fande Kong writes: > (1) The snes can solve my nonlinear problem with a default Jacobian > provided in the Petsc using finite differences, but this method may cause > some new nonzero allocations for the preallocated matrix. Why are there new nonzeros? This must mean preallocation was incorrect

[petsc-users] some questions about snes

2014-02-21 Thread Fande Kong
Hi all, (1) The snes can solve my nonlinear problem with a default Jacobian provided in the Petsc using finite differences, but this method may cause some new nonzero allocations for the preallocated matrix. (2) A Matrix-free version of snes also works well for my nonlinear problem, but it does n

Re: [petsc-users] From 1D to 3D problem ? Unstructured mesh ?

2014-02-21 Thread Derek Gaston
The phase-field system developed by Michael Tonks (copied on this email) will be part of the open-source release of MOOSE (hopefully by the end of next week). Feel free to contact either myself or Mike for more information while we all wait... In the meantime you can also check out some of the yo

Re: [petsc-users] From 1D to 3D problem ? Unstructured mesh ?

2014-02-21 Thread Jed Brown
Christophe Ortiz writes: > Hi all, > > Recently I have implemented a 1D problem of coupled diffusion equations > using PETSc. I did it using finite differences for diffusion terms and > F(t,U,U_t) = 0. It works pretty well with ARKIMEX3. I get a nice timestep > variation and all boundary conditio

Re: [petsc-users] Using DM for a refined level-set grid

2014-02-21 Thread Jed Brown
Åsmund Ervik writes: > We're talking about adding a refined level-set grid method > (M. Herrmann, doi:10.1016/j.jcp.2007.11.002) to our code. Currently we > solve two-phase Navier-Stokes (ghost fluid method) together with a > standard level-set approach on a uniform Cartesian grid. > > What we're

Re: [petsc-users] (no subject)

2014-02-21 Thread Matthew Knepley
On Fri, Feb 21, 2014 at 12:34 PM, Chung-Kan Huang wrote: > Hello, > > In my application I like to use > PetscErrorCode KSPSetOperators(KSP ksp,Mat Amat,Mat Pmat,MatStructure > flag) > and have Pmat different from Amat > > if Amat = L + D + U > then Pmat = Amat - L* - U* + rowsum(L* + U*) > wher

Re: [petsc-users] Using Pmat different from Amat

2014-02-21 Thread Barry Smith
On Feb 21, 2014, at 2:41 PM, Chung-Kan Huang wrote: > Hello, > > In my application I like to use > PetscErrorCode KSPSetOperators(KSP ksp,Mat Amat,Mat Pmat,MatStructure flag) > and have Pmat different from Amat > > if Amat = L + D + U > then Pmat = Amat - L* - U* + rowsum(L* + U*) > where

Re: [petsc-users] partial stencil in DMDA?

2014-02-21 Thread Fischer, Greg A.
Barry, Thanks for your time. I have a better understanding now. Greg >-Original Message- >From: Barry Smith [mailto:bsm...@mcs.anl.gov] >Sent: Friday, February 21, 2014 4:48 PM >To: Fischer, Greg A. >Cc: petsc-users@mcs.anl.gov >Subject: Re: [petsc-users] partial stencil in DMDA? > > >

Re: [petsc-users] partial stencil in DMDA?

2014-02-21 Thread Barry Smith
On Feb 21, 2014, at 2:42 PM, Fischer, Greg A. wrote: > Barry, > > If I'm interpreting correctly, the 2nd case would work fine for me. However, > perhaps I was previously over-complicating the problem. Could I not just: > > 1. create a DMDA > 2. create a global vector with DOF=1 > 3. call VecD

Re: [petsc-users] cannot compile/use ml with 64 bit integers

2014-02-21 Thread Xiangdong
On Fri, Feb 21, 2014 at 3:28 PM, Barry Smith wrote: > > Though ml does support 64 bit integers for long vectors they do it in a > fundamentally different way than PETSc; only certain integer data is stored > in 64 bit form while most integer values are stored in 32 bit integers. In > PETSc we m

Re: [petsc-users] partial stencil in DMDA?

2014-02-21 Thread Fischer, Greg A.
Barry, If I'm interpreting correctly, the 2nd case would work fine for me. However, perhaps I was previously over-complicating the problem. Could I not just: 1. create a DMDA 2. create a global vector with DOF=1 3. call VecDuplicateVecs() against the DOF=1 global vector for my other ~100 DOFs

[petsc-users] Using Pmat different from Amat

2014-02-21 Thread Chung-Kan Huang
Hello, In my application I like to use PetscErrorCode KSPSetOperators(KSP ksp,Mat Amat,Mat Pmat,MatStructure flag) and have Pmat different from Amat if Amat = L + D + U then Pmat = Amat - L* - U* + rowsum(L* + U*) where L* and U* is a portion of L and U and rowsum(L* + U*) will add into D I k

[petsc-users] (no subject)

2014-02-21 Thread Chung-Kan Huang
Hello, In my application I like to use PetscErrorCode KSPSetOperators(KSP ksp,Mat Amat,Mat Pmat,MatStructure flag) and have Pmat different from Amat if Amat = L + D + U then Pmat = Amat - L* - U* + rowsum(L* + U*) where L* and U* is a portion of L and U and rowsum(L* + U*) will add into D I k

Re: [petsc-users] cannot compile/use ml with 64 bit integers

2014-02-21 Thread Barry Smith
Though ml does support 64 bit integers for long vectors they do it in a fundamentally different way than PETSc; only certain integer data is stored in 64 bit form while most integer values are stored in 32 bit integers. In PETSc we manage all integers as either 32 or 64 bit so mixing the two

Re: [petsc-users] partial stencil in DMDA?

2014-02-21 Thread Barry Smith
Greg, The general mechanism for moving elements of vector between processes is with VecScatterCreate() and VecScatterBegin/End() with it you can indicate exactly what values are to move and to where, but it is all based on “one dimension” indexing into the vector. DMDA provides a

[petsc-users] cannot compile/use ml with 64 bit integers

2014-02-21 Thread Xiangdong
Hello everyone, When I compile petsc with options -with-64-bit-indices and ml packages, I got the error like this: "Cannot use ml with 64 bit integers, it is not coded for this capability". If I want to use ml as a preconditioner for long vectors (> 2 billions), is there any solution? Thank you

Re: [petsc-users] partial stencil in DMDA?

2014-02-21 Thread Fischer, Greg A.
Barry, Thanks! I have another question. The user manual says: PETSc currently provides no container for multiple arrays sharing the same distributed array communication; note, however, that the dof parameter handles many cases of interest. In my application, each space l

Re: [petsc-users] partial stencil in DMDA?

2014-02-21 Thread Barry Smith
On Feb 21, 2014, at 11:02 AM, Fischer, Greg A. wrote: > Hello, > > I’m interested in using PETSc to manage distributed arrays. Based on my > reading about the DMDA objects, I see that ghost points can be communicated > in box-type stencils or star-type stencils. > > For my application, as

[petsc-users] partial stencil in DMDA?

2014-02-21 Thread Fischer, Greg A.
Hello, I'm interested in using PETSc to manage distributed arrays. Based on my reading about the DMDA objects, I see that ghost points can be communicated in box-type stencils or star-type stencils. For my application, assume that I have a 2D DMDA object with star-type stencils. For a typical