SuperLUSupport 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifndef EIGEN_SUPERLUSUPPORT_MODULE_H
  2. #define EIGEN_SUPERLUSUPPORT_MODULE_H
  3. #include "SparseCore"
  4. #include "src/Core/util/DisableStupidWarnings.h"
  5. #ifdef EMPTY
  6. #define EIGEN_EMPTY_WAS_ALREADY_DEFINED
  7. #endif
  8. typedef int int_t;
  9. #include <slu_Cnames.h>
  10. #include <supermatrix.h>
  11. #include <slu_util.h>
  12. // slu_util.h defines a preprocessor token named EMPTY which is really polluting,
  13. // so we remove it in favor of a SUPERLU_EMPTY token.
  14. // If EMPTY was already defined then we don't undef it.
  15. #if defined(EIGEN_EMPTY_WAS_ALREADY_DEFINED)
  16. # undef EIGEN_EMPTY_WAS_ALREADY_DEFINED
  17. #elif defined(EMPTY)
  18. # undef EMPTY
  19. #endif
  20. #define SUPERLU_EMPTY (-1)
  21. namespace Eigen { struct SluMatrix; }
  22. /** \ingroup Support_modules
  23. * \defgroup SuperLUSupport_Module SuperLUSupport module
  24. *
  25. * This module provides an interface to the <a href="http://crd-legacy.lbl.gov/~xiaoye/SuperLU/">SuperLU</a> library.
  26. * It provides the following factorization class:
  27. * - class SuperLU: a supernodal sequential LU factorization.
  28. * - class SuperILU: a supernodal sequential incomplete LU factorization (to be used as a preconditioner for iterative methods).
  29. *
  30. * \warning When including this module, you have to use SUPERLU_EMPTY instead of EMPTY which is no longer defined because it is too polluting.
  31. *
  32. * \code
  33. * #include <Eigen/SuperLUSupport>
  34. * \endcode
  35. *
  36. * In order to use this module, the superlu headers must be accessible from the include paths, and your binary must be linked to the superlu library and its dependencies.
  37. * The dependencies depend on how superlu has been compiled.
  38. * For a cmake based project, you can use our FindSuperLU.cmake module to help you in this task.
  39. *
  40. */
  41. #include "src/misc/Solve.h"
  42. #include "src/misc/SparseSolve.h"
  43. #include "src/SuperLUSupport/SuperLUSupport.h"
  44. #include "src/Core/util/ReenableStupidWarnings.h"
  45. #endif // EIGEN_SUPERLUSUPPORT_MODULE_H