File: | ex13.c |
Warning: | line 81, column 3 Value stored to 'ierr' is never read |
[?] Use j/k keys for keyboard navigation
1 | static char help[] = "Test DMStagPopulateLocalToGlobalInjective.\n\n"; |
2 | |
3 | #include <petscdm.h> |
4 | #include <petscdmstag.h> |
5 | |
6 | static PetscErrorCode Test1(DM dm); |
7 | static PetscErrorCode Test2_1d(DM dm); |
8 | static PetscErrorCode Test2_2d(DM dm); |
9 | static PetscErrorCode Test2_3d(DM dm); |
10 | |
11 | int main(int argc,char **argv) |
12 | { |
13 | PetscErrorCode ierr; |
14 | DM dm; |
15 | PetscInt dim; |
16 | PetscBool setSizes,useInjective; |
17 | |
18 | /* Initialize PETSc and process command line arguments */ |
19 | ierr = PetscInitialize(&argc,&argv,(char*)0,help);if (ierr) return ierr; |
20 | dim = 2; |
21 | ierr = PetscOptionsGetInt(NULL((void*)0),NULL((void*)0),"-dim",&dim,NULL((void*)0));CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),21,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
22 | setSizes = PETSC_FALSE; |
23 | ierr = PetscOptionsGetBool(NULL((void*)0),NULL((void*)0),"-setsizes",&setSizes,NULL((void*)0));CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),23,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
24 | useInjective = PETSC_TRUE; |
25 | ierr = PetscOptionsGetBool(NULL((void*)0),NULL((void*)0),"-useinjective",&useInjective,NULL((void*)0));CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),25,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
26 | |
27 | /* Creation (normal) */ |
28 | if (!setSizes) { |
29 | switch (dim) { |
30 | case 1: |
31 | ierr = DMStagCreate1d(PETSC_COMM_WORLD,DM_BOUNDARY_NONE,3,1,1,DMSTAG_STENCIL_BOX,1,NULL((void*)0),&dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),31,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
32 | break; |
33 | case 2: |
34 | ierr = DMStagCreate2d(PETSC_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,3,2,PETSC_DECIDE-1,PETSC_DECIDE-1,1,1,1,DMSTAG_STENCIL_BOX,1,NULL((void*)0),NULL((void*)0),&dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),34,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
35 | break; |
36 | case 3: |
37 | ierr = DMStagCreate3d(PETSC_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,3,2,4,PETSC_DECIDE-1,PETSC_DECIDE-1,PETSC_DECIDE-1,1,1,1,1,DMSTAG_STENCIL_BOX,1,NULL((void*)0),NULL((void*)0),NULL((void*)0),&dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),37,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
38 | break; |
39 | default: |
40 | SETERRQ1(PETSC_COMM_WORLD,PETSC_ERR_SUP,"No support for dimension %D",dim)return PetscError(PETSC_COMM_WORLD,40,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,56,PETSC_ERROR_INITIAL,"No support for dimension %D",dim); |
41 | } |
42 | } else { |
43 | /* Creation (test providing decomp exactly)*/ |
44 | PetscMPIInt size; |
45 | PetscInt lx[4] = {2,3,4}, ranksx = 3, mx = 9; |
46 | PetscInt ly[3] = {4,5}, ranksy = 2, my = 9; |
47 | PetscInt lz[2] = {6,7}, ranksz = 2, mz = 13; |
48 | |
49 | ierr = MPI_Comm_size(PETSC_COMM_WORLD,&size);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),49,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
50 | switch (dim) { |
51 | case 1: |
52 | if (size != ranksx) SETERRQ1(PETSC_COMM_WORLD,PETSC_ERR_ARG_WRONG,"Must run on %D ranks with -dim 1 -setSizes",ranksx)return PetscError(PETSC_COMM_WORLD,52,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,62,PETSC_ERROR_INITIAL,"Must run on %D ranks with -dim 1 -setSizes" ,ranksx); |
53 | ierr = DMStagCreate1d(PETSC_COMM_WORLD,DM_BOUNDARY_NONE,mx,1,1,DMSTAG_STENCIL_BOX,1,lx,&dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),53,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
54 | break; |
55 | case 2: |
56 | if (size != ranksx * ranksy) SETERRQ1(PETSC_COMM_WORLD,PETSC_ERR_ARG_WRONG,"Must run on %D ranks with -dim 2 -setSizes",ranksx * ranksy)return PetscError(PETSC_COMM_WORLD,56,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,62,PETSC_ERROR_INITIAL,"Must run on %D ranks with -dim 2 -setSizes" ,ranksx * ranksy); |
57 | ierr = DMStagCreate2d(PETSC_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,mx,my,ranksx,ranksy,1,1,1,DMSTAG_STENCIL_BOX,1,lx,ly,&dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),57,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
58 | break; |
59 | case 3: |
60 | if (size != ranksx * ranksy * ranksz) SETERRQ1(PETSC_COMM_WORLD,PETSC_ERR_ARG_WRONG,"Must run on %D ranks with -dim 3 -setSizes", ranksx * ranksy * ranksz)return PetscError(PETSC_COMM_WORLD,60,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,62,PETSC_ERROR_INITIAL,"Must run on %D ranks with -dim 3 -setSizes" ,ranksx * ranksy * ranksz); |
61 | ierr = DMStagCreate3d(PETSC_COMM_WORLD,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,DM_BOUNDARY_NONE,mx,my,mz,ranksx,ranksy,ranksz,1,1,1,1,DMSTAG_STENCIL_BOX,1,lx,ly,lz,&dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),61,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
62 | break; |
63 | default: |
64 | SETERRQ1(PETSC_COMM_WORLD,PETSC_ERR_SUP,"No support for dimension %D",dim)return PetscError(PETSC_COMM_WORLD,64,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,56,PETSC_ERROR_INITIAL,"No support for dimension %D",dim); |
65 | } |
66 | } |
67 | |
68 | /* Setup */ |
69 | ierr = DMSetFromOptions(dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),69,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
70 | ierr = DMSetUp(dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),70,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
71 | |
72 | /* Populate Additional Injective Local-to-Global Map */ |
73 | if (useInjective) { |
74 | ierr = DMStagPopulateLocalToGlobalInjective(dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),74,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
75 | } |
76 | |
77 | /* Test: Make sure L2G inverts G2L */ |
78 | ierr = Test1(dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),78,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
79 | |
80 | /* Test: Make sure that G2L inverts L2G, on its domain */ |
81 | ierr = DMGetDimension(dm,&dim); |
Value stored to 'ierr' is never read | |
82 | switch (dim) { |
83 | case 1: ierr = Test2_1d(dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),83,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); break; |
84 | case 2: ierr = Test2_2d(dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),84,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); break; |
85 | case 3: ierr = Test2_3d(dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),85,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); break; |
86 | default: SETERRQ1(PetscObjectComm((PetscObject)dm),PETSC_ERR_SUP,"Not implemented for dimension %D",dim)return PetscError(PetscObjectComm((PetscObject)dm),86,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,56,PETSC_ERROR_INITIAL,"Not implemented for dimension %D",dim ); |
87 | } |
88 | |
89 | /* Clean up and finalize PETSc */ |
90 | ierr = DMDestroy(&dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),90,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
91 | ierr = PetscFinalize(); |
92 | return ierr; |
93 | } |
94 | |
95 | static PetscErrorCode Test1(DM dm) |
96 | { |
97 | PetscErrorCode ierr; |
98 | Vec vecLocal,vecGlobal,vecGlobalCheck; |
99 | PetscRandom rctx; |
100 | PetscBool equal; |
101 | |
102 | PetscFunctionBeginUserdo { do { ; if (petscstack && (petscstack->currentsize < 64)) { petscstack->function[petscstack->currentsize ] = __func__; petscstack->file[petscstack->currentsize] = "/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ; petscstack->line[petscstack->currentsize] = 102; petscstack ->petscroutine[petscstack->currentsize] = PETSC_FALSE; petscstack ->currentsize++; } if (petscstack) { petscstack->hotdepth += (PETSC_FALSE || petscstack->hotdepth); } ; } while (0) ; ; } while (0); |
103 | ierr = DMCreateLocalVector(dm,&vecLocal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),103,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
104 | ierr = DMCreateGlobalVector(dm,&vecGlobal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),104,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
105 | ierr = PetscRandomCreate(PETSC_COMM_WORLD,&rctx);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),105,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
106 | ierr = VecSetRandom(vecGlobal,rctx);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),106,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
107 | ierr = VecSetRandom(vecLocal,rctx);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),107,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); /* garbage */ |
108 | ierr = PetscRandomDestroy(&rctx);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),108,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
109 | ierr = VecDuplicate(vecGlobal,&vecGlobalCheck);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),109,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
110 | ierr = DMGlobalToLocal(dm,vecGlobal,INSERT_VALUES,vecLocal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),110,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
111 | ierr = DMLocalToGlobal(dm,vecLocal,INSERT_VALUES,vecGlobalCheck);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),111,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
112 | ierr = VecEqual(vecGlobal,vecGlobalCheck,&equal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),112,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
113 | if (!equal) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Check failed - vectors should be bitwise identical")return PetscError(PetscObjectComm((PetscObject)dm),113,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Check failed - vectors should be bitwise identical" ); |
114 | ierr = VecDestroy(&vecLocal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),114,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
115 | ierr = VecDestroy(&vecGlobal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),115,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
116 | ierr = VecDestroy(&vecGlobalCheck);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),116,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
117 | PetscFunctionReturn(0)do { do { ; if (petscstack && petscstack->currentsize > 0) { petscstack->currentsize--; petscstack->function [petscstack->currentsize] = 0; petscstack->file[petscstack ->currentsize] = 0; petscstack->line[petscstack->currentsize ] = 0; petscstack->petscroutine[petscstack->currentsize ] = PETSC_FALSE; } if (petscstack) { petscstack->hotdepth = (((petscstack->hotdepth-1)<(0)) ? (0) : (petscstack-> hotdepth-1)); } ; } while (0); return(0);} while (0); |
118 | } |
119 | |
120 | /* Test function with positive values for positive arguments */ |
121 | #define TEST_FUNCTION(i,j,k,idx,c) (8.33 * i + 7.343 * j + 1.234 * idx + 99.011 * c) |
122 | |
123 | static PetscErrorCode Test2_1d(DM dm) |
124 | { |
125 | PetscErrorCode ierr; |
126 | Vec vecLocal,vecLocalCheck,vecGlobal; |
127 | PetscInt i,startx,nx,nExtrax,dof0,dof1,c,idxLeft,idxElement; |
128 | PetscScalar **arr; |
129 | |
130 | PetscFunctionBeginUserdo { do { ; if (petscstack && (petscstack->currentsize < 64)) { petscstack->function[petscstack->currentsize ] = __func__; petscstack->file[petscstack->currentsize] = "/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ; petscstack->line[petscstack->currentsize] = 130; petscstack ->petscroutine[petscstack->currentsize] = PETSC_FALSE; petscstack ->currentsize++; } if (petscstack) { petscstack->hotdepth += (PETSC_FALSE || petscstack->hotdepth); } ; } while (0) ; ; } while (0); |
131 | ierr = DMCreateLocalVector(dm,&vecLocal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),131,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
132 | ierr = VecSet(vecLocal,-1.0);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),132,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
133 | ierr = DMStagGetCorners(dm,&startx,NULL((void*)0),NULL((void*)0),&nx,NULL((void*)0),NULL((void*)0),&nExtrax,NULL((void*)0),NULL((void*)0));CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),133,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
134 | ierr = DMStagGetDOF(dm,&dof0,&dof1,NULL((void*)0),NULL((void*)0));CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),134,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
135 | ierr = DMStagVecGetArrayDOF(dm,vecLocal,&arr);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),135,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
136 | if (dof0 > 0) { |
137 | ierr = DMStagGetLocationSlot(dm,DMSTAG_LEFT,0,&idxLeft);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),137,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
138 | } |
139 | if (dof1 > 0) { |
140 | ierr = DMStagGetLocationSlot(dm,DMSTAG_ELEMENT,0,&idxElement);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),140,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
141 | } |
142 | for (i=startx; i<startx+nx+nExtrax; ++i) { |
143 | for (c=0; c<dof0; ++c) { |
144 | const PetscScalar val = TEST_FUNCTION(i,0,0,idxLeft,c); |
145 | arr[i][idxLeft+c] = val; |
146 | } |
147 | if (i < startx+nx) { |
148 | for (c=0; c<dof1; ++c) { |
149 | const PetscScalar val = TEST_FUNCTION(i,0,0,idxElement,c); |
150 | arr[i][idxElement+c] = val; |
151 | } |
152 | } |
153 | } |
154 | ierr = DMStagVecRestoreArrayDOF(dm,vecLocal,&arr);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),154,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
155 | ierr = DMCreateGlobalVector(dm,&vecGlobal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),155,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
156 | ierr = DMLocalToGlobal(dm,vecLocal,INSERT_VALUES,vecGlobal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),156,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
157 | ierr = VecDuplicate(vecLocal,&vecLocalCheck);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),157,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
158 | ierr = VecSet(vecLocalCheck,-1.0);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),158,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
159 | ierr = DMGlobalToLocal(dm,vecGlobal,INSERT_VALUES,vecLocalCheck);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),159,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
160 | ierr = DMStagVecGetArrayDOFRead(dm,vecLocalCheck,&arr);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),160,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
161 | for (i=startx; i<startx+nx+nExtrax; ++i) { |
162 | for (c=0; c<dof0; ++c) { |
163 | const PetscScalar val = TEST_FUNCTION(i,0,0,idxLeft,c); |
164 | if (arr[i][idxLeft+c] != val) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),164,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
165 | } |
166 | if (i < startx+nx) { |
167 | for (c=0; c<dof1; ++c) { |
168 | const PetscScalar val = TEST_FUNCTION(i,0,0,idxElement,c); |
169 | if (arr[i][idxElement+c] != val) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),169,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
170 | } |
171 | } else { |
172 | for (c=0; c<dof0; ++c) { |
173 | if (arr[i][idxElement+c] != -1.0) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),173,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
174 | } |
175 | } |
176 | } |
177 | ierr = DMStagVecRestoreArrayDOFRead(dm,vecLocalCheck,&arr);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),177,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
178 | ierr = VecDestroy(&vecLocal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),178,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
179 | ierr = VecDestroy(&vecLocalCheck);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),179,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
180 | ierr = VecDestroy(&vecGlobal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),180,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
181 | PetscFunctionReturn(0)do { do { ; if (petscstack && petscstack->currentsize > 0) { petscstack->currentsize--; petscstack->function [petscstack->currentsize] = 0; petscstack->file[petscstack ->currentsize] = 0; petscstack->line[petscstack->currentsize ] = 0; petscstack->petscroutine[petscstack->currentsize ] = PETSC_FALSE; } if (petscstack) { petscstack->hotdepth = (((petscstack->hotdepth-1)<(0)) ? (0) : (petscstack-> hotdepth-1)); } ; } while (0); return(0);} while (0); |
182 | } |
183 | |
184 | static PetscErrorCode Test2_2d(DM dm) |
185 | { |
186 | PetscErrorCode ierr; |
187 | Vec vecLocal,vecLocalCheck,vecGlobal; |
188 | PetscInt i,j,startx,starty,nx,ny,nExtrax,nExtray,dof0,dof1,dof2,c,idxLeft,idxDown,idxDownLeft,idxElement; |
189 | PetscScalar ***arr; |
190 | |
191 | PetscFunctionBeginUserdo { do { ; if (petscstack && (petscstack->currentsize < 64)) { petscstack->function[petscstack->currentsize ] = __func__; petscstack->file[petscstack->currentsize] = "/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ; petscstack->line[petscstack->currentsize] = 191; petscstack ->petscroutine[petscstack->currentsize] = PETSC_FALSE; petscstack ->currentsize++; } if (petscstack) { petscstack->hotdepth += (PETSC_FALSE || petscstack->hotdepth); } ; } while (0) ; ; } while (0); |
192 | ierr = DMCreateLocalVector(dm,&vecLocal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),192,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
193 | ierr = VecSet(vecLocal,-1.0);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),193,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
194 | ierr = DMStagGetCorners(dm,&startx,&starty,NULL((void*)0),&nx,&ny,NULL((void*)0),&nExtrax,&nExtray,NULL((void*)0));CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),194,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
195 | ierr = DMStagGetDOF(dm,&dof0,&dof1,&dof2,NULL((void*)0));CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),195,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
196 | ierr = DMStagVecGetArrayDOF(dm,vecLocal,&arr);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),196,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
197 | if (dof0 > 0) { |
198 | ierr = DMStagGetLocationSlot(dm,DMSTAG_DOWN_LEFT,0,&idxDownLeft);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),198,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
199 | } |
200 | if (dof1 > 0) { |
201 | ierr = DMStagGetLocationSlot(dm,DMSTAG_LEFT,0,&idxLeft);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),201,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
202 | ierr = DMStagGetLocationSlot(dm,DMSTAG_DOWN,0,&idxDown);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),202,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
203 | } |
204 | if (dof2 > 0) { |
205 | ierr = DMStagGetLocationSlot(dm,DMSTAG_ELEMENT,0,&idxElement);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),205,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
206 | } |
207 | for (j=starty; j<starty+ny+nExtray; ++j) { |
208 | for (i=startx; i<startx+nx+nExtrax; ++i) { |
209 | for (c=0; c<dof0; ++c) { |
210 | const PetscScalar val = TEST_FUNCTION(i,j,0,idxDownLeft,c); |
211 | arr[j][i][idxDownLeft+c] = val; |
212 | } |
213 | if (j < starty+ny) { |
214 | for (c=0; c<dof1; ++c) { |
215 | const PetscScalar val = TEST_FUNCTION(i,j,0,idxLeft,c); |
216 | arr[j][i][idxLeft+c] = val; |
217 | } |
218 | } |
219 | if (i < startx+nx) { |
220 | for (c=0; c<dof1; ++c) { |
221 | const PetscScalar val = TEST_FUNCTION(i,j,0,idxDown,c); |
222 | arr[j][i][idxDown+c] = val; |
223 | } |
224 | } |
225 | if (i < startx+nx && j < starty+ny) { |
226 | for (c=0; c<dof2; ++c) { |
227 | const PetscScalar val = TEST_FUNCTION(i,j,0,idxElement,c); |
228 | arr[j][i][idxElement+c] = val; |
229 | } |
230 | } |
231 | } |
232 | } |
233 | ierr = DMStagVecRestoreArrayDOF(dm,vecLocal,&arr);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),233,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
234 | ierr = DMCreateGlobalVector(dm,&vecGlobal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),234,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
235 | ierr = DMLocalToGlobal(dm,vecLocal,INSERT_VALUES,vecGlobal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),235,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
236 | ierr = VecDuplicate(vecLocal,&vecLocalCheck);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),236,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
237 | ierr = VecSet(vecLocalCheck,-1.0);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),237,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
238 | ierr = DMGlobalToLocal(dm,vecGlobal,INSERT_VALUES,vecLocalCheck);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),238,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
239 | ierr = DMStagVecGetArrayDOFRead(dm,vecLocalCheck,&arr);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),239,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
240 | for (j=starty; j<starty+ny+nExtray; ++j) { |
241 | for (i=startx; i<startx+nx+nExtrax; ++i) { |
242 | for (c=0; c<dof0; ++c) { |
243 | const PetscScalar val = TEST_FUNCTION(i,j,0,idxDownLeft,c); |
244 | if (arr[j][i][idxDownLeft+c] != val) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),244,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
245 | } |
246 | if (j < starty+ny) { |
247 | for (c=0; c<dof1; ++c) { |
248 | const PetscScalar val = TEST_FUNCTION(i,j,0,idxLeft,c); |
249 | if (arr[j][i][idxLeft+c] != val) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),249,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
250 | } |
251 | } else { |
252 | for (c=0; c<dof1; ++c) { |
253 | if (arr[j][i][idxLeft+c] != -1.0) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),253,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
254 | } |
255 | } |
256 | if (i < startx+nx) { |
257 | for (c=0; c<dof1; ++c) { |
258 | const PetscScalar val = TEST_FUNCTION(i,j,0,idxDown,c); |
259 | if (arr[j][i][idxDown+c] != val) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),259,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
260 | } |
261 | } else { |
262 | for (c=0; c<dof1; ++c) { |
263 | if (arr[j][i][idxDown+c] != -1.0) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),263,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
264 | } |
265 | } |
266 | if (i < startx+nx && j < starty+ny) { |
267 | for (c=0; c<dof2; ++c) { |
268 | const PetscScalar val = TEST_FUNCTION(i,j,0,idxElement,c); |
269 | if (arr[j][i][idxElement+c] != val) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),269,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
270 | } |
271 | } else { |
272 | for (c=0; c<dof2; ++c) { |
273 | if (arr[j][i][idxElement+c] != -1.0) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),273,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
274 | } |
275 | } |
276 | } |
277 | } |
278 | ierr = DMStagVecRestoreArrayDOFRead(dm,vecLocalCheck,&arr);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),278,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
279 | ierr = VecDestroy(&vecLocal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),279,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
280 | ierr = VecDestroy(&vecLocalCheck);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),280,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
281 | ierr = VecDestroy(&vecGlobal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),281,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
282 | PetscFunctionReturn(0)do { do { ; if (petscstack && petscstack->currentsize > 0) { petscstack->currentsize--; petscstack->function [petscstack->currentsize] = 0; petscstack->file[petscstack ->currentsize] = 0; petscstack->line[petscstack->currentsize ] = 0; petscstack->petscroutine[petscstack->currentsize ] = PETSC_FALSE; } if (petscstack) { petscstack->hotdepth = (((petscstack->hotdepth-1)<(0)) ? (0) : (petscstack-> hotdepth-1)); } ; } while (0); return(0);} while (0); |
283 | } |
284 | |
285 | static PetscErrorCode Test2_3d(DM dm) |
286 | { |
287 | PetscErrorCode ierr; |
288 | Vec vecLocal,vecLocalCheck,vecGlobal; |
289 | PetscInt i,j,k,startx,starty,startz,nx,ny,nz,nExtrax,nExtray,nExtraz,dof0,dof1,dof2,dof3,c,idxLeft,idxDown,idxDownLeft,idxBackDownLeft,idxBackDown,idxBack,idxBackLeft,idxElement; |
290 | PetscScalar ****arr; |
291 | |
292 | PetscFunctionBeginUserdo { do { ; if (petscstack && (petscstack->currentsize < 64)) { petscstack->function[petscstack->currentsize ] = __func__; petscstack->file[petscstack->currentsize] = "/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ; petscstack->line[petscstack->currentsize] = 292; petscstack ->petscroutine[petscstack->currentsize] = PETSC_FALSE; petscstack ->currentsize++; } if (petscstack) { petscstack->hotdepth += (PETSC_FALSE || petscstack->hotdepth); } ; } while (0) ; ; } while (0); |
293 | ierr = DMCreateLocalVector(dm,&vecLocal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),293,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
294 | ierr = VecSet(vecLocal,-1.0);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),294,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
295 | ierr = DMStagGetCorners(dm,&startx,&starty,&startz,&nx,&ny,&nz,&nExtrax,&nExtray,&nExtraz);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),295,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
296 | ierr = DMStagGetDOF(dm,&dof0,&dof1,&dof2,&dof3);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),296,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
297 | ierr = DMStagVecGetArrayDOF(dm,vecLocal,&arr);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),297,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
298 | if (dof0 > 0) { |
299 | ierr = DMStagGetLocationSlot(dm,DMSTAG_BACK_DOWN_LEFT,0,&idxBackDownLeft);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),299,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
300 | } |
301 | if (dof1 > 0) { |
302 | ierr = DMStagGetLocationSlot(dm,DMSTAG_BACK_LEFT,0,&idxBackLeft);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),302,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
303 | ierr = DMStagGetLocationSlot(dm,DMSTAG_BACK_DOWN,0,&idxBackDown);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),303,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
304 | ierr = DMStagGetLocationSlot(dm,DMSTAG_DOWN_LEFT,0,&idxDownLeft);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),304,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
305 | } |
306 | if (dof2 > 0) { |
307 | ierr = DMStagGetLocationSlot(dm,DMSTAG_LEFT,0,&idxLeft);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),307,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
308 | ierr = DMStagGetLocationSlot(dm,DMSTAG_DOWN,0,&idxDown);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),308,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
309 | ierr = DMStagGetLocationSlot(dm,DMSTAG_BACK,0,&idxBack);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),309,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
310 | } |
311 | if (dof3 > 0) { |
312 | ierr = DMStagGetLocationSlot(dm,DMSTAG_ELEMENT,0,&idxElement);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),312,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
313 | } |
314 | for (k=startz; k<startz+nz+nExtraz; ++k) { |
315 | for (j=starty; j<starty+ny+nExtray; ++j) { |
316 | for (i=startx; i<startx+nx+nExtrax; ++i) { |
317 | for (c=0; c<dof0; ++c) { |
318 | const PetscScalar val = TEST_FUNCTION(i,j,k,idxBackDownLeft,c); |
319 | arr[k][j][i][idxBackDownLeft+c] = val; |
320 | } |
321 | if (k < startz+nz) { |
322 | for (c=0; c<dof1; ++c) { |
323 | const PetscScalar val = TEST_FUNCTION(i,j,k,idxDownLeft,c); |
324 | arr[k][j][i][idxDownLeft+c] = val; |
325 | } |
326 | } |
327 | if (j < starty+ny) { |
328 | for (c=0; c<dof1; ++c) { |
329 | const PetscScalar val = TEST_FUNCTION(i,j,k,idxBackLeft,c); |
330 | arr[k][j][i][idxBackLeft+c] = val; |
331 | } |
332 | } |
333 | if (i < startx+nx) { |
334 | for (c=0; c<dof1; ++c) { |
335 | const PetscScalar val = TEST_FUNCTION(i,j,k,idxBackDown,c); |
336 | arr[k][j][i][idxBackDown+c] = val; |
337 | } |
338 | } |
339 | if (j < starty+ny && k < startz+nz) { |
340 | for (c=0; c<dof2; ++c) { |
341 | const PetscScalar val = TEST_FUNCTION(i,j,k,idxLeft,c); |
342 | arr[k][j][i][idxLeft+c] = val; |
343 | } |
344 | } |
345 | if (i < startx+nx && k < startz+nz) { |
346 | for (c=0; c<dof2; ++c) { |
347 | const PetscScalar val = TEST_FUNCTION(i,j,k,idxDown,c); |
348 | arr[k][j][i][idxDown+c] = val; |
349 | } |
350 | } |
351 | if (i < startx+nx && j < starty+ny) { |
352 | for (c=0; c<dof2; ++c) { |
353 | const PetscScalar val = TEST_FUNCTION(i,j,k,idxBack,c); |
354 | arr[k][j][i][idxBack+c] = val; |
355 | } |
356 | } |
357 | if (i < startx+nx && j < starty+ny && k < startz+nz) { |
358 | for (c=0; c<dof3; ++c) { |
359 | const PetscScalar val = TEST_FUNCTION(i,j,k,idxElement,c); |
360 | arr[k][j][i][idxElement+c] = val; |
361 | } |
362 | } |
363 | } |
364 | } |
365 | } |
366 | ierr = DMStagVecRestoreArrayDOF(dm,vecLocal,&arr);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),366,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
367 | ierr = DMCreateGlobalVector(dm,&vecGlobal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),367,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
368 | ierr = DMLocalToGlobal(dm,vecLocal,INSERT_VALUES,vecGlobal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),368,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
369 | ierr = VecDuplicate(vecLocal,&vecLocalCheck);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),369,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
370 | ierr = VecSet(vecLocalCheck,-1.0);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),370,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
371 | ierr = DMGlobalToLocal(dm,vecGlobal,INSERT_VALUES,vecLocalCheck);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),371,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
372 | ierr = DMStagVecGetArrayDOFRead(dm,vecLocalCheck,&arr);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),372,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
373 | for (k=startz; k<startz+nz+nExtraz; ++k) { |
374 | for (j=starty; j<starty+ny+nExtray; ++j) { |
375 | for (i=startx; i<startx+nx+nExtrax; ++i) { |
376 | for (c=0; c<dof0; ++c) { |
377 | const PetscScalar val = TEST_FUNCTION(i,j,k,idxBackDownLeft,c); |
378 | if (arr[k][j][i][idxBackDownLeft+c] != val) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),378,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
379 | } |
380 | if (k < startz+nz) { |
381 | for (c=0; c<dof1; ++c) { |
382 | const PetscScalar val = TEST_FUNCTION(i,j,k,idxDownLeft,c); |
383 | if (arr[k][j][i][idxDownLeft+c] != val) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),383,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
384 | } |
385 | } else { |
386 | for (c=0; c<dof1; ++c) { |
387 | if (arr[k][j][i][idxDownLeft+c] != -1.0) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),387,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
388 | } |
389 | } |
390 | if (j < starty+ny) { |
391 | for (c=0; c<dof1; ++c) { |
392 | const PetscScalar val = TEST_FUNCTION(i,j,k,idxBackLeft,c); |
393 | if (arr[k][j][i][idxBackLeft+c] != val) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),393,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
394 | } |
395 | } else { |
396 | for (c=0; c<dof1; ++c) { |
397 | if (arr[k][j][i][idxBackLeft+c] != -1.0) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),397,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
398 | } |
399 | } |
400 | if (i < startx+nx) { |
401 | for (c=0; c<dof1; ++c) { |
402 | const PetscScalar val = TEST_FUNCTION(i,j,k,idxBackDown,c); |
403 | if (arr[k][j][i][idxBackDown+c] != val) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),403,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
404 | } |
405 | } else { |
406 | for (c=0; c<dof1; ++c) { |
407 | if (arr[k][j][i][idxBackDown+c] != -1.0) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),407,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
408 | } |
409 | } |
410 | if (j < starty+ny && k < startz+nz) { |
411 | for (c=0; c<dof2; ++c) { |
412 | const PetscScalar val = TEST_FUNCTION(i,j,k,idxLeft,c); |
413 | if (arr[k][j][i][idxLeft+c] != val) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),413,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
414 | } |
415 | } else { |
416 | for (c=0; c<dof2; ++c) { |
417 | if (arr[k][j][i][idxLeft+c] != -1.0) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),417,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
418 | } |
419 | } |
420 | if (i < startx+nx && k < startz+nz) { |
421 | for (c=0; c<dof2; ++c) { |
422 | const PetscScalar val = TEST_FUNCTION(i,j,k,idxDown,c); |
423 | if (arr[k][j][i][idxDown+c] != val) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),423,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
424 | } |
425 | } else { |
426 | for (c=0; c<dof2; ++c) { |
427 | if (arr[k][j][i][idxDown+c] != -1.0) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),427,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
428 | } |
429 | } |
430 | if (i < startx+nx && j < starty+ny) { |
431 | for (c=0; c<dof2; ++c) { |
432 | const PetscScalar val = TEST_FUNCTION(i,j,k,idxBack,c); |
433 | if (arr[k][j][i][idxBack+c] != val) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),433,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
434 | } |
435 | } else { |
436 | for (c=0; c<dof2; ++c) { |
437 | if (arr[k][j][i][idxBack+c] != -1.0) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),437,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
438 | } |
439 | } |
440 | if (i < startx+nx && j < starty+ny && k < startz+nz) { |
441 | for (c=0; c<dof3; ++c) { |
442 | const PetscScalar val = TEST_FUNCTION(i,j,k,idxElement,c); |
443 | if (arr[k][j][i][idxElement+c] != val) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),443,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
444 | } |
445 | } else { |
446 | for (c=0; c<dof3; ++c) { |
447 | if (arr[k][j][i][idxElement+c] != -1.0) SETERRQ(PetscObjectComm((PetscObject)dm),PETSC_ERR_PLIB,"Invalid value")return PetscError(PetscObjectComm((PetscObject)dm),447,__func__ ,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,77,PETSC_ERROR_INITIAL,"Invalid value"); |
448 | } |
449 | } |
450 | } |
451 | } |
452 | } |
453 | ierr = DMStagVecRestoreArrayDOFRead(dm,vecLocalCheck,&arr);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),453,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
454 | ierr = VecDestroy(&vecLocal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),454,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
455 | ierr = VecDestroy(&vecLocalCheck);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),455,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
456 | ierr = VecDestroy(&vecGlobal);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm )0x44000001),456,__func__,"/sandbox/petsc/petsc.next-tmp/src/dm/impls/stag/examples/tests/ex13.c" ,ierr,PETSC_ERROR_REPEAT," ");} while (0); |
457 | PetscFunctionReturn(0)do { do { ; if (petscstack && petscstack->currentsize > 0) { petscstack->currentsize--; petscstack->function [petscstack->currentsize] = 0; petscstack->file[petscstack ->currentsize] = 0; petscstack->line[petscstack->currentsize ] = 0; petscstack->petscroutine[petscstack->currentsize ] = PETSC_FALSE; } if (petscstack) { petscstack->hotdepth = (((petscstack->hotdepth-1)<(0)) ? (0) : (petscstack-> hotdepth-1)); } ; } while (0); return(0);} while (0); |
458 | } |
459 | #undef TEST_FUNCTION |
460 | |
461 | /*TEST |
462 | |
463 | testset: |
464 | suffix: periodic_1d_seq |
465 | nsize: 1 |
466 | args: -dm_view -dim 1 -stag_grid_x 4 -stag_boundary_type_x periodic -stag_stencil_width {{0 1 2}separate output} |
467 | |
468 | testset: |
469 | suffix: ghosted_1d_seq |
470 | nsize: 1 |
471 | args: -dm_view -dim 1 -stag_grid_x 4 -stag_boundary_type_x ghosted -stag_stencil_width {{0 1 2}separate output} |
472 | |
473 | testset: |
474 | suffix: none_1d_seq |
475 | nsize: 1 |
476 | args: -dm_view -dim 1 -stag_grid_x 4 -stag_boundary_type_x ghosted -stag_stencil_width {{0 1 2}separate output} |
477 | |
478 | testset: |
479 | suffix: periodic_1d_par |
480 | nsize: 3 |
481 | args: -dm_view -dim 1 -setsizes -stag_boundary_type_x periodic -stag_stencil_width {{0 1 2}separate output} |
482 | |
483 | testset: |
484 | suffix: ghosted_1d_par |
485 | nsize: 3 |
486 | args: -dm_view -dim 1 -setsizes -stag_boundary_type_x ghosted -stag_stencil_width {{0 1 2}separate output} |
487 | |
488 | testset: |
489 | suffix: none_1d_par |
490 | nsize: 3 |
491 | args: -dm_view -dim 1 -setsizes -stag_boundary_type_x ghosted -stag_stencil_width {{0 1 2}separate output} |
492 | |
493 | testset: |
494 | suffix: periodic_periodic_2d_seq |
495 | nsize: 1 |
496 | args: -dm_view -dim 2 -stag_grid_x 4 -stag_grid_y 5 -stag_boundary_type_x periodic -stag_boundary_type_y periodic -stag_stencil_width {{0 1 2}separate output} |
497 | |
498 | testset: |
499 | suffix: periodic_ghosted_2d_seq |
500 | nsize: 1 |
501 | args: -dm_view -dim 2 -stag_grid_x 4 -stag_grid_y 5 -stag_boundary_type_x periodic -stag_boundary_type_y ghosted -stag_stencil_width {{0 1 2}separate output} |
502 | |
503 | testset: |
504 | suffix: none_none_2d_seq |
505 | nsize: 1 |
506 | args: -dm_view -dim 2 -stag_grid_x 4 -stag_grid_y 5 -stag_boundary_type_x none -stag_boundary_type_y none -stag_stencil_width {{0 1 2}separate output} |
507 | |
508 | testset: |
509 | suffix: none_ghosted_2d_seq |
510 | nsize: 1 |
511 | args: -dm_view -dim 2 -stag_grid_x 4 -stag_grid_y 5 -stag_boundary_type_x none -stag_boundary_type_y ghosted -stag_stencil_width {{0 1 2}separate output} |
512 | |
513 | testset: |
514 | suffix: none_periodic_2d_seq |
515 | nsize: 1 |
516 | args: -dm_view -dim 2 -stag_grid_x 4 -stag_grid_y 5 -stag_boundary_type_x none -stag_boundary_type_y periodic -stag_stencil_width {{0 1 2}separate output} |
517 | |
518 | testset: |
519 | suffix: periodic_periodic_2d_par |
520 | nsize: 6 |
521 | args: -dm_view -dim 2 -setsizes -stag_boundary_type_x periodic -stag_boundary_type_y periodic -stag_stencil_width {{0 1 2}separate output} |
522 | |
523 | testset: |
524 | suffix: periodic_ghosted_2d_par |
525 | nsize: 6 |
526 | args: -dm_view -dim 2 -setsizes -stag_boundary_type_x periodic -stag_boundary_type_y ghosted -stag_stencil_width {{0 1 2}separate output} |
527 | |
528 | testset: |
529 | suffix: none_none_2d_par |
530 | nsize: 6 |
531 | args: -dm_view -dim 2 -setsizes -stag_boundary_type_x none -stag_boundary_type_y none -stag_stencil_width {{0 1 2}separate output} |
532 | |
533 | testset: |
534 | suffix: none_ghosted_2d_par |
535 | nsize: 6 |
536 | args: -dm_view -dim 2 -setsizes -stag_boundary_type_x none -stag_boundary_type_y ghosted -stag_stencil_width {{0 1 2}separate output} |
537 | |
538 | testset: |
539 | suffix: none_periodic_2d_par |
540 | nsize: 6 |
541 | args: -dm_view -dim 2 -setsizes -stag_boundary_type_x none -stag_boundary_type_y periodic -stag_stencil_width {{0 1 2}separate output} |
542 | |
543 | testset: |
544 | suffix: periodic_periodic_periodic_3d_seq |
545 | nsize: 1 |
546 | args: -dm_view -dim 3 -stag_grid_x 4 -stag_grid_y 5 -stag_grid_z 3 -stag_boundary_type_x periodic -stag_boundary_type_y periodic -stag_boundary_type_z periodic -stag_stencil_width {{0 1 2}separate output} |
547 | |
548 | testset: |
549 | suffix: periodic_ghosted_periodic_3d_seq |
550 | nsize: 1 |
551 | args: -dm_view -dim 3 -stag_grid_x 4 -stag_grid_y 5 -stag_grid_z 3 -stag_boundary_type_x periodic -stag_boundary_type_y ghosted -stag_boundary_type_z periodic -stag_stencil_width {{0 1 2}separate output} |
552 | |
553 | testset: |
554 | suffix: none_periodic_ghosted_3d_seq |
555 | nsize: 1 |
556 | args: -dm_view -dim 3 -stag_grid_x 4 -stag_grid_y 5 -stag_grid_z 3 -stag_boundary_type_x none -stag_boundary_type_y periodic -stag_boundary_type_z ghosted -stag_stencil_width {{0 1 2}separate output} |
557 | |
558 | testset: |
559 | suffix: none_none_none_3d_seq |
560 | nsize: 1 |
561 | args: -dm_view -dim 3 -stag_grid_x 4 -stag_grid_y 5 -stag_grid_z 3 -stag_boundary_type_x none -stag_boundary_type_y none -stag_boundary_type_z none -stag_stencil_width {{0 1 2}separate output} |
562 | |
563 | testset: |
564 | suffix: periodic_periodic_periodic_3d_par |
565 | nsize: 12 |
566 | args: -dm_view -dim 3 -setsizes -stag_boundary_type_x periodic -stag_boundary_type_y periodic -stag_boundary_type_z periodic -stag_stencil_width {{0 1 2}separate output} |
567 | |
568 | testset: |
569 | suffix: periodic_ghosted_ghosted_3d_par |
570 | nsize: 12 |
571 | args: -dm_view -dim 3 -setsizes -stag_boundary_type_x periodic -stag_boundary_type_y ghosted -stag_boundary_type_z ghosted -stag_stencil_width {{0 1 2}separate output} |
572 | |
573 | testset: |
574 | suffix: ghosted_periodic_periodic_3d_par |
575 | nsize: 12 |
576 | args: -dm_view -dim 3 -setsizes -stag_boundary_type_x ghosted -stag_boundary_type_y periodic -stag_boundary_type_z periodic -stag_stencil_width {{0 1 2}separate output} |
577 | |
578 | testset: |
579 | suffix: none_none_none_3d_par |
580 | nsize: 12 |
581 | args: -dm_view -dim 3 -setsizes -stag_boundary_type_x none -stag_boundary_type_y none -stag_boundary_type_z none -stag_stencil_width {{0 1 2}separate output} |
582 | |
583 | test: |
584 | suffix: periodic_none_none_3d_skinny_seq |
585 | nsize: 1 |
586 | args: -dm_view -dim 3 -stag_boundary_type_x periodic -stag_boundary_type_y none -stag_boundary_type_z none -stag_grid_x 3 -stag_grid_y 6 -stag_grid_z 5 -stag_stencil_width 1 -useinjective 0 |
587 | |
588 | test: |
589 | suffix: periodic_none_none_3d_skinny_par |
590 | nsize: 4 |
591 | args: -dm_view -dim 3 -stag_boundary_type_x periodic -stag_boundary_type_y none -stag_boundary_type_z none -stag_grid_x 3 -stag_grid_y 6 -stag_grid_z 5 -stag_ranks_x 1 -stag_ranks_y 2 -stag_ranks_z 2 -stag_stencil_width 1 -useinjective 0 |
592 | |
593 | TEST*/ |