v0.13.1
Loading...
Searching...
No Matches
DeprecatedPetsc.hpp
Go to the documentation of this file.
1/** \file DeprecatedPetsc.hpp
2 * \brief Deprecated PETSc functions
3 */
4
5
6
7#ifndef __DEPRECATED_PETSC_HPP__
8#define __DEPRECATED_PETSC_HPP__
9
10namespace MoFEM {
11
12#if PETSC_VERSION_GE(3, 7, 0)
13
14/**
15\deprecated Function is deprecated use function
16http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsGetInt.html>
17*/
18inline PetscErrorCode PetscOptionsGetInt(const char pre[], const char name[],
19 PetscInt *ivalue, PetscBool *set) {
20 PetscErrorCode ierr;
22 ierr = ::PetscOptionsGetInt(PETSC_NULL, pre, name, ivalue, set);
23 CHKERRQ(ierr);
25}
26
27/**
28\deprecated Function is deprecated use function
29http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsGetReal.html>
30*/
31inline PetscErrorCode PetscOptionsGetReal(const char pre[], const char name[],
32 PetscReal *dval, PetscBool *set) {
33 PetscErrorCode ierr;
35 ierr = ::PetscOptionsGetReal(PETSC_NULL, pre, name, dval, set);
36 CHKERRQ(ierr);
38}
39
40/**
41\deprecated Function is deprecated use function
42http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsGetScalar.html>
43*/
44inline PetscErrorCode PetscOptionsGetScalar(const char pre[], const char name[],
45 PetscScalar *dval, PetscBool *set) {
46 PetscErrorCode ierr;
48 ierr = ::PetscOptionsGetScalar(PETSC_NULL, pre, name, dval, set);
49 CHKERRQ(ierr);
51}
52
53/**
54\deprecated Function is deprecated use function
55http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsGetString.html>
56*/
57inline PetscErrorCode PetscOptionsGetString(const char pre[], const char name[],
58 char str[], size_t size,
59 PetscBool *set) {
61 ierr = ::PetscOptionsGetString(PETSC_NULL, pre, name, str, size, set);
62 CHKERRQ(ierr);
64}
65
66/**
67\deprecated Function is deprecated
68usectiontp://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsGetBool.html>
69*/
70inline PetscErrorCode PetscOptionsGetBool(const char pre[], const char name[],
71 PetscBool *bval, PetscBool *set) {
72 PetscErrorCode ierr;
74 ierr = ::PetscOptionsGetBool(PETSC_NULL, pre, name, bval, set);
75 CHKERRQ(ierr);
77}
78
79/**
80\deprecated Function is deprecated
81usectiontp://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsGetRealArray.html>
82*/
83inline PetscErrorCode PetscOptionsGetRealArray(const char pre[],
84 const char name[],
85 PetscReal dval[], PetscInt *nmax,
86 PetscBool *set) {
87 PetscErrorCode ierr;
89 ierr = ::PetscOptionsGetRealArray(PETSC_NULL, pre, name, dval, nmax, set);
90 CHKERRQ(ierr);
92}
93
94/**
95\deprecated Function is deprecated
96usectiontp://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsGetEList.html>
97*/
98inline PetscErrorCode PetscOptionsGetEList(const char pre[], const char name[],
99 const char *const *list,
100 PetscInt next, PetscInt *value,
101 PetscBool *set) {
102 PetscErrorCode ierr;
104 ierr = ::PetscOptionsGetEList(PETSC_NULL, pre, name, list, next, value, set);
105 CHKERRQ(ierr);
107}
108
109/**
110\deprecated Function is deprecated
111usectiontp://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsGetIntArray.html>
112*/
113inline PetscErrorCode PetscOptionsGetIntArray(const char pre[],
114 const char name[],
115 PetscInt dvalue[], PetscInt *nmax,
116 PetscBool *set) {
117 PetscErrorCode ierr;
119 ierr = ::PetscOptionsGetIntArray(PETSC_NULL, pre, name, dvalue, nmax, set);
120 CHKERRQ(ierr);
122}
123
124/**
125 *\deprecated Function is deprecated
126 *usectiontp://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsGetScalarArray.html>
127 */
128inline PetscErrorCode PetscOptionsGetScalarArray(const char pre[],
129 const char name[],
130 PetscScalar dvalue[],
131 PetscInt *nmax,
132 PetscBool *set) {
133 PetscErrorCode ierr;
135 ierr = ::PetscOptionsGetScalarArray(PETSC_NULL, pre, name, dvalue, nmax, set);
136 CHKERRQ(ierr);
138}
139
140#else
141
142inline PetscErrorCode PetscOptionsGetInt(PetscOptions *, const char pre[],
143 const char name[], PetscInt *ivalue,
144 PetscBool *set) {
145 PetscErrorCode ierr;
147 ierr = ::PetscOptionsGetInt(pre, name, ivalue, set);
148 CHKERRQ(ierr);
150}
151
152inline PetscErrorCode PetscOptionsGetReal(PetscOptions *, const char pre[],
153 const char name[], PetscReal *dval,
154 PetscBool *set) {
155 PetscErrorCode ierr;
157 ierr = ::PetscOptionsGetReal(pre, name, dval, set);
158 CHKERRQ(ierr);
160}
161
162inline PetscErrorCode PetscOptionsGetScalar(PetscOptions *, const char pre[],
163 const char name[],
164 PetscScalar *dval, PetscBool *set) {
165 PetscErrorCode ierr;
167 ierr = ::PetscOptionsGetScalar(pre, name, dval, set);
168 CHKERRQ(ierr);
170}
171
172inline PetscErrorCode PetscOptionsGetString(PetscOptions *, const char pre[],
173 const char name[], char str[],
174 size_t size, PetscBool *set) {
175 PetscErrorCode ierr;
177 ierr = ::PetscOptionsGetString(pre, name, str, size, set);
178 CHKERRQ(ierr);
180}
181
182inline PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[],
183 const char name[], PetscBool *bval,
184 PetscBool *set) {
185 PetscErrorCode ierr;
187 ierr = ::PetscOptionsGetBool(pre, name, bval, set);
188 CHKERRQ(ierr);
190}
191
192inline PetscErrorCode PetscOptionsGetRealArray(PetscOptions *, const char pre[],
193 const char name[],
194 PetscReal dval[], PetscInt *nmax,
195 PetscBool *set) {
196 PetscErrorCode ierr;
198 ierr = ::PetscOptionsGetRealArray(pre, name, dval, nmax, set);
199 CHKERRQ(ierr);
201}
202
203inline PetscErrorCode PetscOptionsGetEList(PetscOptions *, const char pre[],
204 const char name[],
205 const char *const *list,
206 PetscInt next, PetscInt *value,
207 PetscBool *set) {
208 PetscErrorCode ierr;
210 ierr = ::PetscOptionsGetEList(pre, name, list, next, value, set);
211 CHKERRQ(ierr);
213}
214
215inline PetscErrorCode PetscOptionsGetIntArray(PetscOptions options,
216 const char pre[],
217 const char name[],
218 PetscInt dvalue[], PetscInt *nmax,
219 PetscBool *set) {
220 PetscErrorCode ierr;
222 ierr = ::PetscOptionsGetIntArray(pre, name, dvalue, nmax, set);
223 CHKERRQ(ierr);
225}
226
227inline PetscErrorCode
228PetscOptionsGetScalarArray(PetscOptions options, const char pre[],
229 const char name[], PetscScalar dvalue[],
230 PetscInt *nmax, PetscBool *set) {
231 PetscErrorCode ierr;
233 ierr = ::PetscOptionsGetScalarArray(pre, name, dvalue, nmax, set);
234 CHKERRQ(ierr);
236}
237
238#endif
239
240} // namespace MoFEM
241
242#endif //__DEPRECATED_PETSC_HPP__
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440
static MoFEMErrorCodeGeneric< PetscErrorCode > ierr
Definition: Exceptions.hpp:76
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
PetscErrorCode PetscOptionsGetIntArray(PetscOptions options, const char pre[], const char name[], PetscInt dvalue[], PetscInt *nmax, PetscBool *set)
PetscErrorCode PetscOptionsGetInt(PetscOptions *, const char pre[], const char name[], PetscInt *ivalue, PetscBool *set)
PetscErrorCode PetscOptionsGetReal(PetscOptions *, const char pre[], const char name[], PetscReal *dval, PetscBool *set)
PetscErrorCode PetscOptionsGetScalarArray(PetscOptions options, const char pre[], const char name[], PetscScalar dvalue[], PetscInt *nmax, PetscBool *set)
PetscErrorCode PetscOptionsGetBool(PetscOptions *, const char pre[], const char name[], PetscBool *bval, PetscBool *set)
PetscErrorCode PetscOptionsGetScalar(PetscOptions *, const char pre[], const char name[], PetscScalar *dval, PetscBool *set)
PetscErrorCode PetscOptionsGetRealArray(PetscOptions *, const char pre[], const char name[], PetscReal dval[], PetscInt *nmax, PetscBool *set)
PetscErrorCode PetscOptionsGetEList(PetscOptions *, const char pre[], const char name[], const char *const *list, PetscInt next, PetscInt *value, PetscBool *set)
PetscErrorCode PetscOptionsGetString(PetscOptions *, const char pre[], const char name[], char str[], size_t size, PetscBool *set)