ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
test_hsr_writer.cpp File Reference

Unit tests for hsr_writer.cpp: filename-generation helpers and the CSR text/binary H(R), S(R) writer paths (write_hcontainer_csr, write_hcontainer_csr_binary, write_hsr). More...

#include "source_hamilt/module_hcontainer/unittests/tmp_mocks.h"
#include "csr_test_helpers.h"
#include "source_base/module_out/csr_reader.h"
#include "source_base/constants.h"
#include "source_estate/fp_energy.h"
#include "source_hamilt/module_hcontainer/hcontainer_funcs.h"
#include "source_io/module_hs/hsr_writer.h"
#include <algorithm>
#include <complex>
#include <cstdio>
#include <fstream>
#include <iomanip>
#include <string>
#include <vector>
#include <mpi.h>
Include dependency graph for test_hsr_writer.cpp:

Functions

 TEST (HsrWriterFname, HsrNumberedWithStep)
 TEST (HsrWriterFname, HsrNumberedWithStepTwo)
 TEST (HsrWriterFname, HsrFixedNameSuppressesStep)
 TEST (HsrWriterFname, HsrNegativeStepSuppressesStep)
 TEST (HsrWriterFname, HsrDatExtension)
 TEST (HsrWriterFname, HsrCsrExtensionDefault)
 TEST (HsrWriterFname, SrNumberedWithStep)
 TEST (HsrWriterFname, SrFixedNameSuppressesStep)
 TEST (HsrWriterFname, SrNegativeStepSuppressesStep)
 TEST (HsrWriterFname, SrDatExtension)
 TEST (HsrWriterFname, DhrNumberedWithStep)
 TEST (HsrWriterFname, DhrFixedNameSuppressesStep)
 TEST (HsrWriterFname, DhrNegativeStepSuppressesStep)
 TEST (HsrWriterFname, DhkSingleSpinKeepsBareName)
 TEST (HsrWriterFname, DhkSpinPolarizedAddsSpinSuffix)
 TEST (HsrWriterFname, DhkNumberedWithStep)
 TEST (HsrWriterIo, HContainerCsrHeaderKeepsCurrentFormat)
 TEST (HsrWriterIo, GammaFoldedHeaderKeepsCsrReadable)
 TEST (HsrWriterIo, HContainerCsrAppendKeepsCurrentStepSections)
 TEST (HsrWriterIo, HContainerCsrHeaderCarriesPerChannelFermi)
 TEST (HsrWriterIo, HContainerBinaryWritesSortedAndEmptyRBlocks)
 TEST (HsrWriterIo, HContainerBinaryWritesComplexValuesAsDoublePairs)
 TEST (HsrWriterIo, HContainerBinaryAppendsAndCanOverwrite)
 TEST (HsrWriterIo, HContainerBinaryMpiGatherWritesCompleteFiles)
 TEST (HsrWriterIo, WriteHsrTextCsrCarriesPerSpinFermiFromEfermi)
int main (int argc, char **argv)

Detailed Description

Unit tests for hsr_writer.cpp: filename-generation helpers and the CSR text/binary H(R), S(R) writer paths (write_hcontainer_csr, write_hcontainer_csr_binary, write_hsr).

The filename helpers are pure string functions with no physics state. The writer tests pin down the exact CSR text/binary layout on disk so a format change is caught by a failing test instead of a broken reader.

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

◆ TEST() [1/25]

TEST ( HsrWriterFname ,
DhkNumberedWithStep  )
Here is the call graph for this function:

◆ TEST() [2/25]

TEST ( HsrWriterFname ,
DhkSingleSpinKeepsBareName  )
Here is the call graph for this function:

◆ TEST() [3/25]

TEST ( HsrWriterFname ,
DhkSpinPolarizedAddsSpinSuffix  )
Here is the call graph for this function:

◆ TEST() [4/25]

TEST ( HsrWriterFname ,
DhrFixedNameSuppressesStep  )
Here is the call graph for this function:

◆ TEST() [5/25]

TEST ( HsrWriterFname ,
DhrNegativeStepSuppressesStep  )
Here is the call graph for this function:

◆ TEST() [6/25]

TEST ( HsrWriterFname ,
DhrNumberedWithStep  )
Here is the call graph for this function:

◆ TEST() [7/25]

TEST ( HsrWriterFname ,
HsrCsrExtensionDefault  )
Here is the call graph for this function:

◆ TEST() [8/25]

TEST ( HsrWriterFname ,
HsrDatExtension  )
Here is the call graph for this function:

◆ TEST() [9/25]

TEST ( HsrWriterFname ,
HsrFixedNameSuppressesStep  )
Here is the call graph for this function:

◆ TEST() [10/25]

TEST ( HsrWriterFname ,
HsrNegativeStepSuppressesStep  )
Here is the call graph for this function:

◆ TEST() [11/25]

TEST ( HsrWriterFname ,
HsrNumberedWithStep  )
Here is the call graph for this function:

◆ TEST() [12/25]

TEST ( HsrWriterFname ,
HsrNumberedWithStepTwo  )
Here is the call graph for this function:

◆ TEST() [13/25]

TEST ( HsrWriterFname ,
SrDatExtension  )
Here is the call graph for this function:

◆ TEST() [14/25]

TEST ( HsrWriterFname ,
SrFixedNameSuppressesStep  )
Here is the call graph for this function:

◆ TEST() [15/25]

TEST ( HsrWriterFname ,
SrNegativeStepSuppressesStep  )
Here is the call graph for this function:

◆ TEST() [16/25]

TEST ( HsrWriterFname ,
SrNumberedWithStep  )
Here is the call graph for this function:

◆ TEST() [17/25]

TEST ( HsrWriterIo ,
GammaFoldedHeaderKeepsCsrReadable  )
Here is the call graph for this function:

◆ TEST() [18/25]

TEST ( HsrWriterIo ,
HContainerBinaryAppendsAndCanOverwrite  )
Here is the call graph for this function:

◆ TEST() [19/25]

TEST ( HsrWriterIo ,
HContainerBinaryMpiGatherWritesCompleteFiles  )
Here is the call graph for this function:

◆ TEST() [20/25]

TEST ( HsrWriterIo ,
HContainerBinaryWritesComplexValuesAsDoublePairs  )
Here is the call graph for this function:

◆ TEST() [21/25]

TEST ( HsrWriterIo ,
HContainerBinaryWritesSortedAndEmptyRBlocks  )
Here is the call graph for this function:

◆ TEST() [22/25]

TEST ( HsrWriterIo ,
HContainerCsrAppendKeepsCurrentStepSections  )
Here is the call graph for this function:

◆ TEST() [23/25]

TEST ( HsrWriterIo ,
HContainerCsrHeaderCarriesPerChannelFermi  )
Here is the call graph for this function:

◆ TEST() [24/25]

TEST ( HsrWriterIo ,
HContainerCsrHeaderKeepsCurrentFormat  )
Here is the call graph for this function:

◆ TEST() [25/25]

TEST ( HsrWriterIo ,
WriteHsrTextCsrCarriesPerSpinFermiFromEfermi  )
Here is the call graph for this function: