semi coarsening with DA's

Barry Smith bsmith at mcs.anl.gov
Thu Jul 17 08:03:31 CDT 2008


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.

    Barry

>
>
> Thanks,
>   Dave.
>




More information about the petsc-users mailing list