Date: 2026-01-20T11:35:30+00:00

Actual source code: fnregis.c

      1: /*
      2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
      4:    Copyright (c) 2002-, Universitat Politecnica de Valencia, Spain

      6:    This file is part of SLEPc.
      7:    SLEPc is distributed under a 2-clause BSD license (see LICENSE).
      8:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      9: */

     11: #include <slepc/private/fnimpl.h>

     13: SLEPC_EXTERN PetscErrorCode FNCreate_Combine(FN);
     14: SLEPC_EXTERN PetscErrorCode FNCreate_Rational(FN);
     15: SLEPC_EXTERN PetscErrorCode FNCreate_Exp(FN);
     16: SLEPC_EXTERN PetscErrorCode FNCreate_Log(FN);
     17: SLEPC_EXTERN PetscErrorCode FNCreate_Phi(FN);
     18: SLEPC_EXTERN PetscErrorCode FNCreate_Sqrt(FN);
     19: SLEPC_EXTERN PetscErrorCode FNCreate_Invsqrt(FN);

     21: /*@C
     22:    FNRegisterAll - Registers all of the math functions in the `FN` package.

     24:    Not Collective

     26:    Level: advanced

     28: .seealso: [](sec:fn), `FNRegister()`
     29: @*/
     30: PetscErrorCode FNRegisterAll(void)
     31: {
     32:   PetscFunctionBegin;
     33:   if (FNRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS);
     34:   FNRegisterAllCalled = PETSC_TRUE;
     35:   PetscCall(FNRegister(FNCOMBINE,FNCreate_Combine));
     36:   PetscCall(FNRegister(FNRATIONAL,FNCreate_Rational));
     37:   PetscCall(FNRegister(FNEXP,FNCreate_Exp));
     38:   PetscCall(FNRegister(FNLOG,FNCreate_Log));
     39:   PetscCall(FNRegister(FNPHI,FNCreate_Phi));
     40:   PetscCall(FNRegister(FNSQRT,FNCreate_Sqrt));
     41:   PetscCall(FNRegister(FNINVSQRT,FNCreate_Invsqrt));
     42:   PetscFunctionReturn(PETSC_SUCCESS);
     43: }