ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
exx_abfs-construct_orbs-test.h
Go to the documentation of this file.
1#ifndef EXX_ABFS_CONSTRUCT_ORBS_TEST_H
2#define EXX_ABFS_CONSTRUCT_ORBS_TEST_H
3
4#include <fstream>
5#include <vector>
6#include <string>
7
8static void print_orbs( const std::vector<std::vector<std::vector<std::vector<double>>>> & orbs, const std::string & file_name )
9{
10 std::ofstream ofsN(file_name);
11 for( size_t T=0; T!=orbs.size(); ++T )
12 for( size_t L=0; L!=orbs[T].size(); ++L )
13 for( size_t N=0; N!=orbs[T][L].size(); ++N )
14 {
15 ofsN<<T<<"\t"<<L<<"\t"<<N<<std::endl;
16 for( size_t ir=0; ir!=orbs[T][L][N].size(); ++ir )
17 ofsN<<orbs[T][L][N][ir]<<"\t";
18 ofsN<<std::endl;
19 }
20 ofsN.close();
21}
22
23static void print_orbs( const std::vector<std::vector<std::vector<Numerical_Orbital_Lm>>> & orbs, const std::string & file_name )
24{
25 std::ofstream ofsN(file_name);
26 for( size_t T=0; T!=orbs.size(); ++T )
27 for( size_t L=0; L!=orbs[T].size(); ++L )
28 for( size_t N=0; N!=orbs[T][L].size(); ++N )
29 {
30 ofsN<<T<<"\t"<<L<<"\t"<<N<<std::endl;
31 for( size_t ir=0; ir!=orbs[T][L][N].getNr(); ++ir )
32 ofsN<<orbs[T][L][N].getPsi(ir)<<"\t";
33 ofsN<<std::endl;
34 }
35 ofsN.close();
36}
37
38#endif // EXX_ABFS_CONSTRUCT_ORBS_TEST_H
#define N
Definition exp.cpp:24
#define T
Definition exp.cpp:237