12 std::cout <<
"SkParserHDF5::parse could not open " << fname << std::endl;
17 std::vector<int> readShape;
19 assert(readShape[1] == 3);
20 std::array<int, 2> kdims{readShape[0], readShape[1]};
21 std::vector<RealType> ktmp;
23 for (
int ik = 0; ik < readShape[0]; ik++)
27 k[1] = ktmp[3 * ik + 1];
28 k[2] = ktmp[3 * ik + 2];
35 assert(readShape[1] == nKpts);
36 std::vector<RealType> rhok_e_tmp;
37 std::array<int, 2> rhok_e_dims{readShape[0], readShape[1]};
39 int nBlocks = readShape[0];
43 std::vector<RealType> rhok_i_tmp;
44 std::array<int, 2> rhok_i_dims{readShape[0], readShape[1]};
46 assert(readShape[0] == nBlocks);
47 assert(readShape[1] == nKpts);
51 std::vector<RealType> rhok_r_tmp;
52 std::array<int, 2> rhok_r_dims{readShape[0], readShape[1]};
54 assert(readShape[0] == nBlocks);
55 assert(readShape[1] == nKpts);
60 for (
int ik = 0; ik < nKpts; ik++)
62 std::vector<RealType> block_data;
63 for (
int ib = 0; ib < nBlocks; ib++)
66 re = rhok_e_tmp[nKpts * ib + ik];
67 rr = rhok_r_tmp[nKpts * ib + ik];
68 ri = rhok_i_tmp[nKpts * ib + ik];
69 block_data.push_back(re - (rr * rr + ri * ri));
std::vector< RealType > skerr_raw
bool open(const std::filesystem::path &fname, unsigned flags=H5F_ACC_RDWR)
open a file
helper functions for EinsplineSetBuilder
QTBase::RealType RealType
std::vector< PosType > kgridraw
std::vector< RealType > skraw
void close()
close all the open groups and file
void readSlabReshaped(T &data, const std::array< IT, RANK > &shape, const std::string &aname)
read file dataset with a specific shape into a container and check status
bool getShape(const std::string &aname, std::vector< int > &sizes_out)
read the shape of multidimensional filespace from the group aname this function can be used to query ...
void getStats(const std::vector< RealType > &vals, RealType &avg, RealType &err, int start)
Simpleaverage and error estimate.
int estimateEquilibration(const std::vector< RealType > &vals, RealType frac)
estimate equilibration of block data
void parse(const std::string &fname) override