[petsc-dev] sor smoothers

Jed Brown jedbrown at mcs.anl.gov
Thu Sep 12 18:39:36 CDT 2013


Barry Smith <bsmith at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130912/eb3ca72b/attachment.sig>


More information about the petsc-dev mailing list