Detailed Description

Contains information on quantum numbers and associated index ranges.

Definition at line 30 of file QuantumNumbers.hpp.

#include <QuantumNumbers.hpp>

Public Member Functions

PetscErrorCode Initialize (const MPI_Comm &mpi_comm_in, const std::vector< PetscReal > &qn_list_in, const std::vector< PetscInt > &qn_size_in)
 Initializes the quantum number object. More...
 
PetscErrorCode CheckInitialized () const
 Checks whether quantum number object was properly initialized. More...
 
MPI_Comm MPIComm () const
 Gets the communicator associated to the block. More...
 
PetscInt NumSectors () const
 Returns the number of quantum number sectors. More...
 
std::vector< PetscReal > List () const
 Returns the list of quantum numbers. More...
 
const std::vector< PetscReal > & ListRef () const
 Returns the list of quantum numbers as a const reference. More...
 
PetscReal List (const PetscInt &idx) const
 Returns the quantum number associated to the given index. More...
 
std::vector< PetscInt > Offsets () const
 Returns the offsets for each quantum number block. More...
 
PetscInt Offsets (const PetscInt &idx) const
 Returns the offsets for the quantum number block with a specified index. More...
 
std::vector< PetscInt > Sizes () const
 Returns the number of basis states in each quantum number block. More...
 
PetscInt Sizes (const PetscInt &idx) const
 Returns the number of basis states in each quantum number block. More...
 
PetscInt NumStates () const
 Returns the total number of states. More...
 
PetscErrorCode BlockIdxToGlobalRange (const PetscInt &BlockIdx, PetscInt &GlobIdxStart, PetscInt &GlobIdxEnd) const
 Maps the quantum number block index to the global indices [start,end) More...
 
PetscErrorCode OpBlockToGlobalRange (const PetscInt &BlockIdx, const PetscInt &BlockShift, PetscInt &GlobIdxStart, PetscInt &GlobIdxEnd, PetscBool &flg) const
 Maps the shifted quantum number block index to the global indices [start,end). More...
 
PetscInt OpBlockToGlobalRangeStart (const PetscInt &BlockIdx, const PetscInt &BlockShift, PetscBool &flg) const
 Maps the shifted quantum number block index to the global index start in the range [start,end). More...
 
PetscErrorCode QNToGlobalRange (const PetscReal &QNValue, PetscInt &GlobIdxStart, PetscInt &GlobIdxEnd) const
 Maps the quantum number value to the global indices [start,end) More...
 
PetscErrorCode GlobalIdxToBlockIdx (const PetscInt &GlobIdx, PetscInt &BlockIdx) const
 Maps the global index of a basis state to its block index. More...
 
PetscErrorCode GlobalIdxToBlockIdx (const PetscInt &GlobIdx, PetscInt &BlockIdx, PetscInt &LocIdx) const
 Maps the global index of a basis state to its block index and local index in the block. More...
 
PetscErrorCode GlobalIdxToQN (const PetscInt &GlobIdx, PetscReal &QNValue) const
 Maps the global index of a basis state to its quantum number. More...
 
PetscErrorCode BlockIdxToGlobalIdx (const PetscInt &BlockIdx, const PetscInt &LocIdx, PetscInt &GlobIdx) const
 Maps the block index of a basis state to its global index. More...
 
PetscInt BlockIdxToGlobalIdx (const PetscInt &BlockIdx, const PetscInt &LocIdx) const
 Maps the block index of a basis state to its global index and returns the value directly. More...
 
PetscErrorCode PrintQNs ()
 Prints out the full list of quantum numbers contained in the root process. More...
 

Private Attributes

MPI_Comm mpi_comm = PETSC_COMM_SELF
 MPI Communicator. More...
 
PetscInt num_sectors
 Number of Sz sectors in the Hilbert space. More...
 
std::vector< PetscReal > qn_list
 List of Sz quantum numbers. More...
 
std::vector< PetscInt > qn_offset
 Offset for each quantum number block. More...
 
std::vector< PetscInt > qn_size
 Number of states in each quantum number block. More...
 
PetscInt num_states
 Number of basis states in the Hilbert space. More...
 
PetscBool initialized = PETSC_FALSE
 Tells whether initialized previously. More...
 

The documentation for this class was generated from the following files:
This site was generated by Sphinx using Doxygen with a customized theme from doxygen-bootstrapped.