static char help[] = "Tests DMDA with variable multiple degrees of freedom per node.\n\n"; /* This code only compiles with gcc, since it is not ANSI C */ #include #include PetscErrorCode doit(DM da,Vec global) { PetscInt i,j,k,M,N,dof; PetscCall(DMDAGetInfo(da,0,&M,&N,0,0,0,0,&dof,0,0,0,0,0)); { struct {PetscScalar inside[dof];} **mystruct; PetscCall(DMDAVecGetArrayRead(da,global,(void*) &mystruct)); for (i=0; i