Date: 2016-03-29T14:59:43+00:00

Actual source code: slepcimpl.h
slepc-3.6.3 2016-03-29
Report Typos and Errors

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

      6:    This file is part of SLEPc.

      8:    SLEPc is free software: you can redistribute it and/or modify it under  the
      9:    terms of version 3 of the GNU Lesser General Public License as published by
     10:    the Free Software Foundation.

     12:    SLEPc  is  distributed in the hope that it will be useful, but WITHOUT  ANY
     13:    WARRANTY;  without even the implied warranty of MERCHANTABILITY or  FITNESS
     14:    FOR  A  PARTICULAR PURPOSE. See the GNU Lesser General Public  License  for
     15:    more details.

     17:    You  should have received a copy of the GNU Lesser General  Public  License
     18:    along with SLEPc. If not, see <http://www.gnu.org/licenses/>.
     19:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     20: */

     22: #if !defined(_SLEPCIMPL)
     23: #define _SLEPCIMPL

     25: #include <slepcsys.h>
     26: #include <petsc/private/petscimpl.h>

     28: PETSC_INTERN PetscBool SlepcBeganPetsc;

     30: /*@C
     31:     SlepcHeaderCreate - Creates a SLEPc object

     33:     Input Parameters:
     34: +   classid - the classid associated with this object
     35: .   class_name - string name of class; should be static
     36: .   descr - string containing short description; should be static
     37: .   mansec - string indicating section in manual pages; should be static
     38: .   comm - the MPI Communicator
     39: .   destroy - the destroy routine for this object
     40: -   view - the view routine for this object

     42:     Output Parameter:
     43: .   h - the newly created object

     45:     Note:
     46:     This is equivalent to PetscHeaderCreate but makes sure that SlepcInitialize
     47:     has been called.

     49:     Level: developer
     50: @*/
     51: #define SlepcHeaderCreate(h,classid,class_name,descr,mansec,comm,destroy,view) \
     52:     ((!SlepcInitializeCalled && \
     53:     PetscError(comm,__LINE__,PETSC_FUNCTION_NAME,__FILE__,1,PETSC_ERROR_INITIAL, \
     54:     "Must call SlepcInitialize instead of PetscInitialize to use SLEPc classes")) ||  \
     55:     PetscHeaderCreate(h,classid,class_name,descr,mansec,comm,destroy,view))

     57: /* context for monitors of type XXXMonitorConverged */
     58: struct _n_SlepcConvMonitor {
     59:   PetscViewer viewer;
     60:   PetscInt    oldnconv;
     61: };
     62: typedef struct _n_SlepcConvMonitor* SlepcConvMonitor;

     64: /* Private functions that are shared by several classes */
     65: PETSC_EXTERN PetscErrorCode SlepcConvMonitorDestroy(SlepcConvMonitor*);

     67: PETSC_EXTERN PetscErrorCode SlepcBasisReference_Private(PetscInt,Vec*,PetscInt*,Vec**);
     68: PETSC_EXTERN PetscErrorCode SlepcBasisDestroy_Private(PetscInt*,Vec**);

     70: PETSC_INTERN PetscErrorCode SlepcCitationsInitialize(void);
     71: PETSC_INTERN PetscErrorCode SlepcInitialize_DynamicLibraries(void);
     72: PETSC_INTERN PetscErrorCode SlepcInitialize_Packages(void);

     74: #endif