|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Unit tests for dhs_sparse_writer.cpp (ModuleIO::save_dH_sparse). More...
#include "source_hamilt/module_hcontainer/unittests/tmp_mocks.h"#include "csr_test_helpers.h"#include "source_io/module_hs/dhs_sparse_writer.h"#include <fstream>#include <mpi.h>Functions | |
| TEST (DhsSparseWriter, TextCountsOnlyValuesAboveThreshold) | |
| TEST (DhsSparseWriter, BinaryCountsOnlyValuesAboveThreshold) | |
| TEST (DhsSparseWriter, SocWritesAllDirections) | |
| TEST (DhsSparseWriter, OverlapDerivativeWritesSingleSpinChannel) | |
| TEST (DhsSparseWriter, AppendModeReusesFixedFilename) | |
| int | main (int argc, char **argv) |
Unit tests for dhs_sparse_writer.cpp (ModuleIO::save_dH_sparse).
save_dH_sparse writes the derivative sparse matrices (dHx/dHy/dHz) for either H or S into separate CSR files. The tests verify that:
dhs_sparse_writer.cpp only reads GlobalV::DRANK; no PARAM state is involved, so the fixture sets DRANK directly.
| int main | ( | int | argc, |
| char ** | argv ) |
| TEST | ( | DhsSparseWriter | , |
| AppendModeReusesFixedFilename | ) |
| TEST | ( | DhsSparseWriter | , |
| BinaryCountsOnlyValuesAboveThreshold | ) |
| TEST | ( | DhsSparseWriter | , |
| OverlapDerivativeWritesSingleSpinChannel | ) |
| TEST | ( | DhsSparseWriter | , |
| SocWritesAllDirections | ) |
| TEST | ( | DhsSparseWriter | , |
| TextCountsOnlyValuesAboveThreshold | ) |