File: slepcrg.h

package info (click to toggle)
slepc 3.24.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 122,028 kB
  • sloc: ansic: 104,353; javascript: 12,732; python: 5,958; f90: 3,312; cpp: 1,528; makefile: 761; xml: 679; sh: 347
file content (110 lines) | stat: -rw-r--r-- 4,239 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/*
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   SLEPc - Scalable Library for Eigenvalue Problem Computations
   Copyright (c) 2002-, Universitat Politecnica de Valencia, Spain

   This file is part of SLEPc.
   SLEPc is distributed under a 2-clause BSD license (see LICENSE).
   - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
/*
   User interface for the region object in SLEPc
*/

#pragma once

#include <slepcsys.h>
#include <slepcrgtypes.h>

/* SUBMANSEC = RG */

SLEPC_EXTERN PetscErrorCode RGInitializePackage(void);
SLEPC_EXTERN PetscErrorCode RGFinalizePackage(void);

/*J
   RGType - String with the name of the region type.

   Level: beginner

.seealso: [](sec:rg), `RG`, `RGSetType()`
J*/
typedef const char *RGType;
#define RGINTERVAL  "interval"
#define RGPOLYGON   "polygon"
#define RGELLIPSE   "ellipse"
#define RGRING      "ring"

/* Logging support */
SLEPC_EXTERN PetscClassId RG_CLASSID;

SLEPC_EXTERN PetscErrorCode RGCreate(MPI_Comm,RG*);
SLEPC_EXTERN PetscErrorCode RGSetType(RG,RGType);
SLEPC_EXTERN PetscErrorCode RGGetType(RG,RGType*);
SLEPC_EXTERN PetscErrorCode RGSetOptionsPrefix(RG,const char[]);
SLEPC_EXTERN PetscErrorCode RGAppendOptionsPrefix(RG,const char[]);
SLEPC_EXTERN PetscErrorCode RGGetOptionsPrefix(RG,const char*[]);
SLEPC_EXTERN PetscErrorCode RGSetFromOptions(RG);
SLEPC_EXTERN PetscErrorCode RGView(RG,PetscViewer);
SLEPC_EXTERN PetscErrorCode RGViewFromOptions(RG,PetscObject,const char[]);
SLEPC_EXTERN PetscErrorCode RGDestroy(RG*);

/*E
   RGQuadRule - Determines how to compute the quadrature parameters.

   Values:
+  `RG_QUADRULE_TRAPEZOIDAL` - use the trapezoidal rule
-  `RG_QUADRULE_CHEBYSHEV`   - use Chebyshev nodes and weights

   Level: advanced

.seealso: [](sec:rg), `RGComputeQuadrature()`
E*/
typedef enum { RG_QUADRULE_TRAPEZOIDAL = 1,
               RG_QUADRULE_CHEBYSHEV   = 2 } RGQuadRule;

/*MC
   RG_QUADRULE_TRAPEZOIDAL - In contour integral methods, use the trapezoidal rule.

   Level: advanced

.seealso: [](sec:rg), `RGQuadRule`, `RGComputeQuadrature()`, `RG_QUADRULE_CHEBYSHEV`
M*/

/*MC
   RG_QUADRULE_CHEBYSHEV - In contour integral methods, use Chebyshev nodes and weights.

   Level: advanced

.seealso: [](sec:rg), `RGQuadRule`, `RGComputeQuadrature()`, `RG_QUADRULE_TRAPEZOIDAL`
M*/

SLEPC_EXTERN PetscErrorCode RGIsTrivial(RG,PetscBool*);
SLEPC_EXTERN PetscErrorCode RGSetComplement(RG,PetscBool);
SLEPC_EXTERN PetscErrorCode RGGetComplement(RG,PetscBool*);
SLEPC_EXTERN PetscErrorCode RGSetScale(RG,PetscReal);
SLEPC_EXTERN PetscErrorCode RGGetScale(RG,PetscReal*);
SLEPC_EXTERN PetscErrorCode RGPushScale(RG,PetscReal);
SLEPC_EXTERN PetscErrorCode RGPopScale(RG);
SLEPC_EXTERN PetscErrorCode RGCheckInside(RG,PetscInt,PetscScalar[],PetscScalar[],PetscInt[]);
SLEPC_EXTERN PetscErrorCode RGIsAxisymmetric(RG,PetscBool,PetscBool*);
SLEPC_EXTERN PetscErrorCode RGCanUseConjugates(RG,PetscBool,PetscBool*);
SLEPC_EXTERN PetscErrorCode RGComputeContour(RG,PetscInt,PetscScalar[],PetscScalar[]);
SLEPC_EXTERN PetscErrorCode RGComputeBoundingBox(RG,PetscReal*,PetscReal*,PetscReal*,PetscReal*);
SLEPC_EXTERN PetscErrorCode RGComputeQuadrature(RG,RGQuadRule,PetscInt,PetscScalar[],PetscScalar[],PetscScalar[]);

SLEPC_EXTERN PetscFunctionList RGList;
SLEPC_EXTERN PetscErrorCode RGRegister(const char[],PetscErrorCode(*)(RG));

/* --------- options specific to particular regions -------- */

SLEPC_EXTERN PetscErrorCode RGEllipseSetParameters(RG,PetscScalar,PetscReal,PetscReal);
SLEPC_EXTERN PetscErrorCode RGEllipseGetParameters(RG,PetscScalar*,PetscReal*,PetscReal*);

SLEPC_EXTERN PetscErrorCode RGIntervalSetEndpoints(RG,PetscReal,PetscReal,PetscReal,PetscReal);
SLEPC_EXTERN PetscErrorCode RGIntervalGetEndpoints(RG,PetscReal*,PetscReal*,PetscReal*,PetscReal*);

SLEPC_EXTERN PetscErrorCode RGPolygonSetVertices(RG,PetscInt,PetscScalar[],PetscScalar[]);
SLEPC_EXTERN PetscErrorCode RGPolygonGetVertices(RG,PetscInt*,PetscScalar*[],PetscScalar*[]);

SLEPC_EXTERN PetscErrorCode RGRingSetParameters(RG,PetscScalar,PetscReal,PetscReal,PetscReal,PetscReal,PetscReal);
SLEPC_EXTERN PetscErrorCode RGRingGetParameters(RG,PetscScalar*,PetscReal*,PetscReal*,PetscReal*,PetscReal*,PetscReal*);