1 #include <petscsys.h> 2 3 void testValidLogicalCollective(PetscInt a, PetscMPIInt b, PetscInt64 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; 23 } 24