33 I.reset(
new TPM(L,N));
35 Q.reset(
new TPM(L,N));
39 G.reset(
new PHM(L,N));
48 I.reset(
new TPM(*orig.
I));
50 Q.reset(
new TPM(*orig.
Q));
54 G.reset(
new PHM(*orig.
G));
63 I = std::move(orig.I);
64 Q = std::move(orig.Q);
65 G = std::move(orig.G);
70 I.reset(
new TPM(*orig.
I));
72 Q.reset(
new TPM(*orig.
Q));
76 G.reset(
new PHM(*orig.
G));
84 I = std::move(orig.I);
85 Q = std::move(orig.Q);
86 G = std::move(orig.G);
289 output <<
"I block:" << std::endl;
290 output << *sup.
I << std::endl;
293 output <<
"Q block:" << std::endl;
294 output << *sup.
Q << std::endl;
298 output <<
"G block:" << std::endl;
299 output << *sup.
G << std::endl;
310 result =
I->ddot(*x.
I);
313 result +=
Q->ddot(*x.
Q);
317 result +=
G->ddot(*x.
G);
325 I->daxpy(alpha, *y.
I);
328 Q->daxpy(alpha, *y.
Q);
332 G->daxpy(alpha, *y.
G);
338 I->sep_pm(*pos.
I, *neg.
I);
341 Q->sep_pm(*pos.
Q, *neg.
Q);
345 G->sep_pm(*pos.
G, *neg.
G);
354 *
this = lineq.
gu_0(0);
358 for(
int i = 1;i < lineq.
gnr();++i)
368 hid_t file_id, main_group_id, group_id;
371 file_id = H5Fcreate(filename.c_str(), H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
373 main_group_id = H5Gcreate(file_id,
"SUP", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
375 group_id = H5Gcreate(main_group_id,
"I", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
377 I->WriteToFile(group_id);
379 status = H5Gclose(group_id);
383 group_id = H5Gcreate(main_group_id,
"Q", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
385 Q->WriteToFile(group_id);
387 status = H5Gclose(group_id);
392 group_id = H5Gcreate(main_group_id,
"G", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
394 G->WriteToFile(group_id);
396 status = H5Gclose(group_id);
400 status = H5Gclose(main_group_id);
403 status = H5Fclose(file_id);
414 hid_t file_id, main_group_id, group_id;
417 file_id = H5Fopen(filename.c_str(), H5F_ACC_RDONLY, H5P_DEFAULT);
420 main_group_id = H5Gopen(file_id,
"/SUP", H5P_DEFAULT);
423 group_id = H5Gopen(main_group_id,
"I", H5P_DEFAULT);
426 I->ReadFromFile(group_id);
428 status = H5Gclose(group_id);
432 group_id = H5Gopen(main_group_id,
"Q", H5P_DEFAULT);
435 Q->ReadFromFile(group_id);
437 status = H5Gclose(group_id);
442 group_id = H5Gopen(main_group_id,
"G", H5P_DEFAULT);
445 G->ReadFromFile(group_id);
447 status = H5Gclose(group_id);
451 status = H5Gclose(main_group_id);
454 status = H5Fclose(file_id);
void daxpy(double, const SUP &)
double ddot(const SUP &) const
SUP & operator+=(const SUP &)
double ge_ortho(int) const
void WriteToFile(std::string filename) const
void L_map(const SUP &, const SUP &)
std::ostream & operator<<(std::ostream &output, const doci2DM::BlockStructure< MyBlockType > &blocks_p)
void init_S(const Lineq &)
int L
the size of the sp DOCI space (there are 2*L sp states)
SUP & operator=(const SUP &)
void sep_pm(SUP &, SUP &)
#define HDF5_STATUS_CHECK(status)
std::unique_ptr< TPM > I
the RDM matrix
const SUP & gu_0(int) const
std::unique_ptr< PHM > G
the G matrix
std::unique_ptr< TPM > Q
the Q matrix
void ReadFromFile(std::string filename)
SUP & operator-=(const SUP &)