Actual source code: rgimpl.h
slepc-3.12.0 2019-09-30
1: /*
2: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
3: SLEPc - Scalable Library for Eigenvalue Problem Computations
4: Copyright (c) 2002-2019, 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: #if !defined(SLEPCRGIMPL_H)
12: #define SLEPCRGIMPL_H
14: #include <slepcrg.h>
15: #include <slepc/private/slepcimpl.h>
17: SLEPC_EXTERN PetscBool RGRegisterAllCalled;
18: SLEPC_EXTERN PetscErrorCode RGRegisterAll(void);
20: typedef struct _RGOps *RGOps;
22: struct _RGOps {
23: PetscErrorCode (*istrivial)(RG,PetscBool*);
24: PetscErrorCode (*computecontour)(RG,PetscInt,PetscScalar*,PetscScalar*);
25: PetscErrorCode (*computebbox)(RG,PetscReal*,PetscReal*,PetscReal*,PetscReal*);
26: PetscErrorCode (*checkinside)(RG,PetscReal,PetscReal,PetscInt*);
27: PetscErrorCode (*setfromoptions)(PetscOptionItems*,RG);
28: PetscErrorCode (*view)(RG,PetscViewer);
29: PetscErrorCode (*destroy)(RG);
30: };
32: struct _p_RG {
33: PETSCHEADER(struct _RGOps);
34: PetscBool complement; /* region is the complement of the specified one */
35: PetscReal sfactor; /* scaling factor */
36: PetscReal osfactor; /* old scaling factor, before RGPushScale */
37: void *data;
38: };
40: /* show an inf instead of PETSC_MAX_REAL */
41: #define RGShowReal(r) (double)((PetscAbsReal(r)>=PETSC_MAX_REAL)?10*(r):(r))
43: #endif