idas_dense.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * -----------------------------------------------------------------
  3. * $Revision: 4489 $
  4. * $Date: 2015-04-29 17:15:44 -0700 (Wed, 29 Apr 2015) $
  5. * -----------------------------------------------------------------
  6. * Programmer(s): Alan C. Hindmarsh 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 header file for the IDADENSE linear solver module.
  19. * -----------------------------------------------------------------
  20. */
  21. #ifndef _IDASDENSE_H
  22. #define _IDASDENSE_H
  23. #include <idas/idas_direct.h>
  24. #include <sundials/sundials_dense.h>
  25. #ifdef __cplusplus /* wrapper to enable C++ usage */
  26. extern "C" {
  27. #endif
  28. /*
  29. * -----------------------------------------------------------------
  30. * Function : IDADense
  31. * -----------------------------------------------------------------
  32. * A call to the IDADense function links the main integrator
  33. * with the IDADENSE linear solver module.
  34. *
  35. * ida_mem is the pointer to integrator memory returned by
  36. * IDACreate.
  37. *
  38. * Neq is the problem size
  39. *
  40. * IDADense returns:
  41. * IDADLS_SUCCESS = 0 if successful
  42. * IDADLS_LMEM_FAIL = -1 if there was a memory allocation failure
  43. * IDADLS_ILL_INPUT = -2 if NVECTOR found incompatible
  44. *
  45. * NOTE: The dense linear solver assumes a serial implementation
  46. * of the NVECTOR package. Therefore, IDADense will first
  47. * test for a compatible N_Vector internal representation
  48. * by checking that the functions N_VGetArrayPointer and
  49. * N_VSetArrayPointer exist.
  50. * -----------------------------------------------------------------
  51. */
  52. SUNDIALS_EXPORT int IDADense(void *ida_mem, long int Neq);
  53. /*
  54. * -----------------------------------------------------------------
  55. * Function: IDADenseB
  56. * -----------------------------------------------------------------
  57. * IDADenseB links the main IDAS integrator with the IDADENSE
  58. * linear solver for the backward integration.
  59. * The 'which' argument is the int returned by IDACreateB.
  60. * -----------------------------------------------------------------
  61. */
  62. SUNDIALS_EXPORT int IDADenseB(void *ida_mem, int which, long int NeqB);
  63. #ifdef __cplusplus
  64. }
  65. #endif
  66. #endif