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