idas_sptfqmr.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * -----------------------------------------------------------------
  3. * $Revision: 4489 $
  4. * $Date: 2015-04-29 17:15:44 -0700 (Wed, 29 Apr 2015) $
  5. * -----------------------------------------------------------------
  6. * Programmer(s): Aaron Collier and Radu Serban @ LLNL
  7. * -----------------------------------------------------------------
  8. * LLNS Copyright Start
  9. * Copyright (c) 2014, Lawrence Livermore National Security
  10. * This work was performed under the auspices of the U.S. Department
  11. * of Energy by Lawrence Livermore National Laboratory in part under
  12. * Contract W-7405-Eng-48 and in part under Contract DE-AC52-07NA27344.
  13. * Produced at the Lawrence Livermore National Laboratory.
  14. * All rights reserved.
  15. * For details, see the LICENSE file.
  16. * LLNS Copyright End
  17. * -----------------------------------------------------------------
  18. * This is the public header file for the IDAS scaled preconditioned
  19. * TFQMR linear solver module, IDASPTFQMR.
  20. *
  21. * Part I contains function prototypes for using IDASPTFQMR on forward
  22. * problems (DAE integration and/or FSA)
  23. *
  24. * Part II contains function prototypes for using IDASPTFQMR on adjoint
  25. * (backward) problems
  26. * -----------------------------------------------------------------
  27. */
  28. #ifndef _IDASSPTFQMR_H
  29. #define _IDASSPTFQMR_H
  30. #include <idas/idas_spils.h>
  31. #include <sundials/sundials_sptfqmr.h>
  32. #ifdef __cplusplus /* wrapper to enable C++ usage */
  33. extern "C" {
  34. #endif
  35. /*
  36. * -----------------------------------------------------------------
  37. * PART I - forward problems
  38. * -----------------------------------------------------------------
  39. */
  40. /*
  41. * -----------------------------------------------------------------
  42. * Function : IDASptfqmr
  43. * -----------------------------------------------------------------
  44. * A call to the IDASptfqmr function links the main integrator with
  45. * the IDASPTFQMR linear solver module. Its parameters are as
  46. * follows:
  47. *
  48. * IDA_mem is the pointer to memory block returned by IDACreate.
  49. *
  50. * maxl is the maximum Krylov subspace dimension, an
  51. * optional input. Pass 0 to use the default value.
  52. * Otherwise pass a positive integer.
  53. *
  54. * The return values of IDASptfqmr are:
  55. * IDASPILS_SUCCESS if successful
  56. * IDASPILS_MEM_NULL if the IDAS memory was NULL
  57. * IDASPILS_MEM_FAIL if there was a memory allocation failure
  58. * IDASPILS_ILL_INPUT if there was illegal input.
  59. * The above constants are defined in idas_spils.h
  60. *
  61. * -----------------------------------------------------------------
  62. */
  63. SUNDIALS_EXPORT int IDASptfqmr(void *ida_mem, int maxl);
  64. /*
  65. * -----------------------------------------------------------------
  66. * PART II - backward problems
  67. * -----------------------------------------------------------------
  68. */
  69. /*
  70. * -----------------------------------------------------------------
  71. * Function: IDASptfqmrB
  72. * -----------------------------------------------------------------
  73. * IDASptfqmrB links the main IDAS integrator with the IDASptfqmr
  74. * linear solver for the backward integration.
  75. * The 'which' argument is the int returned by IDACreateB.
  76. * -----------------------------------------------------------------
  77. */
  78. SUNDIALS_EXPORT int IDASptfqmrB(void *ida_mem, int which, int maxlB);
  79. #ifdef __cplusplus
  80. }
  81. #endif
  82. #endif