@@ -182,23 +182,70 @@ Allowable Method Families
182
182
183
183
.. c :function :: int LSRKStepSetDomEigFn (void* arkode_mem, ARKDomEigFn dom_eig);
184
184
185
- Specifies the dominant eigenvalue approximation routine to
185
+ Specifies the user-supplied dominant eigenvalue approximation routine to
186
186
be used for determining the number of stages that will be used by either the
187
- RKC or RKL methods.
187
+ RKC or RKL methods. ``dom_eig = NULL `` input creates internal SUNDIALS Dominant
188
+ Eigenvalue Estimator (DEE) to serve this goal.
188
189
189
190
**Arguments: **
190
191
* *arkode_mem * -- pointer to the LSRKStep memory block.
191
192
* *dom_eig * -- name of user-supplied dominant eigenvalue approximation function (of type :c:func: `ARKDomEigFn() `).
192
193
193
194
**Return value: **
194
195
* *ARK_SUCCESS * if successful
195
- * *ARKLS_MEM_NULL * if ``arkode_mem `` was ``NULL ``.
196
- * *ARK_ILL_INPUT * ``dom_eig = NULL `` and LSRKStep does not currently estimate this internally .
196
+ * *ARK_MEM_NULL * if ``arkode_mem `` was ``NULL ``.
197
+ * *ARK_DEE_FAIL * if ``dom_eig = NULL `` and DEE failed .
197
198
198
199
.. note ::
199
200
200
201
This function is currently required when either the RKC or RKL methods are used.
201
202
203
+ .. note :: *ARK_DEE_FAIL* return should also produce error messages due to DEE error(s). These errors
204
+ are handled by :c:type: `SUNErrCode `.
205
+
206
+ Either this function or the DEE creator function, :c:func: `LSRKStepSetDomEigEstimator ` is required
207
+ when either the RKC or RKL methods are used.
208
+
209
+ :c:func: `LSRKStepSetDomEigFn ` expects a user-provided spectral radius function pointer of type
210
+ :c:func: `ARKDomEigFn() `.
211
+
212
+ Note that although a DEE creation routine requires :c:func: `SUNDomEigEst_SetATimes ` with a valid
213
+ matrix-vector product function pointer, creating a DEE with :c:func: `LSRKStepSetDomEigFn `
214
+ uses an internal Jacobian-vector product estimation that is passed with the *arkode_mem * pointer.
215
+ Similarly, it estimates the eigenvalue as needed internally without requiring a call to
216
+ :c:func: `SUNDomEig_Estimate `.
217
+
218
+
219
+ .. c :function :: int LSRKStepSetDomEigEstimator (void* arkode_mem, SUNDomEigEstimator DEE);
220
+
221
+ Specifies the user-supplied dominant eigenvalue estimator (DEE) to be used for
222
+ determining the number of stages that will be used by either the RKC or RKL methods.
223
+ This function is an alternative to :c:func: `LSRKStepSetDomEigFn ` and is used when a DEE
224
+ has already been created. TODO: Add extra information about how we implement this function
225
+ after deciding on it by the group.
226
+
227
+ **Arguments: **
228
+ * *arkode_mem * -- pointer to the LSRKStep memory block.
229
+ * *DEE * -- pointer to the SUNDIALS Dominant Eigenvalue Estimator (of type :c:type: `SUNDomEigEstimator `).
230
+
231
+ **Return value: **
232
+ * *ARK_SUCCESS * if successful
233
+ * *ARK_MEM_NULL * if ``arkode_mem `` was ``NULL ``.
234
+ * *ARK_ILL_INPUT * if an argument had an illegal value (e.g. DEE itself or some of the required options is ``NULL ``)
235
+ * *ARK_DEE_FAIL * if DEE failed.
236
+
237
+ .. note :: *ARK_DEE_FAIL* return should also produce error messages due to DEE error(s). These errors
238
+ are handled by :c:type: `SUNErrCode `.
239
+
240
+ Either this function or the user-supplied dominant eigenvalue estimator creator function,
241
+ :c:func: `LSRKStepSetDomEigFn ` is required when either the RKC or RKL methods are used.
242
+
243
+ Note that although a DEE creation routine requires :c:func: `SUNDomEigEst_SetATimes ` with a valid
244
+ matrix-vector product function pointer, setting a DEE with :c:func: `LSRKStepSetDomEigEstimator `
245
+ uses an internal Jacobian-vector product estimation that is passed with the *arkode_mem * pointer.
246
+ Similarly, it estimates the eigenvalue as needed internally without requiring a call to
247
+ :c:func: `SUNDomEig_Estimate `.
248
+
202
249
203
250
.. c :function :: int LSRKStepSetDomEigFrequency (void* arkode_mem, long int nsteps);
204
251
@@ -211,7 +258,7 @@ Allowable Method Families
211
258
212
259
**Return value: **
213
260
* *ARK_SUCCESS * if successful
214
- * *ARKLS_MEM_NULL * if ``arkode_mem `` was ``NULL ``.
261
+ * *ARK_MEM_NULL * if ``arkode_mem `` was ``NULL ``.
215
262
216
263
.. note ::
217
264
@@ -235,7 +282,7 @@ Allowable Method Families
235
282
236
283
**Return value: **
237
284
* *ARK_SUCCESS * if successful
238
- * *ARKLS_MEM_NULL * if ``arkode_mem `` was ``NULL ``.
285
+ * *ARK_MEM_NULL * if ``arkode_mem `` was ``NULL ``.
239
286
240
287
.. note ::
241
288
@@ -264,7 +311,7 @@ Allowable Method Families
264
311
265
312
**Return value: **
266
313
* *ARK_SUCCESS * if successful
267
- * *ARKLS_MEM_NULL * if ``arkode_mem `` was ``NULL ``.
314
+ * *ARK_MEM_NULL * if ``arkode_mem `` was ``NULL ``.
268
315
269
316
.. note ::
270
317
@@ -276,6 +323,22 @@ Allowable Method Families
276
323
when using the key "arkid.dom_eig_safety_factor".
277
324
278
325
326
+ .. c :function :: int LSRKStepSetNumSucceedingWarmups (void* arkode_mem, int num_succ_warmups);
327
+
328
+ Specifies the number of the preprocessing warmups before each estimate call succeeding the very first estimate call.
329
+
330
+ **Arguments: **
331
+ * *arkode_mem * -- pointer to the LSRKStep memory block.
332
+ * *num_succ_warmups * -- the number of succeeding warmups.
333
+
334
+ **Return value: **
335
+ * *ARK_SUCCESS * if successful
336
+ * *ARK_MEM_NULL * if ``arkode_mem `` was ``NULL ``.
337
+
338
+ .. note :: If LSRKStepSetNumSucceedingWarmups routine is not called, then the default ``num_succ_warmups`` is set to :math:`0`.
339
+ Calling this function with ``num_succ_warmups < 0 `` resets the default.
340
+
341
+
279
342
.. c :function :: int LSRKStepSetNumSSPStages (void* arkode_mem, int num_of_stages);
280
343
281
344
Sets the number of stages, ``s `` in ``SSP(s, p) `` methods. This input is only utilized by SSPRK methods.
@@ -290,7 +353,7 @@ Allowable Method Families
290
353
291
354
**Return value: **
292
355
* *ARK_SUCCESS * if successful
293
- * *ARKLS_MEM_NULL * if ``arkode_mem `` was ``NULL ``.
356
+ * *ARK_MEM_NULL * if ``arkode_mem `` was ``NULL ``.
294
357
* *ARK_ILL_INPUT * if an argument had an illegal value (e.g. SSP method is not declared)
295
358
296
359
.. note ::
@@ -334,6 +397,26 @@ Optional output functions
334
397
**Return value: **
335
398
* *ARK_SUCCESS * if successful
336
399
* *ARK_MEM_NULL * if the LSRKStep memory was ``NULL ``
400
+ * *ARK_ILL_INPUT * if ``stage_max `` is illegal
401
+
402
+
403
+ .. c :function :: int LSRKStepGetNumDomEigEstRhsEvals (void* arkode_mem, long int* nfeDQ);
404
+
405
+ Returns the number of RHS function evaluations used in the difference quotient
406
+ Jacobian approximations (so far).
407
+
408
+ **Arguments: **
409
+ * *arkode_mem * -- pointer to the LSRKStep memory block.
410
+ * *nfeDQ * -- number of rhs calls.
411
+
412
+ **Return value: **
413
+ * *ARK_SUCCESS * if successful
414
+ * *ARK_MEM_NULL * if the LSRKStep memory was ``NULL ``
415
+ * *ARK_ILL_INPUT * if ``nfeDQ `` is illegal
416
+
417
+ .. note :: The internal SUNDIALS dominant eigenvalue estimator (DEE) uses this approximation.
418
+ Therefore, it returns 0 if DEE the was not created.
419
+
337
420
338
421
.. _ARKODE.Usage.LSRKStep.Reinitialization :
339
422
0 commit comments