Date: 2024-04-26T10:22:33+00:00

Actual source code: pepregis.c
slepc-3.21.1 2024-04-26
Report Typos and Errors

      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/pepimpl.h>

     13: SLEPC_EXTERN PetscErrorCode PEPCreate_Linear(PEP);
     14: SLEPC_EXTERN PetscErrorCode PEPCreate_QArnoldi(PEP);
     15: SLEPC_EXTERN PetscErrorCode PEPCreate_TOAR(PEP);
     16: SLEPC_EXTERN PetscErrorCode PEPCreate_STOAR(PEP);
     17: SLEPC_EXTERN PetscErrorCode PEPCreate_JD(PEP);
     18: #if defined(PETSC_USE_COMPLEX)
     19: SLEPC_EXTERN PetscErrorCode PEPCreate_CISS(PEP);
     20: #endif

     22: /*@C
     23:    PEPRegisterAll - Registers all the solvers in the PEP package.

     25:    Not Collective

     27:    Level: advanced

     29: .seealso: PEPRegister()
     30: @*/
     31: PetscErrorCode PEPRegisterAll(void)
     32: {
     33:   PetscFunctionBegin;
     34:   if (PEPRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS);
     35:   PEPRegisterAllCalled = PETSC_TRUE;
     36:   PetscCall(PEPRegister(PEPLINEAR,PEPCreate_Linear));
     37:   PetscCall(PEPRegister(PEPQARNOLDI,PEPCreate_QArnoldi));
     38:   PetscCall(PEPRegister(PEPTOAR,PEPCreate_TOAR));
     39:   PetscCall(PEPRegister(PEPSTOAR,PEPCreate_STOAR));
     40:   PetscCall(PEPRegister(PEPJD,PEPCreate_JD));
     41: #if defined(PETSC_USE_COMPLEX)
     42:   PetscCall(PEPRegister(PEPCISS,PEPCreate_CISS));
     43: #endif
     44:   PetscFunctionReturn(PETSC_SUCCESS);
     45: }

     47: /*@C
     48:   PEPMonitorRegisterAll - Registers all the monitors in the PEP package.

     50:   Not Collective

     52:   Level: advanced

     54: .seealso: PEPMonitorRegister()
     55: @*/
     56: PetscErrorCode PEPMonitorRegisterAll(void)
     57: {
     58:   PetscFunctionBegin;
     59:   if (PEPMonitorRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS);
     60:   PEPMonitorRegisterAllCalled = PETSC_TRUE;

     62:   PetscCall(PEPMonitorRegister("first_approximation",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,PEPMonitorFirst,NULL,NULL));
     63:   PetscCall(PEPMonitorRegister("first_approximation",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,PEPMonitorFirstDrawLG,PEPMonitorFirstDrawLGCreate,NULL));
     64:   PetscCall(PEPMonitorRegister("all_approximations",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,PEPMonitorAll,NULL,NULL));
     65:   PetscCall(PEPMonitorRegister("all_approximations",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,PEPMonitorAllDrawLG,PEPMonitorAllDrawLGCreate,NULL));
     66:   PetscCall(PEPMonitorRegister("convergence_history",PETSCVIEWERASCII,PETSC_VIEWER_DEFAULT,PEPMonitorConverged,PEPMonitorConvergedCreate,PEPMonitorConvergedDestroy));
     67:   PetscCall(PEPMonitorRegister("convergence_history",PETSCVIEWERDRAW,PETSC_VIEWER_DRAW_LG,PEPMonitorConvergedDrawLG,PEPMonitorConvergedDrawLGCreate,PEPMonitorConvergedDestroy));
     68:   PetscFunctionReturn(PETSC_SUCCESS);
     69: }