No system is perfect. I was just pointing out that the model we selected was dictated by one particularly bad fortran compiler design decision and atheistically I don't like it. I was not proposing a change.
On Sep 12, 2013, at 6:39 PM, Jed Brown <[email protected]> wrote: > Barry Smith <[email protected]> writes: > >> My solution was that the those "defaults" would not be in the public >> interface :-) > > Fine, get rid of all of these: > > $ git grep '[a-z]Default(' include/*.h > > include/petscerror.h:PETSC_EXTERN PetscErrorCode > PetscSignalHandlerDefault(int,void*); > include/petscksp.h:PETSC_EXTERN PetscErrorCode > KSPBuildSolutionDefault(KSP,Vec,Vec*); > include/petscksp.h:PETSC_EXTERN PetscErrorCode > KSPBuildResidualDefault(KSP,Vec,Vec,Vec *); > include/petscksp.h:PETSC_EXTERN PetscErrorCode KSPDestroyDefault(KSP); > include/petscksp.h:PETSC_EXTERN PetscErrorCode > KSPMonitorDefault(KSP,PetscInt,PetscReal,void *); > include/petscksp.h:PETSC_EXTERN PetscErrorCode > KSPLSQRMonitorDefault(KSP,PetscInt,PetscReal,void *); > include/petscksp.h:PETSC_EXTERN PetscErrorCode > KSPConvergedDefault(KSP,PetscInt,PetscReal,KSPConvergedReason*,void *); > include/petscksp.h:PETSC_DEPRECATED("Use KSPConvergedDefault()") > PETSC_STATIC_INLINE void KSPDefaultConverged(void) { /* never called */ } > include/petscoptions.h:PETSC_EXTERN PetscErrorCode > PetscOptionsMonitorDefault(const char[], const char[], void *); > include/petscpc.h:PETSC_EXTERN PetscErrorCode > PCMGResidualDefault(Mat,Vec,Vec,Vec); > include/petscsnes.h:PETSC_EXTERN PetscErrorCode > SNESMonitorDefault(SNES,PetscInt,PetscReal,void *); > include/petscsnes.h:PETSC_EXTERN PetscErrorCode > SNESConvergedDefault(SNES,PetscInt,PetscReal,PetscReal,PetscReal,SNESConvergedReason*,void*); > include/petscsnes.h:PETSC_EXTERN PetscErrorCode > SNESComputeJacobianDefault(SNES,Vec,Mat*,Mat*,MatStructure*,void*); > include/petscsys.h:PETSC_EXTERN PetscErrorCode > PetscVFPrintfDefault(FILE*,const char[],va_list); > include/petscsys.h:PETSC_EXTERN PetscErrorCode PetscErrorPrintfDefault(const > char [],...); > include/petscsys.h:PETSC_EXTERN PetscErrorCode > PetscHelpPrintfDefault(MPI_Comm,const char [],...); > include/petscts.h:PETSC_EXTERN PetscErrorCode > TSMonitorDefault(TS,PetscInt,PetscReal,Vec,void*); > include/petscts.h:PETSC_EXTERN PetscErrorCode > TSPseudoTimeStepDefault(TS,PetscReal*,void*); > include/petscts.h:PETSC_EXTERN PetscErrorCode > TSPseudoVerifyTimeStepDefault(TS,Vec,void*,PetscReal*,PetscBool *); > include/petscts.h:PETSC_EXTERN PetscErrorCode > TSAlphaAdaptDefault(TS,PetscReal,Vec,Vec,PetscReal*,PetscBool*,void*); > > > Note that removing the default would make it impossible to "reset" one > of these functions after some user chose a non-default callback. > >> I know, I know you have some reason to have them be in the public >> interface. But it is not a good enough reason to have function >> names that are not "natural" :-) > > You added many of those functions and you renamed a bunch of them > recently.
