You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ABACUS_Bethe.h 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /**********************************************************
  2. This software is part of J.-S. Caux's ABACUS library.
  3. Copyright (c) J.-S. Caux.
  4. -----------------------------------------------------------
  5. File: ABACUS_Bethe.h
  6. Purpose: Declares Bethe state-related classes and functions.
  7. Status: IN DEVELOPMENT
  8. ***********************************************************/
  9. #ifndef ABACUS_BETHE_H
  10. #define ABACUS_BETHE_H
  11. #include "ABACUS.h"
  12. namespace ABACUS {
  13. class Base {
  14. public:
  15. int charge; // charge of the base: number of particles (LiebLin gas), number of down spins (Heis), ...
  16. Vect<int> Nrap; // Nrap[i] contains the number of rapidities of type i, i = 0, ..., Nstrings - 1.
  17. int Nraptot; // total number of strings in this state
  18. Vect<DP> Ix2_infty; // Ix2_infty[i] contains the max of BAE function for the (half-)integer I[i], i = 0, Nstrings - 1.
  19. Vect<int> Ix2_min;
  20. Vect<int> Ix2_max; // Ix2_max[i] contains the integer part of 2*I_infty, with correct parity for base.
  21. string baselabel;
  22. public:
  23. Base ();
  24. Base (const Base& RefBase); // copy constructor
  25. public: // LiebLin constructors
  26. Base (int N); // Constructor for repulsive LiebLin gas case: one type of particle
  27. public: // HEIS constructors
  28. Base (const Heis_Chain& RefChain, const Vect<int>& Nrapidities); // sets to Nrapidities vector, and checks consistency
  29. Base (const Heis_Chain& RefChain, string baselabel_ref);
  30. public: // operators
  31. Base& operator= (const Base& RefBase);
  32. bool operator== (const Base& RefBase);
  33. bool operator!= (const Base& RefBase);
  34. public: // member functions
  35. void Compute_Ix2_limits(const Heis_Chain& RefChain); // computes the Ix2_infty and Ix2_max
  36. };
  37. //****************************************************************************
  38. // Class Bethe_State is a wrapper class for all types of eigenstates
  39. class Bethe_State {
  40. public: // configuration
  41. Base base;
  42. Vect<Vect<int> > Ix2;
  43. Vect<Vect<DP> > lambda;
  44. public: // properties
  45. DP E;
  46. int iK;
  47. DP K;
  48. DP lnnorm;
  49. public: // identification
  50. string label; // this is the relative label by default
  51. Vect<Vect<int> > OriginIx2; // to define the relative label
  52. public: // convergence
  53. DP diffsq;
  54. int conv;
  55. int iter;
  56. int iter_Newton;
  57. public: // constructors
  58. Bethe_State();
  59. Bethe_State (const Bethe_State& RefState); // copy constructor
  60. Bethe_State (const Bethe_State& OriginState, string label_ref);
  61. LiebLin_Bethe_State& operator= (const LiebLin_Bethe_State& RefState);
  62. } // namespace ABACUS
  63. #endif