1: #include <petscsys.h> 3: /*@C 4: PetscEqualReal - Returns whether the two real values are equal. 6: Input Parameter: 7: + a - first real number 8: - b - second real number 10: Notes: Equivalent to "a == b". Should be used to prevent compilers from 11: emitting floating point comparison warnings (e.g. GCC's -Wfloat-equal flag) 12: in PETSc header files or user code. 14: Level: developer 15: @*/ 16: PetscBool PetscEqualReal(PetscReal a,PetscReal b) 17: { 18: return (a == b) ? PETSC_TRUE : PETSC_FALSE; 19: } 21: /*@C 22: PetscEqualScalar - Returns whether the two scalar values are equal. 24: Input Parameter: 25: + a - first scalar value 26: - b - second scalar value 28: Notes: Equivalent to "a == b". Should be used to prevent compilers from 29: emitting floating point comparison warnings (e.g. GCC's -Wfloat-equal flag) 30: in PETSc header files or user code. 32: Level: developer 33: @*/ 34: PetscBool PetscEqualScalar(PetscScalar a,PetscScalar b) 35: { 36: return (a == b) ? PETSC_TRUE : PETSC_FALSE; 37: }