Actual source code: ex1.c
petsc-3.4.2 2013-07-02

      2: static char help[] = "Tests various ADDA routines.\n\n";

      4: #include <petscdmadda.h>

      8: int main(int argc,char **argv)
      9: {
     11:   ADDA           adda;
     12:   PetscInt       nodes[4]    = {20, 20, 10, 10};
     13:   PetscBool      periodic[4] = {PETSC_TRUE, PETSC_TRUE, PETSC_FALSE, PETSC_FALSE};

     15:   PetscInitialize(&argc,&argv,(char*)0,help);

     17:   /* Create distributed array and get vectors */
     18:   DMADDACreate(PETSC_COMM_WORLD, 4, nodes, NULL, 2, periodic, &adda);

     20:   /* Free memory */
     21:   DMDestroy(&adda);
     22:   PetscFinalize();
     23:   return 0;
     24: }