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

Actual source code: slepcfn.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: */

     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 FNCOMBINE  "combine"
     45: #define FNRATIONAL "rational"
     46: #define FNEXP      "exp"
     47: #define FNLOG      "log"
     48: #define FNPHI      "phi"
     49: #define FNSQRT     "sqrt"

     51: /* Logging support */
     52: PETSC_EXTERN PetscClassId FN_CLASSID;

     54: /*E
     55:     FNCombineType - Determines how two functions are combined

     57:     Level: advanced

     59: .seealso: FNCombineSetChildren()
     60: E*/
     61: typedef enum { FN_COMBINE_ADD,
     62:                FN_COMBINE_MULTIPLY,
     63:                FN_COMBINE_DIVIDE,
     64:                FN_COMBINE_COMPOSE } FNCombineType;

     66: PETSC_EXTERN PetscErrorCode FNCreate(MPI_Comm,FN*);
     67: PETSC_EXTERN PetscErrorCode FNSetType(FN,FNType);
     68: PETSC_EXTERN PetscErrorCode FNGetType(FN,FNType*);
     69: PETSC_EXTERN PetscErrorCode FNSetOptionsPrefix(FN,const char *);
     70: PETSC_EXTERN PetscErrorCode FNAppendOptionsPrefix(FN,const char *);
     71: PETSC_EXTERN PetscErrorCode FNGetOptionsPrefix(FN,const char *[]);
     72: PETSC_EXTERN PetscErrorCode FNSetFromOptions(FN);
     73: PETSC_EXTERN PetscErrorCode FNView(FN,PetscViewer);
     74: PETSC_EXTERN PetscErrorCode FNDestroy(FN*);
     75: PETSC_EXTERN PetscErrorCode FNDuplicate(FN,MPI_Comm,FN*);

     77: PETSC_EXTERN PetscErrorCode FNSetScale(FN,PetscScalar,PetscScalar);
     78: PETSC_EXTERN PetscErrorCode FNGetScale(FN,PetscScalar*,PetscScalar*);

     80: PETSC_EXTERN PetscErrorCode FNEvaluateFunction(FN,PetscScalar,PetscScalar*);
     81: PETSC_EXTERN PetscErrorCode FNEvaluateDerivative(FN,PetscScalar,PetscScalar*);
     82: PETSC_EXTERN PetscErrorCode FNEvaluateFunctionMat(FN,Mat,Mat);

     84: PETSC_EXTERN PetscFunctionList FNList;
     85: PETSC_EXTERN PetscErrorCode FNRegister(const char[],PetscErrorCode(*)(FN));

     87: /* --------- options specific to particular functions -------- */

     89: PETSC_EXTERN PetscErrorCode FNRationalSetNumerator(FN,PetscInt,PetscScalar*);
     90: PETSC_EXTERN PetscErrorCode FNRationalGetNumerator(FN,PetscInt*,PetscScalar**);
     91: PETSC_EXTERN PetscErrorCode FNRationalSetDenominator(FN,PetscInt,PetscScalar*);
     92: PETSC_EXTERN PetscErrorCode FNRationalGetDenominator(FN,PetscInt*,PetscScalar**);

     94: PETSC_EXTERN PetscErrorCode FNCombineSetChildren(FN,FNCombineType,FN,FN);
     95: PETSC_EXTERN PetscErrorCode FNCombineGetChildren(FN,FNCombineType*,FN*,FN*);

     97: PETSC_EXTERN PetscErrorCode FNPhiSetIndex(FN,PetscInt);
     98: PETSC_EXTERN PetscErrorCode FNPhiGetIndex(FN,PetscInt*);

    100: #endif