ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
test_dftu_base_read.cpp File Reference
#include "dftu_base_test_fixture.h"
#include "source_cell/atom_spec.h"
#include "source_pw/module_pwdft/dftu_base.h"
#include "source_pw/module_pwdft/dftu_base_io.h"
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
Include dependency graph for test_dftu_base_read.cpp:

Functions

 TEST_F (DFTUBaseTest, InitBaseReadsFixedOccMat)
 init_occ_mat=2 loads the fixed occupation matrix during run initialization.
 TEST_F (DFTUBaseTest, InitBaseReadsOccMatSocPauliRoundtrip)
 TEST_F (DFTUBaseTest, ReadOccMatCompactHandlesLongComment)
 TEST_F (DFTUBaseTest, ReadOccMatCompactMultipleAtomsSkipsUncorrelatedSpecies)
 TEST_F (DFTUBaseTest, ReadOccMatCompactSocRealSpinBasis)
 TEST_F (DFTUBaseTest, ReadOccMatRejectsLegacyHeader)
 TEST_F (DFTUBaseTest, ReadOccMatRejectsShortMatrixRow)
 TEST_F (DFTUBaseTest, ReadOccMatRejectsLongMatrixRow)
 TEST_F (DFTUBaseTest, ReadOccMatRejectsMissingSocBlock)
 TEST_F (DFTUBaseTest, ReadOccMatRejectsExtraContent)

Function Documentation

◆ TEST_F() [1/10]

TEST_F ( DFTUBaseTest ,
InitBaseReadsFixedOccMat  )

init_occ_mat=2 loads the fixed occupation matrix during run initialization.

Here is the call graph for this function:

◆ TEST_F() [2/10]

TEST_F ( DFTUBaseTest ,
InitBaseReadsOccMatSocPauliRoundtrip  )

Reading an nspin=4 occupation-matrix file with SOC_LAYOUT_PAULI must reconstruct the 4 contiguous Pauli blocks [b0, b1, b2, b3] in the 2m x 2m flat buffer. The bug fixed in commit 1787365b3 was that the Im(n_ud) block ("spin 12 im") was discarded, so b2 came out zero/garbage and the subsequent SCF diverged. This test writes a fixture with a non-zero Im block and verifies all 4 blocks at the correct flat-buffer offsets.

Here is the call graph for this function:

◆ TEST_F() [3/10]

TEST_F ( DFTUBaseTest ,
ReadOccMatCompactHandlesLongComment  )
Here is the call graph for this function:

◆ TEST_F() [4/10]

TEST_F ( DFTUBaseTest ,
ReadOccMatCompactMultipleAtomsSkipsUncorrelatedSpecies  )
Here is the call graph for this function:

◆ TEST_F() [5/10]

TEST_F ( DFTUBaseTest ,
ReadOccMatCompactSocRealSpinBasis  )
Here is the call graph for this function:

◆ TEST_F() [6/10]

TEST_F ( DFTUBaseTest ,
ReadOccMatRejectsExtraContent  )
Here is the call graph for this function:

◆ TEST_F() [7/10]

TEST_F ( DFTUBaseTest ,
ReadOccMatRejectsLegacyHeader  )
Here is the call graph for this function:

◆ TEST_F() [8/10]

TEST_F ( DFTUBaseTest ,
ReadOccMatRejectsLongMatrixRow  )
Here is the call graph for this function:

◆ TEST_F() [9/10]

TEST_F ( DFTUBaseTest ,
ReadOccMatRejectsMissingSocBlock  )
Here is the call graph for this function:

◆ TEST_F() [10/10]

TEST_F ( DFTUBaseTest ,
ReadOccMatRejectsShortMatrixRow  )
Here is the call graph for this function: