ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
element_basis_index-test.h
Go to the documentation of this file.
1//==========================================================
2// AUTHOR : Peize Lin
3// DATE : 2016-06-02
4//==========================================================
5
6#ifndef ELEMENT_BASIS_INDEX_TEST_H
7#define ELEMENT_BASIS_INDEX_TEST_H
8
9#include <iostream>
10
11static std::ostream & operator << (std::ostream & os, const ModuleBase::Element_Basis_Index::Range & range)
12{
13 for( size_t T=0; T!=range.size(); ++T )
14 {
15 os<<T<<std::endl;
16 for( size_t L=0; L!=range[T].size(); ++L )
17 {
18 os<<"\t"<<L<<"\t"<<range[T][L].N<<"\t"<<range[T][L].M<<std::endl;
19 }
20 }
21 return os;
22}
23
24static std::ostream & operator << (std::ostream & os, const ModuleBase::Element_Basis_Index::IndexLNM & index)
25{
26 for( size_t T=0; T!=index.size(); ++T )
27 {
28 os<<T<<":\t"<<index[T].count_size<<std::endl;;
29 for( size_t L=0; L!=index[T].size(); ++L )
30 {
31 os<<"\t"<<L<<std::endl;
32 for( size_t N=0; N!=index[T][L].size(); ++N )
33 {
34 os<<"\t\t"<<N<<std::endl;
35 for( size_t M=0; M!=index[T][L][N].size(); ++M )
36 {
37 os<<"\t\t\t"<<M<<"\t"<<index[T][L][N][M]<<std::endl;
38 }
39 }
40 }
41 }
42 return os;
43}
44
45#endif
std::vector< Index_T > IndexLNM
Definition element_basis_index.h:41
std::vector< std::vector< NM > > Range
Definition element_basis_index.h:40
#define N
Definition exp.cpp:24
#define T
Definition exp.cpp:237