ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
KptValidationTest Class Reference
Inheritance diagram for KptValidationTest:
Collaboration diagram for KptValidationTest:

Protected Member Functions

void SetUp () override
void TearDown () override
std::string write_kpt_file (const std::string &name, const std::string &content)
bool read_kpt (const std::string &content)

Protected Attributes

UnitCell ucell
std::ofstream ofs_running
std::ofstream ofs_warning
std::string log_path
std::string warn_path
std::string kpt_path

Detailed Description

  • Tested Functions:
    • NegativeTotalCountRejected
      • K_Vectors::parse_kfile(): a negative k-point count must be rejected instead of falling through both the nkstot==0 and nkstot>0 branches
    • ZeroMpDimensionRejected / NonNumericMpDimensionRejected / NegativeMpDimensionRejected / TwoNegativeMpDimensionsRejected / MpGridProductOverflowRejected / MpGridProductOverflowInt64Rejected
      • K_Vectors::read_mp_mesh(): malformed Monkhorst-Pack grid dimensions (zero, non-numeric, negative, or overflowing int) must be rejected; a negative dimension previously crashed in renew() with an uncaught std::length_error, and a negative pair has a positive product; 2097152^3 = 2^63 overflows even a 64-bit product, so the guard must compare before multiplying
    • ValidMpGridAccepted
      • a well-formed 2x2x2 Gamma grid still works (8 k-points)
    • QptNegativeMpDimensionRejected / QptMpGridProductOverflowInt64Rejected
      • QList::read_from_file(): a malformed MP grid resets the q-point count following its existing warning-and-reset error style

Member Function Documentation

◆ read_kpt()

bool KptValidationTest::read_kpt ( const std::string & content)
inlineprotected
Here is the call graph for this function:

◆ SetUp()

void KptValidationTest::SetUp ( )
inlineoverrideprotected

◆ TearDown()

void KptValidationTest::TearDown ( )
inlineoverrideprotected

◆ write_kpt_file()

std::string KptValidationTest::write_kpt_file ( const std::string & name,
const std::string & content )
inlineprotected
Here is the caller graph for this function:

Member Data Documentation

◆ kpt_path

std::string KptValidationTest::kpt_path
protected

◆ log_path

std::string KptValidationTest::log_path
protected

◆ ofs_running

std::ofstream KptValidationTest::ofs_running
protected

◆ ofs_warning

std::ofstream KptValidationTest::ofs_warning
protected

◆ ucell

UnitCell KptValidationTest::ucell
protected

◆ warn_path

std::string KptValidationTest::warn_path
protected

The documentation for this class was generated from the following file: