QuantumNumbers.cpp
64 SETERRQ2(PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Given BlockIdx (%d) out of bounds [0, %d).", BlockIdx, num_sectors);
85 SETERRQ2(PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Given BlockIdx (%d) out of bounds [0, %d).", BlockIdx, num_sectors);
133 SETERRQ2(PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Given GlobIdx (%d) out of bounds [0, %d).", GlobIdx, num_states);
186 SETERRQ2(PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Given BlockIdx (%d) out of bounds [0, %d).", BlockIdx, num_sectors);
std::vector< PetscInt > qn_offset
Offset for each quantum number block.
Definition: QuantumNumbers.hpp:45
PetscErrorCode QNToGlobalRange(const PetscReal &QNValue, PetscInt &GlobIdxStart, PetscInt &GlobIdxEnd) const
Maps the quantum number value to the global indices [start,end)
Definition: QuantumNumbers.cpp:99
PetscErrorCode BlockIdxToGlobalIdx(const PetscInt &BlockIdx, const PetscInt &LocIdx, PetscInt &GlobIdx) const
Maps the block index of a basis state to its global index.
Definition: QuantumNumbers.cpp:175
PetscErrorCode BlockIdxToGlobalRange(const PetscInt &BlockIdx, PetscInt &GlobIdxStart, PetscInt &GlobIdxEnd) const
Maps the quantum number block index to the global indices [start,end)
Definition: QuantumNumbers.cpp:53
std::vector< PetscInt > qn_size
Number of states in each quantum number block.
Definition: QuantumNumbers.hpp:48
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).
Definition: QuantumNumbers.cpp:72
PetscErrorCode GlobalIdxToBlockIdx(const PetscInt &GlobIdx, PetscInt &BlockIdx) const
Maps the global index of a basis state to its block index.
Definition: QuantumNumbers.cpp:122
PetscErrorCode GlobalIdxToQN(const PetscInt &GlobIdx, PetscReal &QNValue) const
Maps the global index of a basis state to its quantum number.
Definition: QuantumNumbers.cpp:158
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.
Definition: QuantumNumbers.cpp:9