ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
write_dmk.h
Go to the documentation of this file.
1#ifndef WRITE_DMK_H
2#define WRITE_DMK_H
3
6#include "source_cell/klist.h"
7
8#include <fstream>
9#include <string>
10#include <vector>
11
12namespace ModuleIO {
13
22std::string dmk_gen_fname(const bool gamma_only, const int ispin, const int nspin, const int ik, const int istep);
23
28bool dmk_readData(std::ifstream& ifs, double& data);
29
35bool dmk_readData(std::ifstream& ifs, std::complex<double>& data);
36
60template <typename T>
61bool read_dmk(const int nspin,
62 const int nk,
63 const K_Vectors &kv,
64 const Parallel_Blkcyclic& pv,
65 const bool column_major,
66 const std::string& dmk_dir,
67 const int istep,
68 const int out_app_flag,
69 std::vector<std::vector<T>>& dmk,
70 std::ofstream &ofs_running);
71
100template <typename T>
101void write_dmk(const std::vector<std::vector<T>>& dmk,
102 const K_Vectors &kv,
103 const int precision,
104 const std::vector<double>& efs,
105 const UnitCell* ucell,
106 const Parallel_Blkcyclic& pv,
107 const bool column_major,
108 const std::string& dmk_dir,
109 const int istep,
110 const int out_app_flag,
111 std::ofstream& ofs_running);
112
113} // namespace ModuleIO
114
115#endif
Internal helpers shared by the R-space sparse text writers. Declared here (instead of duplicated in e...
Definition csr_reader.cpp:8
void write_dmk(const std::vector< std::vector< T > > &dmk, const K_Vectors &kv, const int precision, const std::vector< double > &efs, const UnitCell *ucell, const Parallel_Blkcyclic &pv, const bool column_major, const std::string &dmk_dir, const int istep, const int out_app_flag, std::ofstream &ofs_running)
Writes the DMK data to a file.
Definition write_dmk.cpp:527
std::string dmk_gen_fname(const bool gamma_only, const int ispin, const int nspin, const int ik, const int istep)
Generates the filename for the DMK file based on the given parameters.
Definition write_dmk.cpp:112
bool read_dmk(const int nspin, const int nk, const K_Vectors &kv, const Parallel_Blkcyclic &pv, const bool column_major, const std::string &dmk_dir, const int istep, const int out_app_flag, std::vector< std::vector< T > > &dmk, std::ofstream &ofs_running)
Reads the DMK data from a file.
Definition write_dmk.cpp:208
bool dmk_readData(std::ifstream &ifs, double &data)
Read one double from a file.
Definition write_dmk.cpp:143