Barry Smith <bsm...@mcs.anl.gov> 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.

Attachment: pgpbno6TPvOYQ.pgp
Description: PGP signature

Reply via email to