StatMech
Loading...
Searching...
No Matches
ParitySector_test.cpp File Reference

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)
3 {
4 if(argc != 4) {
5 std::cerr << "Usage: 1.This, 2.(parity) 3.(SystemSize) 4.(dimLoc)" << std::endl;
6 std::exit(EXIT_FAILURE);
7 }
8 int const parity = std::atoi(argv[1]);
9 int const L = std::atoi(argv[2]);
10 int const dimLoc = std::atoi(argv[3]);
11 std::cout << "Input: parity = " << parity << ", L = " << L << ", dimLoc = " << dimLoc
12 << std::endl;
13
14 {
15 ParitySector<ManyBodyBosonSpace> subSpace(parity, L, dimLoc);
16 std::cout << subSpace.basis() << std::endl;
17 for(int j = 0; j != subSpace.dim(); ++j, std::cout << "\n") {
18 for(int id = subSpace.basis().outerIndexPtr()[j];
19 id != subSpace.basis().outerIndexPtr()[j + 1]; ++id) {
20 subSpace.totalSpace().printInString(subSpace.basis().innerIndexPtr()[id]);
21 }
22 }
23 std::cout << "subSpace.dim() = " << subSpace.dim()
24 << ", subSpace.totalSpace().dim() = " << subSpace.totalSpace().dim() << std::endl;
25 }
26}
Parity invariant sector of a many-body Hilbert space.
Definition ParitySector.hpp:15