Date: 2013-09-02T10:10:27+00:00

Actual source code: slepcfn.h

      1: /*
      2:    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      3:    SLEPc - Scalable Library for Eigenvalue Problem Computations
      4:    Copyright (c) 2002-2013, 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: */

     24: #include <slepcsys.h>

     26: PETSC_EXTERN PetscErrorCode FNInitializePackage(void);
     27: /*S
     28:    FN - Abstraction of a mathematical function.

     30:    Level: beginner

     32: .seealso: FNCreate()
     33: S*/
     34: typedef struct _p_FN* FN;

     36: /*J
     37:    FNType - String with the name of the mathematical function.

     39:    Level: beginner

     41: .seealso: FNSetType(), FN
     42: J*/
     43: typedef const char* FNType;
     44: #define FNRATIONAL "rational"
     45: #define FNEXP      "exp"
     46: #define FNLOG      "log"
     47: #define FNPHI      "phi"

     49: /* Logging support */
     50: PETSC_EXTERN PetscClassId FN_CLASSID;

     52: PETSC_EXTERN PetscErrorCode FNCreate(MPI_Comm,FN*);
     53: PETSC_EXTERN PetscErrorCode FNSetType(FN,FNType);
     54: PETSC_EXTERN PetscErrorCode FNGetType(FN,FNType*);
     55: PETSC_EXTERN PetscErrorCode FNSetOptionsPrefix(FN,const char *);
     56: PETSC_EXTERN PetscErrorCode FNAppendOptionsPrefix(FN,const char *);
     57: PETSC_EXTERN PetscErrorCode FNGetOptionsPrefix(FN,const char *[]);
     58: PETSC_EXTERN PetscErrorCode FNSetFromOptions(FN);
     59: PETSC_EXTERN PetscErrorCode FNView(FN,PetscViewer);
     60: PETSC_EXTERN PetscErrorCode FNDestroy(FN*);

     62: PETSC_EXTERN PetscErrorCode FNSetParameters(FN,PetscInt,PetscScalar*,PetscInt,PetscScalar*);
     63: PETSC_EXTERN PetscErrorCode FNGetParameters(FN,PetscInt*,PetscScalar**,PetscInt*,PetscScalar**);

     65: PETSC_EXTERN PetscErrorCode FNEvaluateFunction(FN,PetscScalar,PetscScalar*);
     66: PETSC_EXTERN PetscErrorCode FNEvaluateDerivative(FN,PetscScalar,PetscScalar*);

     68: PETSC_EXTERN PetscFunctionList FNList;
     69: PETSC_EXTERN PetscBool         FNRegisterAllCalled;
     70: PETSC_EXTERN PetscErrorCode FNRegisterAll(void);
     71: PETSC_EXTERN PetscErrorCode FNRegister(const char[],PetscErrorCode(*)(FN));

     73: #endif