forked from deepmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutput_mat_sparse.h
More file actions
59 lines (54 loc) · 2.08 KB
/
Copy pathoutput_mat_sparse.h
File metadata and controls
59 lines (54 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef OUTPUT_MAT_SPARSE_H
#define OUTPUT_MAT_SPARSE_H
#include "source_basis/module_ao/parallel_orbitals.h"
#include "source_basis/module_nao/two_center_bundle.h"
#include "source_cell/klist.h"
#include "source_hamilt/hamilt.h"
#include "source_cell/module_neighbor/sltk_grid_driver.h"
#include "source_lcao/module_dftu/dftu_lcao.h" // mohan add 20251107
namespace ModuleIO
{
struct MatSparseOutputOptions
{
bool out_mat_dh = false;
bool out_mat_ds = false;
bool out_mat_t = false;
bool out_mat_r = false;
int dh_precision = 16;
int ds_precision = 16;
int t_precision = 16;
int r_precision = 16;
double sparse_threshold = 1e-10;
bool binary = false;
};
/// @brief the output interface to write the sparse matrix of dH, dS, T, and r
template <typename T>
void output_mat_sparse(const MatSparseOutputOptions& options,
const int& istep,
const ModuleBase::matrix& v_eff,
const Parallel_Orbitals& pv,
const TwoCenterBundle& two_center_bundle,
const LCAO_Orbitals& orb,
UnitCell& ucell,
const Grid_Driver& grid,
const K_Vectors& kv,
hamilt::Hamilt<T>* p_ham,
Plus_U* p_dftu);
/// @brief legacy bool-only interface kept for source compatibility
template <typename T>
void output_mat_sparse(const bool& out_mat_dh,
const bool& out_mat_ds,
const bool& out_mat_t,
const bool& out_mat_r,
const int& istep,
const ModuleBase::matrix& v_eff,
const Parallel_Orbitals& pv,
const TwoCenterBundle& two_center_bundle,
const LCAO_Orbitals& orb,
UnitCell& ucell,
const Grid_Driver& grid,
const K_Vectors& kv,
hamilt::Hamilt<T>* p_ham,
Plus_U* p_dftu);
} // namespace ModuleIO
#endif // OUTPUT_MAT_SPARSE_H