ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
test_filename.cpp File Reference
#include <string>
#include <vector>
#include <gtest/gtest.h>
#include "source_base/module_out/filename.h"
Include dependency graph for test_filename.cpp:

Classes

class  FilenameOutputTest

Macros

#define TEST_FILENAME_CPP

Functions

 TEST_F (FilenameOutputTest, Mode0FixedNameIgnoresIstep)
 TEST_F (FilenameOutputTest, Mode1FixedNameNoG)
 TEST_F (FilenameOutputTest, Mode2EmbedsStep)
 TEST_F (FilenameOutputTest, SinglePointNoG)
 TEST_F (FilenameOutputTest, IterIndexOnlyInMode2)
 TEST_F (FilenameOutputTest, GammaOnlyNoKLabel)
 TEST_F (FilenameOutputTest, KineticPropertyUsesTWithoutDoubleK)
 TEST_F (FilenameOutputTest, NoncollinearSpin4)
 TEST_F (FilenameOutputTest, VxcMoDoesNotCollideWithVxck)
 TEST_F (FilenameOutputTest, VxcMoMode2EmbedsStep)
std::string filename_output (const std::string &directory, const std::string &property, const std::string &basis, const int ik_local, const std::vector< int > &ik2iktot, const int nspin, const int nkstot, const int out_type, const int out_app_flag, const bool gamma_only, const int istep, const int iter)

Macro Definition Documentation

◆ TEST_FILENAME_CPP

#define TEST_FILENAME_CPP

Function Documentation

◆ filename_output()

std::string ModuleIO::filename_output ( const std::string & directory,
const std::string & property,
const std::string & basis,
const int ik_local,
const std::vector< int > & ik2iktot,
const int nspin,
const int nkstot,
const int out_type,
const int out_app_flag,
const bool gamma_only,
const int istep = -1,
const int iter = -1 )

Generates the filename for the output files

Parameters
directorydirectory of the file
propertywave function (wf), charge density (chg) or matrix (mat)
basisnao or pw
ik_localindex of the k-points within each pool, and starting from 0.
ik2iktotmap from ik to iktot
nspinnumber of spin channels, 1,2 or 4
nkstotnumber of total k-points
out_typetwo types of output file format, 1 for .txt and 2 for .dat (binary)
out_app_flag0=fixed filename, overwritten at each write; 1=fixed filename, appended; 2=subdirectory layout with a g{step} suffix.
gamma_onlygamma_only algorithm or not.
istepindex of the ion step starting from 0. The step number is only embedded in the filename in mode 2 (out_app_flag == 2), and only when istep >= 0.
iterindex of the electronic step starting from 0. The step number is only embedded in the filename in mode 2 (out_app_flag == 2), and only when iter >= 0.
Returns
The generated filename.
Here is the caller graph for this function:

◆ TEST_F() [1/10]

TEST_F ( FilenameOutputTest ,
GammaOnlyNoKLabel  )
Here is the call graph for this function:

◆ TEST_F() [2/10]

TEST_F ( FilenameOutputTest ,
IterIndexOnlyInMode2  )
Here is the call graph for this function:

◆ TEST_F() [3/10]

TEST_F ( FilenameOutputTest ,
KineticPropertyUsesTWithoutDoubleK  )
Here is the call graph for this function:

◆ TEST_F() [4/10]

TEST_F ( FilenameOutputTest ,
Mode0FixedNameIgnoresIstep  )
Here is the call graph for this function:

◆ TEST_F() [5/10]

TEST_F ( FilenameOutputTest ,
Mode1FixedNameNoG  )
Here is the call graph for this function:

◆ TEST_F() [6/10]

TEST_F ( FilenameOutputTest ,
Mode2EmbedsStep  )
Here is the call graph for this function:

◆ TEST_F() [7/10]

TEST_F ( FilenameOutputTest ,
NoncollinearSpin4  )
Here is the call graph for this function:

◆ TEST_F() [8/10]

TEST_F ( FilenameOutputTest ,
SinglePointNoG  )
Here is the call graph for this function:

◆ TEST_F() [9/10]

TEST_F ( FilenameOutputTest ,
VxcMoDoesNotCollideWithVxck  )
Here is the call graph for this function:

◆ TEST_F() [10/10]

TEST_F ( FilenameOutputTest ,
VxcMoMode2EmbedsStep  )
Here is the call graph for this function: