Bug Summary

File:ex36.c
Warning:line 144, column 5
Value stored to 'ierr' is never read

Annotated Source Code

[?] Use j/k keys for keyboard navigation

1static char help[] = "Tests interpolation and output of hybrid meshes\n\n";
2
3#include <petscdmplex.h>
4#include <petscsf.h>
5
6/* Much can be learned using
7 -rd_dm_view -rd2_dm_view -rd_section_view -rd_vec_view -rd2_section_view */
8
9static PetscErrorCode redistribute_vec(DM dist_dm, PetscSF sf, Vec *v)
10{
11 DM dm, dist_v_dm;
12 PetscSection section, dist_section;
13 Vec dist_v;
14 PetscMPIInt rank, size, p;
15 PetscErrorCode ierr;
16
17 PetscFunctionBegindo { do { ; if (petscstack && (petscstack->currentsize
< 64)) { petscstack->function[petscstack->currentsize
] = __func__; petscstack->file[petscstack->currentsize]
= "/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
; petscstack->line[petscstack->currentsize] = 17; petscstack
->petscroutine[petscstack->currentsize] = PETSC_TRUE; petscstack
->currentsize++; } if (petscstack) { petscstack->hotdepth
+= (PETSC_FALSE || petscstack->hotdepth); } ; } while (0)
; ; } while (0)
;
18 ierr = VecGetDM(*v, &dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),18,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
19 ierr = DMGetSection(dm, &section);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),19,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
20 ierr = DMViewFromOptions(dm, NULL((void*)0), "-rd_dm_view");CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),20,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
21 ierr = DMViewFromOptions(dist_dm, NULL((void*)0), "-rd2_dm_view");CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),21,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
22
23 ierr = DMClone(dm, &dist_v_dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),23,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
24 ierr = VecCreate(PetscObjectComm((PetscObject) *v), &dist_v);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),24,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
25 ierr = VecSetDM(dist_v, dist_v_dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),25,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
26 ierr = PetscSectionCreate(PetscObjectComm((PetscObject) *v), &dist_section);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),26,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
27 ierr = DMSetSection(dist_v_dm, dist_section);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),27,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
28
29 ierr = PetscObjectViewFromOptions((PetscObject) section, NULL((void*)0), "-rd_section_view");CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),29,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
30 ierr = MPI_Comm_rank(PetscObjectComm((PetscObject) dm), &rank);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),30,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
31 ierr = MPI_Comm_size(PetscObjectComm((PetscObject) dm), &size);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),31,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
32 for (p = 0; p < size; ++p) {
33 if (p == rank) {
34 ierr = PetscObjectViewFromOptions((PetscObject) *v, NULL((void*)0), "-rd_vec_view");CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),34,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;}
35 ierr = PetscBarrier((PetscObject) dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),35,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
36 ierr = PetscViewerFlush(PETSC_VIEWER_STDOUT_WORLDPETSC_VIEWER_STDOUT_(PETSC_COMM_WORLD));CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),36,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
37 }
38 ierr = DMPlexDistributeField(dm, sf, section, *v, dist_section, dist_v);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),38,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
39 for (p = 0; p < size; ++p) {
40 if (p == rank) {
41 ierr = PetscObjectViewFromOptions((PetscObject) dist_section, NULL((void*)0), "-rd2_section_view");CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),41,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
42 ierr = PetscObjectViewFromOptions((PetscObject) dist_v, NULL((void*)0), "-rd2_vec_view");CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),42,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
43 }
44 ierr = PetscBarrier((PetscObject) dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),44,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
45 ierr = PetscViewerFlush(PETSC_VIEWER_STDOUT_WORLDPETSC_VIEWER_STDOUT_(PETSC_COMM_WORLD));CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),45,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
46 }
47
48 ierr = PetscSectionDestroy(&dist_section);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),48,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
49 ierr = DMDestroy(&dist_v_dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),49,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
50
51 ierr = VecDestroy(v);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),51,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
52 *v = dist_v;
53 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)
;
54}
55
56static PetscErrorCode dm_view_geometry(DM dm, Vec cell_geom, Vec face_geom)
57{
58 DM cell_dm, face_dm;
59 PetscSection cell_section, face_section;
60 const PetscScalar *cell_array, *face_array;
61 const PetscInt *cells;
62 PetscInt c, start_cell, end_cell;
63 PetscInt f, start_face, end_face;
64 PetscInt supportSize, offset;
65 PetscMPIInt rank;
66 PetscErrorCode ierr;
67
68 PetscFunctionBegindo { do { ; if (petscstack && (petscstack->currentsize
< 64)) { petscstack->function[petscstack->currentsize
] = __func__; petscstack->file[petscstack->currentsize]
= "/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
; petscstack->line[petscstack->currentsize] = 68; petscstack
->petscroutine[petscstack->currentsize] = PETSC_TRUE; petscstack
->currentsize++; } if (petscstack) { petscstack->hotdepth
+= (PETSC_FALSE || petscstack->hotdepth); } ; } while (0)
; ; } while (0)
;
69 ierr = MPI_Comm_rank(PETSC_COMM_WORLD, &rank);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),69,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
70
71 /* cells */
72 ierr = DMPlexGetHeightStratum(dm, 0, &start_cell, &end_cell);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),72,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
73 ierr = VecGetDM(cell_geom, &cell_dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),73,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
74 ierr = DMGetSection(cell_dm, &cell_section);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),74,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
75 ierr = VecGetArrayRead(cell_geom, &cell_array);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),75,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
76
77 for (c = start_cell; c < end_cell; ++c) {
78 ierr = PetscSectionGetOffset(cell_section, c, &offset);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),78,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
79 ierr = PetscSynchronizedPrintf(PETSC_COMM_WORLD, "rank %d c %D centroid %g,%g,%g vol %g\n", rank, c, (double) PetscRealPart(cell_array[offset+0])(cell_array[offset+0]), (double) PetscRealPart(cell_array[offset+1])(cell_array[offset+1]), (double) PetscRealPart(cell_array[offset+2])(cell_array[offset+2]), (double) PetscRealPart(cell_array[offset+3])(cell_array[offset+3]));CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),79,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
80 }
81 ierr = PetscSynchronizedFlush(PETSC_COMM_WORLD, NULL((void*)0));CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),81,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
82 ierr = VecRestoreArrayRead(cell_geom, &cell_array);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),82,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
83
84 /* faces */
85 ierr = DMPlexGetHeightStratum(dm, 1, &start_face, &end_face);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),85,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
86 ierr = VecGetDM(face_geom, &face_dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),86,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
87 ierr = DMGetSection(face_dm, &face_section);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),87,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
88 ierr = VecGetArrayRead(face_geom, &face_array);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),88,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
89 for (f = start_face; f < end_face; ++f) {
90 ierr = DMPlexGetSupport(dm, f, &cells);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),90,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
91 ierr = DMPlexGetSupportSize(dm, f, &supportSize);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),91,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
92 if (supportSize > 1) {
93 ierr = PetscSectionGetOffset(face_section, f, &offset);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),93,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
94 ierr = PetscSynchronizedPrintf(PETSC_COMM_WORLD, "rank %d f %D cells %D,%D normal %g,%g,%g centroid %g,%g,%g\n", rank, f, cells[0], cells[1], (double) PetscRealPart(face_array[offset+0])(face_array[offset+0]), (double) PetscRealPart(face_array[offset+1])(face_array[offset+1]), (double) PetscRealPart(face_array[offset+2])(face_array[offset+2]), (double) PetscRealPart(face_array[offset+3])(face_array[offset+3]), (double) PetscRealPart(face_array[offset+4])(face_array[offset+4]), (double) PetscRealPart(face_array[offset+5])(face_array[offset+5]));CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),94,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
95 }
96 }
97 ierr = PetscSynchronizedFlush(PETSC_COMM_WORLD, NULL((void*)0));CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),97,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
98 ierr = VecRestoreArrayRead(cell_geom, &cell_array);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),98,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
99 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)
;
100}
101
102int main(int argc, char **argv)
103{
104 DM dm, dist_dm, redist_dm;
105 PetscPartitioner part;
106 PetscSF dist_sf, redist_sf;
107 Vec cell_geom, face_geom;
108 PetscInt overlap = 1, overlap2 = 1;
109 PetscMPIInt rank;
110 const char *filename = "gminc_1d.exo";
111 PetscErrorCode ierr;
112
113 ierr = PetscInitialize(&argc, &argv, NULL((void*)0), help); if (ierr) return ierr;
114 ierr = MPI_Comm_rank(PETSC_COMM_WORLD, &rank);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),114,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
115 if (0) {
116 ierr = DMPlexCreateFromFile(PETSC_COMM_WORLD, filename, PETSC_TRUE, &dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),116,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
117 } else {
118 ierr = DMPlexCreateBoxMesh(PETSC_COMM_WORLD, 3, PETSC_FALSE, NULL((void*)0), NULL((void*)0), NULL((void*)0), NULL((void*)0), PETSC_TRUE, &dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),118,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
119 }
120 ierr = DMSetBasicAdjacency(dm, PETSC_TRUE, PETSC_FALSE);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),120,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
121
122 ierr = DMPlexGetPartitioner(dm, &part);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),122,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
123 ierr = PetscPartitionerSetFromOptions(part);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),123,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
124 ierr = PetscOptionsGetInt(NULL((void*)0), NULL((void*)0), "-overlap", &overlap, NULL((void*)0));CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),124,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
125 ierr = DMPlexDistribute(dm, overlap, &dist_sf, &dist_dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),125,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
126 if (dist_dm) {
127 ierr = DMDestroy(&dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),127,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
128 dm = dist_dm;
129 }
130
131 ierr = DMPlexComputeGeometryFVM(dm, &cell_geom, &face_geom);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),131,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
132
133 ierr = dm_view_geometry(dm, cell_geom, face_geom);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),133,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
134
135 /* redistribute */
136 ierr = DMPlexGetPartitioner(dm, &part);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),136,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
137 ierr = PetscPartitionerSetFromOptions(part);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),137,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
138 ierr = PetscOptionsGetInt(NULL((void*)0), NULL((void*)0), "-overlap2", &overlap2, NULL((void*)0));CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),138,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
139 ierr = DMPlexDistribute(dm, overlap2, &redist_sf, &redist_dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),139,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
140 if (redist_dm) {
141 ierr = redistribute_vec(redist_dm, redist_sf, &cell_geom);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),141,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
142 ierr = redistribute_vec(redist_dm, redist_sf, &face_geom);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),142,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
143 ierr = PetscObjectViewFromOptions((PetscObject) redist_sf, NULL((void*)0), "-rd2_sf_view");CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),143,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
144 ierr = PetscPrintf(PETSC_COMM_WORLD, "redistributed:\n");
Value stored to 'ierr' is never read
145 ierr = dm_view_geometry(redist_dm, cell_geom, face_geom);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),145,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
146 }
147
148 ierr = VecDestroy(&cell_geom);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),148,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
149 ierr = VecDestroy(&face_geom);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),149,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
150 ierr = PetscSFDestroy(&dist_sf);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),150,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
151 ierr = PetscSFDestroy(&redist_sf);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),151,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
152 ierr = DMDestroy(&redist_dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),152,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
153 ierr = DMDestroy(&dm);CHKERRQ(ierr)do {if (__builtin_expect(!!(ierr),0)) return PetscError(((MPI_Comm
)0x44000001),153,__func__,"/sandbox/petsc/petsc.next/src/dm/impls/plex/examples/tests/ex36.c"
,ierr,PETSC_ERROR_REPEAT," ");} while (0)
;
154 ierr = PetscFinalize();
155 return ierr;
156}
157
158/*TEST
159
160 test:
161 suffix: 0
162 nsize: 3
163 args: -overlap 1 -overlap2 1 -dm_plex_box_faces 8,1,1 -petscpartitioner_type simple
164
165TEST*/