DA with imposed parallel decomposition

2009-09-23 Thread Dave May
Hello, Suppose I have a DA and I enforce the parallel decomposition during creation by specifying the arrays lx[], ly[], lz[] in DACreate3d(). If I now create a second DA using DARefine(), am I alays also able to obtain an interpolation operator between the two DA's via DAGetInterpolation()?

DA with imposed parallel decomposition

2009-09-23 Thread Dave May
, Matthew Knepley knepley at gmail.com wrote: Since it just inserts a point on every edge and face (in 2D), I do not see why it would fail. Does it? Matt On Wed, Sep 23, 2009 at 12:04 AM, Dave May dave.mayhem23 at gmail.comwrote: Hello, Suppose I have a DA and I enforce the parallel

DA with imposed parallel decomposition

2009-09-23 Thread Dave May
, at 7:47 AM, Dave May wrote: Hey Matt, In one piece of code I have, yes the call to DAGetInterpolation() does seem to cause a nasty crash. A crash? Segmentation violation etc? Or an error message saying that the decomposition is not supported? They are very different things: a crash

DMMG with different

2009-09-17 Thread Dave May
Hi, I'm trying to use DMMG to solve linear Stokes flow discretised with finite elements. Does anyone know how to specify different matrices for the matrix associated with the linear system and the matrix used to construct the preconditioner? Ie, like choosing a different Amat and Bmat with

how to extract a subvector?

2009-01-03 Thread Dave May
Your ix array looks fine. If you are happy ordering the sub vector as you've indicated, just pass in PETSC_NULL for iy when you define the VecScatter. This will indicate to just insert/add the entries for the sub vector in order from lowest global index largest global index. Cheers, Dave On

about MatGetSubMatrices()

2008-12-23 Thread Dave May
No. If you want to extract a parallel sub matrix, use MatGetSubMatrix(). http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatGetSubMatrix.html Cheers, Dave On Tue, Dec 23, 2008 at 4:47 AM, Yujie recrusader at gmail.com wrote: Hi, PETSc developer Now, when

ILU for MatAIJ

2008-11-13 Thread Dave May
Hey Tim, There is no parallel ILU support in petsc. In parallel, the closest thing is block jacobi with ilu on each block. This is the default parallel preconditioner in petsc. If you have installed hypre, it provide a parallel ILU, via pilut. Cheers, Dave On Thu, Nov 13, 2008 at 10:22 PM,

User-difined PC

2008-09-23 Thread Dave May
bsmith at mcs.anl.gov wrote: On Sep 22, 2008, at 7:59 AM, Dave May wrote: Why is the first pointer in PCSHELL operations the user context whereas in MATSHELL the first pointer is of type Mat ?? Seems slightly inconsistent. Good question, these were done at different times and only later

User-difined PC

2008-09-22 Thread Dave May
Michel, I noticed a few things. Not sure any would cause an error, but 1) You should hand control of destroying the user data type to the PCSEHLL via PCShellSetDestroy(). 2) I would also let the PCSHELL decide when the object should be setup by calling PCShellSetSetUp(). I suppose you will

semi coarsening with DA's

2008-07-17 Thread Dave May
Hello, Does anyone know the best way to perform semi coarsening using DA's? I was trying to use the following grid sequence level [2]: 20 x 20 level [1]: 11 x 11 level [0]: 6 x 6 where the numbers M x N corresponds to the number of nodes in the x and y direction respectively. However I

further about PCComputeExplicitOperator()

2008-05-03 Thread Dave May
Hi Barry, Does PCComputeExplicitOperator() really build B*A or A*B? The above code appears to just be applying the preconditioner to the each column of the identity matrix, with no reference to the original operator or the preconditioner side. I only wanted to clarify this fact as at one stage

how to get the explicit matrix of the preconditioner

2008-04-28 Thread Dave May
Hi, You can use PetscErrorCode PCComputeExplicitOperator(PC pc,Mat *mat) See, http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/PC/PCComputeExplicitOperator.html On Mon, Apr 28, 2008 at 8:19 AM, Yujie recrusader at gmail.com wrote: Hi, everyone How to

about MatMat*() functions

2008-02-25 Thread Dave May
Hey, MatMatMult() will work for MPIAIJ matrices. So will MatPtAP(). If you are ever in doubt, the easiest way (I find) to check whether I certain operation is supported is to just look at the source and see which ops. are defined. I can usually find the answer with the online docs. In this

how to inverse a sparse matrix in Petsc?

2008-02-05 Thread Dave May
Hi, Does anyone know how much faster (approximately) using MatMatSolve is compared to using PCComputeExplicitOperator(), when the PC in the latter function is defined to be LU? Cheers, Dave. On Feb 5, 2008 12:10 AM, Barry Smith bsmith at mcs.anl.gov wrote: For sequential AIJ

Memory corruption error in SNESSolve

2008-01-23 Thread Dave May
Hey Vijay, I can spot something wrong. VecGetSize gives you the global length of the vector. However VecGetArray only gives you access to the LOCAL portion of the vector data for that processor. Thus you need to use a local index if you are going to set the values directly into the array. In

zero out columns

2008-01-19 Thread Dave May
For some finite element codes I've written in the past I have wanted to leave the constraints in the matrix. Since the global FE stiffness is assembled from element (local) contributions, a masking matrix used to zero out entries can also be applied on the element level as well. I would assemble

block preconditioning questions

2008-01-11 Thread Dave May
difficulties, please don't hesitate to contact me. Cheers, Dave May. On Jan 8, 2008 8:19 AM, Gideon Simpson grs2103 at columbia.edu wrote: Is there a robust way to implement the following? Suppose I have a block diagonal matrix P = [A 0; 0 Q]; and I know the indices of A and Q

vector component product

2008-01-07 Thread Dave May
PetscErrorCode VecPointwiseMult(Vec w, Vec x,Vec y) On Jan 7, 2008 9:21 PM, li pan li76pan at yahoo.com wrote: Dear all, I want to calculate component product of two vectors. If I have two vectors u and v, I want to have result as w(i) = u(i)*v(i). Is there a function in petsc to finish

<    1   2   3   4