On Thu, Jul 17, 2008 at 8:03 AM, Barry Smith <bsmith at mcs.anl.gov> wrote: > > On Jul 16, 2008, at 10:16 PM, Dave May wrote: > >> 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 was unable to generate the interpolation operator using >> DAGetInterpolation(DA dac,DA daf,Mat *A,Vec *scale) >> Doing so caused the following error >> [0]PETSC ERROR: Arguments are incompatible! >> [0]PETSC ERROR: Ratio between levels: (mx - 1)/(Mx - 1) must be integer: >> mx 20 Mx 11! > > In this case mx = 21, Mx = 11 gives (21 - 1)/(11-1) = 2 works. >> >> >> Is there a more general way to construct the interpolation operator >> within petsc for this type of grid sequence? > > What I usually do is start with a coarse DA, then use DARefine() to > generate the finer > ones, this makes sure the interpolation will work. You can use > DASetRefinementFactor() > to control which directions get refined.
DAve's question is different. He is trying to use DA for doing staggered methods for Stokes where both A and B^T B are solved with MG, meaning that he cannot adjust grid sizes like that. Is there a way to specify coarse grids himself, but have PETSc calculate the interpolation operators automatically? I would look, but I am on travel :) Matt > Barry > >> >> >> Thanks, >> Dave. -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener
