1 #include <petsc/private/viewerimpl.h>
2
testValidLogicalCollective(PetscInt a,PetscMPIInt b,PetscInt c,PetscBool d,PetscScalar e,PetscReal f)3 PetscErrorCode testValidLogicalCollective(PetscInt a, PetscMPIInt b, PetscInt c, PetscBool d, PetscScalar e, PetscReal f)
4 {
5 PetscViewer v; /* dummy variable to satisfy the PetscObject for the following */
6
7 /* incorrect */
8 PetscValidLogicalCollectiveInt(v, d, 2);
9 PetscValidLogicalCollectiveEnum(v, e, 3);
10 PetscValidLogicalCollectiveMPIInt(v, f, 4);
11 PetscValidLogicalCollectiveScalar(v, a, 5);
12 PetscValidLogicalCollectiveReal(v, b, 6);
13 PetscValidLogicalCollectiveEnum(v, c, 7);
14
15 /* correct */
16 PetscValidLogicalCollectiveInt(v, a, 1);
17 PetscValidLogicalCollectiveMPIInt(v, b, 2);
18 PetscValidLogicalCollectiveInt(v, c, 3);
19 PetscValidLogicalCollectiveBool(v, d, 4);
20 PetscValidLogicalCollectiveScalar(v, e, 5);
21 PetscValidLogicalCollectiveReal(v, f, 6);
22 return 0;
23 }
24