diff --git a/docs/advanced/input_files/input-main.md b/docs/advanced/input_files/input-main.md index 3dd26fec43..5161f096c2 100644 --- a/docs/advanced/input_files/input-main.md +++ b/docs/advanced/input_files/input-main.md @@ -1645,10 +1645,13 @@ These variables are used to control the output of properties. ### out_dm - **Type**: Boolean -- **Availability**: Numerical atomic orbital basis (gamma-only algorithm) +- **Availability**: Numerical atomic orbital basis - **Description**: Whether to output the density matrix of localized orbitals into files in the folder `OUT.${suffix}`. The files are named as: - - nspin = 1: SPIN1_DM; - - nspin = 2: SPIN1_DM, and SPIN2_DM. + - For gamma only case: + - nspin = 1: SPIN1_DM; + - nspin = 2: SPIN1_DM, and SPIN2_DM. + - For multi-k points case: + - SPIN\*_K\*_DM, where \* stands for index of spin and kpoints; - **Default**: False ### out_dm1 diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.hpp b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.hpp index 8863b8b19c..5b756cdec3 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.hpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.hpp @@ -136,6 +136,11 @@ OperatorEXX>::OperatorEXX(HS_Matrix_K* hsk_in, { // Read HexxR in binary format (old version) const std::string file_name_exx_cereal = PARAM.globalv.global_readin_dir + "HexxR_" + std::to_string(GlobalV::MY_RANK); + std::ifstream ifs(file_name_exx_cereal, std::ios::binary); + if (!ifs) + { + ModuleBase::WARNING_QUIT("OperatorEXX", "Can't open EXX file < " + file_name_exx_cereal + " >."); + } if (GlobalC::exx_info.info_ri.real_number) { ModuleIO::read_Hexxs_cereal(file_name_exx_cereal, *Hexxd); diff --git a/source/module_io/io_dmk.cpp b/source/module_io/io_dmk.cpp index 7d376ed20f..47e274ab03 100644 --- a/source/module_io/io_dmk.cpp +++ b/source/module_io/io_dmk.cpp @@ -1,9 +1,9 @@ #include "module_io/io_dmk.h" -#include "module_parameter/parameter.h" #include "module_base/parallel_common.h" #include "module_base/scalapack_connector.h" #include "module_base/timer.h" +#include "module_parameter/parameter.h" /* The format of the DMK file is as follows: @@ -55,50 +55,53 @@ Direct ''' */ -std::string ModuleIO::dmk_gen_fname(const bool gamma_only, - const int ispin, - const int ik) { - if (gamma_only) { +std::string ModuleIO::dmk_gen_fname(const bool gamma_only, const int ispin, const int ik) +{ + if (gamma_only) + { return "SPIN" + std::to_string(ispin + 1) + "_DM"; - } else { - // this case is not implemented now. - ModuleBase::WARNING_QUIT("dmk_gen_fname", - "Not implemented for non-gamma_only case."); + } + else + { + return "SPIN" + std::to_string(ispin + 1) + "_K" + std::to_string(ik + 1) + "_DM"; } } -void ModuleIO::dmk_write_ucell(std::ofstream& ofs, const UnitCell* ucell) { +void ModuleIO::dmk_write_ucell(std::ofstream& ofs, const UnitCell* ucell) +{ // write the UnitCell information ofs << ucell->latName << std::endl; ofs << " " << ucell->lat0 * ModuleBase::BOHR_TO_A << std::endl; - ofs << " " << ucell->latvec.e11 << " " << ucell->latvec.e12 << " " - << ucell->latvec.e13 << std::endl; - ofs << " " << ucell->latvec.e21 << " " << ucell->latvec.e22 << " " - << ucell->latvec.e23 << std::endl; - ofs << " " << ucell->latvec.e31 << " " << ucell->latvec.e32 << " " - << ucell->latvec.e33 << std::endl; - for (int it = 0; it < ucell->ntype; it++) { + ofs << " " << ucell->latvec.e11 << " " << ucell->latvec.e12 << " " << ucell->latvec.e13 << std::endl; + ofs << " " << ucell->latvec.e21 << " " << ucell->latvec.e22 << " " << ucell->latvec.e23 << std::endl; + ofs << " " << ucell->latvec.e31 << " " << ucell->latvec.e32 << " " << ucell->latvec.e33 << std::endl; + for (int it = 0; it < ucell->ntype; it++) + { ofs << " " << ucell->atoms[it].label; } ofs << std::endl; - for (int it = 0; it < ucell->ntype; it++) { + for (int it = 0; it < ucell->ntype; it++) + { ofs << " " << ucell->atoms[it].na; } ofs << std::endl; ofs << "Direct" << std::endl; - for (int it = 0; it < ucell->ntype; it++) { + for (int it = 0; it < ucell->ntype; it++) + { Atom* atom = &ucell->atoms[it]; ofs << std::setprecision(15); - for (int ia = 0; ia < ucell->atoms[it].na; ia++) { - ofs << " " << atom->taud[ia].x << " " << atom->taud[ia].y << " " - << atom->taud[ia].z << std::endl; + for (int ia = 0; ia < ucell->atoms[it].na; ia++) + { + ofs << " " << atom->taud[ia].x << " " << atom->taud[ia].y << " " << atom->taud[ia].z << std::endl; } } } -void ModuleIO::dmk_read_ucell(std::ifstream& ifs) { +void ModuleIO::dmk_read_ucell(std::ifstream& ifs) +{ std::string tmp; - for (int i = 0; i < 6; i++) { + for (int i = 0; i < 6; i++) + { std::getline(ifs, tmp); // latName + lat0 + latvec + atom label } std::getline(ifs, tmp); // atom number of each type @@ -106,21 +109,38 @@ void ModuleIO::dmk_read_ucell(std::ifstream& ifs) { std::istringstream iss(tmp); int natom = 0; int total_natom = 0; - while (iss >> natom) { + while (iss >> natom) + { total_natom += natom; } - for (int i = 0; i < total_natom + 1; i++) { + for (int i = 0; i < total_natom + 1; i++) + { std::getline(ifs, tmp); // Direct + atom coordinates } } -void ModuleIO::dmk_readData(std::ifstream& ifs, double& data) { ifs >> data; } +void ModuleIO::dmk_readData(std::ifstream& ifs, double& data) +{ + ifs >> data; +} -void ModuleIO::dmk_readData(std::ifstream& ifs, std::complex& data) { - double real, imag; - ifs >> real; - ifs >> imag; - data = std::complex(real, imag); +void ModuleIO::dmk_readData(std::ifstream& ifs, std::complex& data) +{ + std::string complex_str; + ifs >> complex_str; + + size_t comma_pos = complex_str.find(','); + if (complex_str.front() == '(' && complex_str.back() == ')' && comma_pos != std::string::npos) + { + double real = std::stod(complex_str.substr(1, comma_pos - 1)); + double imag = std::stod(complex_str.substr(comma_pos + 1, complex_str.size() - comma_pos - 2)); + data = std::complex(real, imag); + } + else + { + ModuleBase::WARNING_QUIT("ModuleIO::dmk_readData", + "Invalid complex number format: " + complex_str); + } } template @@ -128,7 +148,8 @@ bool ModuleIO::read_dmk(const int nspin, const int nk, const Parallel_2D& pv, const std::string& dmk_dir, - std::vector>& dmk) { + std::vector>& dmk) +{ ModuleBase::TITLE("ModuleIO", "read_dmk"); ModuleBase::timer::tick("ModuleIO", "read_dmk"); @@ -139,36 +160,34 @@ bool ModuleIO::read_dmk(const int nspin, int nlocal = pv.get_global_row_size(); bool gamma_only = std::is_same::value; - std::vector> dmk_global(nspin * nk, std::vector(nlocal * nlocal,0)); + std::vector> dmk_global(nspin * nk, std::vector(nlocal * nlocal, 0)); // write a lambda function to check the consistency of the data - auto check_consistency = [&](const std::string& fn, - const std::string& name, - const std::string& value, - const int& target) { - if (std::stoi(value) != target) { - ModuleBase::WARNING("ModuleIO::read_dmk", - name + " is not consistent in file < " + fn - + " >."); - std::cout << name << " = " << target << ", " << name - << " in file = " << value << std::endl; - return false; - } - return true; - }; + auto check_consistency + = [&](const std::string& fn, const std::string& name, const std::string& value, const int& target) { + if (std::stoi(value) != target) + { + ModuleBase::WARNING("ModuleIO::read_dmk", name + " is not consistent in file < " + fn + " >."); + std::cout << name << " = " << target << ", " << name << " in file = " << value << std::endl; + return false; + } + return true; + }; bool read_success = true; std::string tmp; - if (my_rank == 0) { - for (int ispin = 0; ispin < nspin; ispin++) { - for (int ik = 0; ik < nk; ik++) { + if (my_rank == 0) + { + for (int ispin = 0; ispin < nspin; ispin++) + { + for (int ik = 0; ik < nk; ik++) + { std::string fn = dmk_dir + dmk_gen_fname(gamma_only, ispin, ik); std::ifstream ifs(fn.c_str()); - if (!ifs) { - ModuleBase::WARNING("ModuleIO::read_dmk", - "Can't open DENSITY MATRIX File < " + fn - + " >."); + if (!ifs) + { + ModuleBase::WARNING("ModuleIO::read_dmk", "Can't open DENSITY MATRIX File < " + fn + " >."); read_success = false; break; } @@ -177,7 +196,8 @@ bool ModuleIO::read_dmk(const int nspin, dmk_read_ucell(ifs); ifs >> tmp; // nspin - if (!check_consistency(fn, "ispin", tmp, ispin + 1)) { + if (!check_consistency(fn, "nspin", tmp, nspin)) + { read_success = false; ifs.close(); break; @@ -186,29 +206,32 @@ bool ModuleIO::read_dmk(const int nspin, ifs >> tmp; ifs >> tmp; // fermi energy ifs >> tmp; // nlocal - if (!check_consistency(fn, "nlocal", tmp, nlocal)) { + if (!check_consistency(fn, "nlocal", tmp, nlocal)) + { read_success = false; ifs.close(); break; } ifs >> tmp; // nlocal - if (!check_consistency(fn, "nlocal", tmp, nlocal)) { + if (!check_consistency(fn, "nlocal", tmp, nlocal)) + { read_success = false; ifs.close(); break; } // read the DMK data - for (int i = 0; i < nlocal; ++i) { - for (int j = 0; j < nlocal; ++j) { - dmk_readData( - ifs, - dmk_global[ik + nk * ispin][i * nlocal + j]); + for (int i = 0; i < nlocal; ++i) + { + for (int j = 0; j < nlocal; ++j) + { + dmk_readData(ifs, dmk_global[ik + nk * ispin][i * nlocal + j]); } } ifs.close(); } // ik - if (!read_success) { + if (!read_success) + { break; } } // ispin @@ -218,14 +241,15 @@ bool ModuleIO::read_dmk(const int nspin, MPI_Bcast(&read_success, 1, MPI_C_BOOL, 0, pv.comm()); #endif - if (read_success) { + if (read_success) + { #ifdef __MPI // seperate dmk data to each processor with 2D block distribution - dmk.resize(nspin * nk, - std::vector(pv.get_row_size() * pv.get_col_size())); + dmk.resize(nspin * nk, std::vector(pv.get_row_size() * pv.get_col_size())); Parallel_2D pv_glb; pv_glb.set(nlocal, nlocal, nlocal, pv.blacs_ctxt); - for (int ik = 0; ik < nspin * nk; ik++) { + for (int ik = 0; ik < nspin * nk; ik++) + { Cpxgemr2d(nlocal, nlocal, dmk_global[ik].data(), @@ -251,7 +275,8 @@ void ModuleIO::write_dmk(const std::vector>& dmk, const int precision, const std::vector& efs, const UnitCell* ucell, - const Parallel_2D& pv) { + const Parallel_2D& pv) +{ ModuleBase::TITLE("ModuleIO", "write_dmk"); ModuleBase::timer::tick("ModuleIO", "write_dmk"); @@ -264,17 +289,18 @@ void ModuleIO::write_dmk(const std::vector>& dmk, int nlocal = pv.get_global_row_size(); int nspin = efs.size(); int nk = dmk.size() / nspin; - if (nk * nspin != dmk.size()) { - ModuleBase::WARNING_QUIT( - "write_dmk", - "The size of dmk is not consistent with nspin and nk."); + if (nk * nspin != dmk.size()) + { + ModuleBase::WARNING_QUIT("write_dmk", "The size of dmk is not consistent with nspin and nk."); } Parallel_2D pv_glb; // when nspin == 2, assume the order of K in dmk is K1_up, K2_up, ..., // K1_down, K2_down, ... - for (int ispin = 0; ispin < nspin; ispin++) { - for (int ik = 0; ik < nk; ik++) { + for (int ispin = 0; ispin < nspin; ispin++) + { + for (int ik = 0; ik < nk; ik++) + { // gather dmk[ik] to dmk_global std::vector dmk_global(my_rank == 0 ? nlocal * nlocal : 0); #ifdef __MPI @@ -294,40 +320,43 @@ void ModuleIO::write_dmk(const std::vector>& dmk, dmk_global = dmk[ik + nk * ispin]; #endif - if (my_rank == 0) { - std::string fn = PARAM.globalv.global_out_dir - + dmk_gen_fname(gamma_only, ispin, ik); + if (my_rank == 0) + { + std::string fn = PARAM.globalv.global_out_dir + dmk_gen_fname(gamma_only, ispin, ik); std::ofstream ofs(fn.c_str()); - if (!ofs) { - ModuleBase::WARNING("ModuleIO::write_dmk", - "Can't create DENSITY MATRIX File < " - + fn + " >."); + if (!ofs) + { + ModuleBase::WARNING("ModuleIO::write_dmk", "Can't create DENSITY MATRIX File < " + fn + " >."); continue; } // write the UnitCell information dmk_write_ucell(ofs, ucell); - ofs << "\n " << dmk.size(); // nspin + ofs << "\n " << nspin; // nspin ofs << "\n " << std::fixed << std::setprecision(5) << efs[ispin] << " (fermi energy)"; ofs << "\n " << nlocal << " " << nlocal << std::endl; ofs << std::setprecision(precision); ofs << std::scientific; - for (int i = 0; i < nlocal; ++i) { - for (int j = 0; j < nlocal; ++j) { - if (j % 8 == 0) { + for (int i = 0; i < nlocal; ++i) + { + for (int j = 0; j < nlocal; ++j) + { + if (j % 8 == 0) + { ofs << "\n"; } - if (std::is_same::value) { + if (std::is_same::value) + { ofs << " " << dmk_global[i * nlocal + j]; - } else if (std::is_same, - T>::value) { - ofs << " (" << std::real(dmk_global[i * nlocal + j]) - << "," << std::imag(dmk_global[i * nlocal + j]) - << ")"; + } + else if (std::is_same, T>::value) + { + ofs << " (" << std::real(dmk_global[i * nlocal + j]) << "," + << std::imag(dmk_global[i * nlocal + j]) << ")"; } } } @@ -345,23 +374,20 @@ template bool ModuleIO::read_dmk(const int nspin, const std::string& dmk_dir, std::vector>& dmk); -template bool ModuleIO::read_dmk>( - const int nspin, - const int nk, - const Parallel_2D& pv, - const std::string& dmk_dir, - std::vector>>& dmk); - -template void - ModuleIO::write_dmk(const std::vector>& dmk, - const int precision, - const std::vector& efs, - const UnitCell* ucell, - const Parallel_2D& pv); - -template void ModuleIO::write_dmk>( - const std::vector>>& dmk, - const int precision, - const std::vector& efs, - const UnitCell* ucell, - const Parallel_2D& pv); +template bool ModuleIO::read_dmk>(const int nspin, + const int nk, + const Parallel_2D& pv, + const std::string& dmk_dir, + std::vector>>& dmk); + +template void ModuleIO::write_dmk(const std::vector>& dmk, + const int precision, + const std::vector& efs, + const UnitCell* ucell, + const Parallel_2D& pv); + +template void ModuleIO::write_dmk>(const std::vector>>& dmk, + const int precision, + const std::vector& efs, + const UnitCell* ucell, + const Parallel_2D& pv); diff --git a/source/module_io/read_input_item_output.cpp b/source/module_io/read_input_item_output.cpp index b10f1baf38..b960cf90d1 100644 --- a/source/module_io/read_input_item_output.cpp +++ b/source/module_io/read_input_item_output.cpp @@ -220,12 +220,6 @@ void ReadInput::item_output() para.input.out_dm = false; } }; - item.check_value = [](const Input_Item& item, const Parameter& para) { - if (para.sys.gamma_only_local == false && para.input.out_dm) - { - ModuleBase::WARNING_QUIT("ReadInput", "out_dm with k-point algorithm is not implemented yet."); - } - }; read_sync_bool(input.out_dm); this->add_item(item); } diff --git a/source/module_io/test/io_dmk_test.cpp b/source/module_io/test/io_dmk_test.cpp index 2acc323651..0e23380114 100644 --- a/source/module_io/test/io_dmk_test.cpp +++ b/source/module_io/test/io_dmk_test.cpp @@ -51,27 +51,29 @@ void init_pv(int nlocal, Parallel_2D& pv) #endif } -void gen_dmk(std::vector>& dmk, std::vector& efs, int nspin, int nk, int nlocal, Parallel_2D& pv) +template +void gen_dmk(std::vector>& dmk, std::vector& efs, int nspin, int nk, int nlocal, Parallel_2D& pv) { int myrank = 0; #ifdef __MPI MPI_Comm_rank(MPI_COMM_WORLD, &myrank); #endif - std::vector> dmk_global(nspin * nk, std::vector(nlocal * nlocal, 0.0)); + std::vector> dmk_global(nspin * nk, std::vector(nlocal * nlocal, T(0.0))); if (myrank == 0) { for (int i = 0; i < nspin * nk; i++) { for (int j = 0; j < nlocal * nlocal; j++) { - dmk_global[i][j] = 1.0 * i + 0.1 * j; + std::complex value = std::complex(1.0 * i + 0.1 * j, 0.1 * i + 1.0 * j); + dmk_global[i][j] = reinterpret_cast(&value)[0]; } } } #ifdef __MPI Parallel_2D pv_global; pv_global.init(nlocal, nlocal, nlocal, MPI_COMM_WORLD); - dmk.resize(nspin * nk, std::vector(pv.get_local_size(), 0.0)); + dmk.resize(nspin * nk, std::vector(pv.get_local_size(), 0.0)); for (int i = 0; i < nspin * nk; i++) { Cpxgemr2d(nlocal, @@ -104,12 +106,10 @@ TEST(DMKTest, GenFileName) { fname = ModuleIO::dmk_gen_fname(true, 1, 1); EXPECT_EQ(fname, "SPIN2_DM"); - std::string output; - testing::internal::CaptureStdout(); - EXPECT_EXIT(ModuleIO::dmk_gen_fname(false, 2, 0), - ::testing::ExitedWithCode(1), - ""); - output = testing::internal::GetCapturedStdout(); + fname = ModuleIO::dmk_gen_fname(false, 0, 0); + EXPECT_EQ(fname, "SPIN1_K1_DM"); + fname = ModuleIO::dmk_gen_fname(false, 1, 1); + EXPECT_EQ(fname, "SPIN2_K2_DM"); }; @@ -120,16 +120,20 @@ TEST(DMKTest,WriteDMK) { int nspin = 2; int nk = 1; + int nk_multik = 2; int nlocal = 20; std::vector> dmk; + std::vector>> dmk_multik; Parallel_2D pv; std::vector efs; init_pv(nlocal, pv); gen_dmk(dmk, efs, nspin, nk, nlocal, pv); + gen_dmk(dmk_multik, efs, nspin, nk_multik, nlocal, pv); PARAM.sys.global_out_dir = "./"; ModuleIO::write_dmk(dmk, 3, efs, ucell, pv); + ModuleIO::write_dmk(dmk_multik, 3, efs, ucell, pv); std::ifstream ifs; int pass = 0; @@ -172,8 +176,96 @@ TEST(DMKTest,WriteDMK) { str, testing::HasSubstr("2.600e+00 2.700e+00 2.800e+00 2.900e+00\n")); ifs.close(); + + fn = "SPIN1_K1_DM"; + ifs.open(fn); + str = std::string((std::istreambuf_iterator(ifs)), + std::istreambuf_iterator()); + EXPECT_THAT(str, testing::HasSubstr("0.00000 (fermi energy)")); + EXPECT_THAT(str, testing::HasSubstr("20 20")); + EXPECT_THAT( + str, + testing::HasSubstr("(0.000e+00,0.000e+00) (1.000e-01,1.000e+00) (2.000e-01,2.000e+00) " + "(3.000e-01,3.000e+00) (4.000e-01,4.000e+00) (5.000e-01,5.000e+00) " + "(6.000e-01,6.000e+00) (7.000e-01,7.000e+00)\n")); + EXPECT_THAT( + str, + testing::HasSubstr("(8.000e-01,8.000e+00) (9.000e-01,9.000e+00) (1.000e+00,1.000e+01) " + "(1.100e+00,1.100e+01) (1.200e+00,1.200e+01) (1.300e+00,1.300e+01) " + "(1.400e+00,1.400e+01) (1.500e+00,1.500e+01)\n")); + EXPECT_THAT( + str, + testing::HasSubstr("(1.600e+00,1.600e+01) (1.700e+00,1.700e+01) (1.800e+00,1.800e+01) (1.900e+00,1.900e+01)\n")); + ifs.close(); + + fn = "SPIN1_K2_DM"; + ifs.open(fn); + str = std::string((std::istreambuf_iterator(ifs)), + std::istreambuf_iterator()); + EXPECT_THAT(str, testing::HasSubstr("0.00000 (fermi energy)")); + EXPECT_THAT(str, testing::HasSubstr("20 20")); + EXPECT_THAT( + str, + testing::HasSubstr("(1.000e+00,1.000e-01) (1.100e+00,1.100e+00) (1.200e+00,2.100e+00) " + "(1.300e+00,3.100e+00) (1.400e+00,4.100e+00) (1.500e+00,5.100e+00) " + "(1.600e+00,6.100e+00) (1.700e+00,7.100e+00)\n")); + EXPECT_THAT( + str, + testing::HasSubstr("(1.800e+00,8.100e+00) (1.900e+00,9.100e+00) (2.000e+00,1.010e+01) " + "(2.100e+00,1.110e+01) (2.200e+00,1.210e+01) (2.300e+00,1.310e+01) " + "(2.400e+00,1.410e+01) (2.500e+00,1.510e+01)\n")); + EXPECT_THAT( + str, + testing::HasSubstr("(2.600e+00,1.610e+01) (2.700e+00,1.710e+01) (2.800e+00,1.810e+01) (2.900e+00,1.910e+01)\n")); + ifs.close(); + + fn = "SPIN2_K1_DM"; + ifs.open(fn); + str = std::string((std::istreambuf_iterator(ifs)), + std::istreambuf_iterator()); + EXPECT_THAT(str, testing::HasSubstr("0.10000 (fermi energy)")); + EXPECT_THAT(str, testing::HasSubstr("20 20")); + EXPECT_THAT( + str, + testing::HasSubstr("(2.000e+00,2.000e-01) (2.100e+00,1.200e+00) (2.200e+00,2.200e+00) " + "(2.300e+00,3.200e+00) (2.400e+00,4.200e+00) (2.500e+00,5.200e+00) " + "(2.600e+00,6.200e+00) (2.700e+00,7.200e+00)\n")); + EXPECT_THAT( + str, + testing::HasSubstr("(2.800e+00,8.200e+00) (2.900e+00,9.200e+00) (3.000e+00,1.020e+01) " + "(3.100e+00,1.120e+01) (3.200e+00,1.220e+01) (3.300e+00,1.320e+01) " + "(3.400e+00,1.420e+01) (3.500e+00,1.520e+01)\n")); + EXPECT_THAT( + str, + testing::HasSubstr("(3.600e+00,1.620e+01) (3.700e+00,1.720e+01) (3.800e+00,1.820e+01) (3.900e+00,1.920e+01)\n")); + ifs.close(); + + fn = "SPIN2_K2_DM"; + ifs.open(fn); + str = std::string((std::istreambuf_iterator(ifs)), + std::istreambuf_iterator()); + EXPECT_THAT(str, testing::HasSubstr("0.10000 (fermi energy)")); + EXPECT_THAT(str, testing::HasSubstr("20 20")); + EXPECT_THAT( + str, + testing::HasSubstr("(3.000e+00,3.000e-01) (3.100e+00,1.300e+00) (3.200e+00,2.300e+00) " + "(3.300e+00,3.300e+00) (3.400e+00,4.300e+00) (3.500e+00,5.300e+00) " + "(3.600e+00,6.300e+00) (3.700e+00,7.300e+00)\n")); + EXPECT_THAT( + str, + testing::HasSubstr("(3.800e+00,8.300e+00) (3.900e+00,9.300e+00) (4.000e+00,1.030e+01) " + "(4.100e+00,1.130e+01) (4.200e+00,1.230e+01) (4.300e+00,1.330e+01) " + "(4.400e+00,1.430e+01) (4.500e+00,1.530e+01)\n")); + EXPECT_THAT( + str, + testing::HasSubstr("(4.600e+00,1.630e+01) (4.700e+00,1.730e+01) (4.800e+00,1.830e+01) (4.900e+00,1.930e+01)\n")); + ifs.close(); remove("SPIN1_DM"); remove("SPIN2_DM"); + remove("SPIN1_K1_DM"); + remove("SPIN1_K2_DM"); + remove("SPIN2_K1_DM"); + remove("SPIN2_K2_DM"); } delete ucell; @@ -186,17 +278,24 @@ TEST(DMKTest,WriteDMK) { TEST(DMKTest, ReadDMK) { int nlocal = 26; std::vector> dmk; + std::vector>> dmk_multik; Parallel_2D pv; std::vector efs; PARAM.sys.global_out_dir = "./"; init_pv(nlocal, pv); EXPECT_TRUE(ModuleIO::read_dmk(1, 1, pv, "./support/", dmk)); + ModuleIO::read_dmk(1, 1, pv, "./support/", dmk_multik); + EXPECT_TRUE(ModuleIO::read_dmk(1, 1, pv, "./support/", dmk_multik)); EXPECT_EQ(dmk.size(), 1); + EXPECT_EQ(dmk_multik.size(), 1); EXPECT_EQ(dmk[0].size(), pv.get_local_size()); + EXPECT_EQ(dmk_multik[0].size(), pv.get_local_size()); if (GlobalV::MY_RANK == 0) { EXPECT_NEAR(dmk[0][0], 3.904e-01, 1e-6); + EXPECT_NEAR(dmk_multik[0][1].real(), -4.479e-03, 1e-6); + EXPECT_NEAR(dmk_multik[0][1].imag(), 3.208e-04, 1e-6); } } diff --git a/source/module_io/test/support/SPIN1_K1_DM b/source/module_io/test/support/SPIN1_K1_DM new file mode 100644 index 0000000000..9cacc456e0 --- /dev/null +++ b/source/module_io/test/support/SPIN1_K1_DM @@ -0,0 +1,119 @@ +none + 1 + 2.74242 2.74242 0 + 2.74242 0 2.74242 + 0 2.74242 2.74242 + Si + 2 +Direct + 0 0 0 + 0.25 0.25 0.25 + + 1 + 0.47370 (fermi energy) + 26 26 + + (1.411e-01,0.000e+00) (-4.479e-03,3.208e-04) (-1.892e-02,3.039e-02) (-1.892e-02,3.039e-02) (1.892e-02,-3.039e-02) (-2.049e-03,-5.032e-03) (-2.049e-03,-5.032e-03) (2.049e-03,5.032e-03) + (-6.505e-17,-4.647e-18) (2.931e-03,6.477e-03) (-2.931e-03,-6.477e-03) (-2.100e-16,6.607e-17) (-2.931e-03,-6.477e-03) (-1.319e-02,3.501e-02) (9.561e-03,-5.528e-03) (-3.910e-02,-2.210e-02) + (-3.910e-02,-2.210e-02) (3.910e-02,2.210e-02) (8.654e-04,5.306e-03) (8.654e-04,5.306e-03) (-8.654e-04,-5.306e-03) (-4.228e-18,-5.908e-17) (2.387e-03,7.959e-03) (-2.387e-03,-7.959e-03) + (2.414e-17,-1.120e-16) (-2.387e-03,-7.959e-03) + (-4.479e-03,-3.208e-04) (9.195e-04,0.000e+00) (1.916e-03,-3.586e-03) (1.916e-03,-3.586e-03) (-1.916e-03,3.586e-03) (2.135e-04,4.567e-04) (2.135e-04,4.567e-04) (-2.135e-04,-4.567e-04) + (8.745e-18,3.795e-18) (-2.300e-04,-7.056e-04) (2.300e-04,7.056e-04) (4.757e-17,-2.079e-17) (2.300e-04,7.056e-04) (9.561e-03,-5.528e-03) (-4.169e-04,3.347e-04) (3.255e-03,1.374e-03) + (3.255e-03,1.374e-03) (-3.255e-03,-1.374e-03) (-1.056e-04,-4.964e-04) (-1.056e-04,-4.964e-04) (1.056e-04,4.964e-04) (-3.458e-18,9.195e-18) (-1.504e-04,-6.531e-04) (1.504e-04,6.531e-04) + (9.041e-18,4.286e-17) (1.504e-04,6.531e-04) + (-1.892e-02,-3.039e-02) (1.916e-03,3.586e-03) (9.698e-02,-4.337e-19) (-1.816e-02,0.000e+00) (1.816e-02,-7.954e-16) (-6.302e-03,-3.018e-03) (8.177e-04,4.709e-03) (-8.177e-04,-4.709e-03) + (2.109e-03,-1.254e-03) (-3.513e-03,-6.260e-03) (3.513e-03,6.260e-03) (1.259e-16,-4.158e-17) (-1.438e-02,-4.085e-03) (3.910e-02,2.210e-02) (-3.255e-03,-1.374e-03) (-6.310e-02,-2.161e-02) + (3.424e-02,3.990e-02) (-3.424e-02,-3.990e-02) (8.765e-03,-3.550e-03) (-1.382e-03,-8.205e-04) (1.382e-03,8.205e-04) (1.113e-03,2.186e-03) (-4.284e-03,-2.804e-03) (4.284e-03,2.804e-03) + (-4.082e-17,3.216e-17) (-1.637e-02,1.991e-03) + (-1.892e-02,-3.039e-02) (1.916e-03,3.586e-03) (-1.816e-02,3.469e-18) (9.698e-02,0.000e+00) (1.816e-02,-8.500e-16) (8.177e-04,4.709e-03) (-6.302e-03,-3.018e-03) (-8.177e-04,-4.709e-03) + (-1.055e-03,6.268e-04) (-3.513e-03,-6.260e-03) (-1.438e-02,-4.085e-03) (1.826e-03,-1.086e-03) (3.513e-03,6.260e-03) (3.910e-02,2.210e-02) (-3.255e-03,-1.374e-03) (3.424e-02,3.990e-02) + (-6.310e-02,-2.161e-02) (-3.424e-02,-3.990e-02) (-1.382e-03,-8.205e-04) (8.765e-03,-3.550e-03) (1.382e-03,8.205e-04) (-5.566e-04,-1.093e-03) (-4.284e-03,-2.804e-03) (-1.637e-02,1.991e-03) + (9.641e-04,1.893e-03) (4.284e-03,2.804e-03) + (1.892e-02,3.039e-02) (-1.916e-03,-3.586e-03) (1.816e-02,7.954e-16) (1.816e-02,8.431e-16) (9.698e-02,-8.674e-19) (-8.177e-04,-4.709e-03) (-8.177e-04,-4.709e-03) (-6.302e-03,-3.018e-03) + (1.055e-03,-6.268e-04) (-1.438e-02,-4.085e-03) (-3.513e-03,-6.260e-03) (1.826e-03,-1.086e-03) (-3.513e-03,-6.260e-03) (-3.910e-02,-2.210e-02) (3.255e-03,1.374e-03) (-3.424e-02,-3.990e-02) + (-3.424e-02,-3.990e-02) (-6.310e-02,-2.161e-02) (1.382e-03,8.205e-04) (1.382e-03,8.205e-04) (8.765e-03,-3.550e-03) (5.566e-04,1.093e-03) (-1.637e-02,1.991e-03) (-4.284e-03,-2.804e-03) + (9.641e-04,1.893e-03) (-4.284e-03,-2.804e-03) + (-2.049e-03,5.032e-03) (2.135e-04,-4.567e-04) (-6.302e-03,3.018e-03) (8.177e-04,-4.709e-03) (-8.177e-04,4.709e-03) (9.914e-04,-5.421e-20) (3.256e-05,-4.476e-17) (-3.256e-05,-3.980e-17) + (-4.627e-05,2.191e-04) (1.097e-04,-2.210e-04) (-1.097e-04,2.210e-04) (3.974e-18,-1.249e-17) (1.691e-03,-3.401e-04) (-8.654e-04,-5.306e-03) (1.056e-04,4.964e-04) (8.765e-03,-3.550e-03) + (-1.382e-03,-8.205e-04) (1.382e-03,8.205e-04) (-6.392e-04,4.871e-04) (-1.950e-04,-3.626e-04) (1.950e-04,3.626e-04) (-2.156e-04,-6.047e-05) (-4.245e-05,-5.221e-04) (4.245e-05,5.221e-04) + (1.307e-17,4.747e-18) (1.374e-03,-8.137e-04) + (-2.049e-03,5.032e-03) (2.135e-04,-4.567e-04) (8.177e-04,-4.709e-03) (-6.302e-03,3.018e-03) (-8.177e-04,4.709e-03) (3.256e-05,4.476e-17) (9.914e-04,0.000e+00) (-3.256e-05,-2.742e-17) + (2.313e-05,-1.095e-04) (1.097e-04,-2.210e-04) (1.691e-03,-3.401e-04) (-4.007e-05,1.897e-04) (-1.097e-04,2.210e-04) (-8.654e-04,-5.306e-03) (1.056e-04,4.964e-04) (-1.382e-03,-8.205e-04) + (8.765e-03,-3.550e-03) (1.382e-03,8.205e-04) (-1.950e-04,-3.626e-04) (-6.392e-04,4.871e-04) (1.950e-04,3.626e-04) (1.078e-04,3.023e-05) (-4.245e-05,-5.221e-04) (1.374e-03,-8.137e-04) + (-1.867e-04,-5.237e-05) (4.245e-05,5.221e-04) + (2.049e-03,-5.032e-03) (-2.135e-04,4.567e-04) (-8.177e-04,4.709e-03) (-8.177e-04,4.709e-03) (-6.302e-03,3.018e-03) (-3.256e-05,3.976e-17) (-3.256e-05,2.742e-17) (9.914e-04,-5.421e-20) + (-2.313e-05,1.095e-04) (1.691e-03,-3.401e-04) (1.097e-04,-2.210e-04) (-4.007e-05,1.897e-04) (1.097e-04,-2.210e-04) (8.654e-04,5.306e-03) (-1.056e-04,-4.964e-04) (1.382e-03,8.205e-04) + (1.382e-03,8.205e-04) (8.765e-03,-3.550e-03) (1.950e-04,3.626e-04) (1.950e-04,3.626e-04) (-6.392e-04,4.871e-04) (-1.078e-04,-3.023e-05) (1.374e-03,-8.137e-04) (-4.245e-05,-5.221e-04) + (-1.867e-04,-5.237e-05) (-4.245e-05,-5.221e-04) + (-6.505e-17,4.647e-18) (8.745e-18,-3.795e-18) (2.109e-03,1.254e-03) (-1.055e-03,-6.268e-04) (1.055e-03,6.268e-04) (-4.627e-05,-2.191e-04) (2.313e-05,1.095e-04) (-2.313e-05,-1.095e-04) + (7.842e-05,0.000e+00) (-1.075e-04,-1.921e-04) (1.075e-04,1.921e-04) (2.092e-19,-9.571e-20) (-2.151e-04,-3.843e-04) (4.814e-17,-3.873e-17) (-1.086e-17,6.162e-18) (-1.113e-03,-2.186e-03) + (5.566e-04,1.093e-03) (-5.566e-04,-1.093e-03) (2.156e-04,6.047e-05) (-1.078e-04,-3.023e-05) (1.078e-04,3.023e-05) (-5.119e-06,7.825e-05) (-1.847e-04,-1.199e-04) (1.847e-04,1.199e-04) + (-1.577e-18,-2.256e-18) (-3.694e-04,-2.397e-04) + (2.931e-03,-6.477e-03) (-2.300e-04,7.056e-04) (-3.513e-03,6.260e-03) (-3.513e-03,6.260e-03) (-1.438e-02,4.085e-03) (1.097e-04,2.210e-04) (1.097e-04,2.210e-04) (1.691e-03,3.401e-04) + (-1.075e-04,1.921e-04) (3.174e-03,0.000e+00) (5.354e-04,-9.107e-18) (-1.863e-04,3.328e-04) (5.354e-04,2.602e-18) (2.387e-03,7.959e-03) (-1.504e-04,-6.531e-04) (4.284e-03,2.804e-03) + (4.284e-03,2.804e-03) (1.637e-02,-1.991e-03) (4.245e-05,5.221e-04) (4.245e-05,5.221e-04) (-1.374e-03,8.137e-04) (-1.847e-04,-1.199e-04) (2.872e-03,-1.079e-03) (4.101e-04,-6.505e-04) + (-3.199e-04,-2.076e-04) (4.101e-04,-6.505e-04) + (-2.931e-03,6.477e-03) (2.300e-04,-7.056e-04) (3.513e-03,-6.260e-03) (-1.438e-02,4.085e-03) (-3.513e-03,6.260e-03) (-1.097e-04,-2.210e-04) (1.691e-03,3.401e-04) (1.097e-04,2.210e-04) + (1.075e-04,-1.921e-04) (5.354e-04,9.053e-18) (3.174e-03,0.000e+00) (-1.863e-04,3.328e-04) (-5.354e-04,-4.120e-18) (-2.387e-03,-7.959e-03) (1.504e-04,6.531e-04) (-4.284e-03,-2.804e-03) + (1.637e-02,-1.991e-03) (4.284e-03,2.804e-03) (-4.245e-05,-5.221e-04) (-1.374e-03,8.137e-04) (4.245e-05,5.221e-04) (1.847e-04,1.199e-04) (4.101e-04,-6.505e-04) (2.872e-03,-1.079e-03) + (-3.199e-04,-2.076e-04) (-4.101e-04,6.505e-04) + (-2.100e-16,-6.607e-17) (4.757e-17,2.079e-17) (1.259e-16,4.158e-17) (1.826e-03,1.086e-03) (1.826e-03,1.086e-03) (3.968e-18,1.248e-17) (-4.007e-05,-1.897e-04) (-4.007e-05,-1.897e-04) + (2.126e-19,9.656e-20) (-1.863e-04,-3.328e-04) (-1.863e-04,-3.328e-04) (7.842e-05,0.000e+00) (-8.243e-18,-8.362e-18) (1.701e-16,-3.250e-17) (-5.318e-17,-5.205e-20) (5.719e-18,-5.061e-17) + (-9.641e-04,-1.893e-03) (-9.641e-04,-1.893e-03) (1.792e-17,-6.380e-18) (1.867e-04,5.237e-05) (1.867e-04,5.237e-05) (3.528e-18,1.890e-18) (-3.199e-04,-2.076e-04) (-3.199e-04,-2.076e-04) + (-5.119e-06,7.825e-05) (-1.148e-17,1.884e-18) + (-2.931e-03,6.477e-03) (2.300e-04,-7.056e-04) (-1.438e-02,4.085e-03) (3.513e-03,-6.260e-03) (-3.513e-03,6.260e-03) (1.691e-03,3.401e-04) (-1.097e-04,-2.210e-04) (1.097e-04,2.210e-04) + (-2.151e-04,3.843e-04) (5.354e-04,-2.602e-18) (-5.354e-04,4.228e-18) (-8.243e-18,8.328e-18) (3.174e-03,2.168e-19) (-2.387e-03,-7.959e-03) (1.504e-04,6.531e-04) (1.637e-02,-1.991e-03) + (-4.284e-03,-2.804e-03) (4.284e-03,2.804e-03) (-1.374e-03,8.137e-04) (-4.245e-05,-5.221e-04) (4.245e-05,5.221e-04) (-3.694e-04,-2.397e-04) (4.101e-04,-6.505e-04) (-4.101e-04,6.505e-04) + (-2.439e-19,-5.153e-18) (2.872e-03,-1.079e-03) + (-1.319e-02,-3.501e-02) (9.561e-03,5.528e-03) (3.910e-02,-2.210e-02) (3.910e-02,-2.210e-02) (-3.910e-02,2.210e-02) (-8.654e-04,5.306e-03) (-8.654e-04,5.306e-03) (8.654e-04,-5.306e-03) + (4.814e-17,3.873e-17) (2.387e-03,-7.959e-03) (-2.387e-03,7.959e-03) (1.701e-16,3.250e-17) (-2.387e-03,7.959e-03) (1.411e-01,0.000e+00) (-4.479e-03,-3.208e-04) (1.892e-02,3.039e-02) + (1.892e-02,3.039e-02) (-1.892e-02,-3.039e-02) (2.049e-03,-5.032e-03) (2.049e-03,-5.032e-03) (-2.049e-03,5.032e-03) (-3.863e-17,6.101e-17) (2.931e-03,-6.477e-03) (-2.931e-03,6.477e-03) + (-8.559e-17,7.268e-17) (-2.931e-03,6.477e-03) + (9.561e-03,5.528e-03) (-4.169e-04,-3.347e-04) (-3.255e-03,1.374e-03) (-3.255e-03,1.374e-03) (3.255e-03,-1.374e-03) (1.056e-04,-4.964e-04) (1.056e-04,-4.964e-04) (-1.056e-04,4.964e-04) + (-1.086e-17,-6.162e-18) (-1.504e-04,6.531e-04) (1.504e-04,-6.531e-04) (-5.318e-17,5.205e-20) (1.504e-04,-6.531e-04) (-4.479e-03,3.208e-04) (9.195e-04,0.000e+00) (-1.916e-03,-3.586e-03) + (-1.916e-03,-3.586e-03) (1.916e-03,3.586e-03) (-2.135e-04,4.567e-04) (-2.135e-04,4.567e-04) (2.135e-04,-4.567e-04) (5.893e-18,-1.079e-17) (-2.300e-04,7.056e-04) (2.300e-04,-7.056e-04) + (4.840e-18,-4.135e-17) (2.300e-04,-7.056e-04) + (-3.910e-02,2.210e-02) (3.255e-03,-1.374e-03) (-6.310e-02,2.161e-02) (3.424e-02,-3.990e-02) (-3.424e-02,3.990e-02) (8.765e-03,3.550e-03) (-1.382e-03,8.205e-04) (1.382e-03,-8.205e-04) + (-1.113e-03,2.186e-03) (4.284e-03,-2.804e-03) (-4.284e-03,2.804e-03) (5.719e-18,5.042e-17) (1.637e-02,1.991e-03) (1.892e-02,-3.039e-02) (-1.916e-03,3.586e-03) (9.698e-02,0.000e+00) + (-1.816e-02,-2.741e-16) (1.816e-02,-1.110e-15) (-6.302e-03,3.018e-03) (8.177e-04,-4.709e-03) (-8.177e-04,4.709e-03) (-2.109e-03,-1.254e-03) (3.513e-03,-6.260e-03) (-3.513e-03,6.260e-03) + (-1.428e-17,-2.683e-17) (1.438e-02,-4.085e-03) + (-3.910e-02,2.210e-02) (3.255e-03,-1.374e-03) (3.424e-02,-3.990e-02) (-6.310e-02,2.161e-02) (-3.424e-02,3.990e-02) (-1.382e-03,8.205e-04) (8.765e-03,3.550e-03) (1.382e-03,-8.205e-04) + (5.566e-04,-1.093e-03) (4.284e-03,-2.804e-03) (1.637e-02,1.991e-03) (-9.641e-04,1.893e-03) (-4.284e-03,2.804e-03) (1.892e-02,-3.039e-02) (-1.916e-03,3.586e-03) (-1.816e-02,2.706e-16) + (9.698e-02,0.000e+00) (1.816e-02,-1.428e-15) (8.177e-04,-4.709e-03) (-6.302e-03,3.018e-03) (-8.177e-04,4.709e-03) (1.055e-03,6.268e-04) (3.513e-03,-6.260e-03) (1.438e-02,-4.085e-03) + (-1.826e-03,-1.086e-03) (-3.513e-03,6.260e-03) + (3.910e-02,-2.210e-02) (-3.255e-03,1.374e-03) (-3.424e-02,3.990e-02) (-3.424e-02,3.990e-02) (-6.310e-02,2.161e-02) (1.382e-03,-8.205e-04) (1.382e-03,-8.205e-04) (8.765e-03,3.550e-03) + (-5.566e-04,1.093e-03) (1.637e-02,1.991e-03) (4.284e-03,-2.804e-03) (-9.641e-04,1.893e-03) (4.284e-03,-2.804e-03) (-1.892e-02,3.039e-02) (1.916e-03,-3.586e-03) (1.816e-02,1.105e-15) + (1.816e-02,1.429e-15) (9.698e-02,0.000e+00) (-8.177e-04,4.709e-03) (-8.177e-04,4.709e-03) (-6.302e-03,3.018e-03) (-1.055e-03,-6.268e-04) (1.438e-02,-4.085e-03) (3.513e-03,-6.260e-03) + (-1.826e-03,-1.086e-03) (3.513e-03,-6.260e-03) + (8.654e-04,-5.306e-03) (-1.056e-04,4.964e-04) (8.765e-03,3.550e-03) (-1.382e-03,8.205e-04) (1.382e-03,-8.205e-04) (-6.392e-04,-4.871e-04) (-1.950e-04,3.626e-04) (1.950e-04,-3.626e-04) + (2.156e-04,-6.047e-05) (4.245e-05,-5.221e-04) (-4.245e-05,5.221e-04) (1.792e-17,6.383e-18) (-1.374e-03,-8.137e-04) (2.049e-03,5.032e-03) (-2.135e-04,-4.567e-04) (-6.302e-03,-3.018e-03) + (8.177e-04,4.709e-03) (-8.177e-04,-4.709e-03) (9.914e-04,0.000e+00) (3.256e-05,2.959e-17) (-3.256e-05,3.816e-17) (4.627e-05,2.191e-04) (-1.097e-04,-2.210e-04) (1.097e-04,2.210e-04) + (-7.891e-18,7.295e-18) (-1.691e-03,-3.401e-04) + (8.654e-04,-5.306e-03) (-1.056e-04,4.964e-04) (-1.382e-03,8.205e-04) (8.765e-03,3.550e-03) (1.382e-03,-8.205e-04) (-1.950e-04,3.626e-04) (-6.392e-04,-4.871e-04) (1.950e-04,-3.626e-04) + (-1.078e-04,3.023e-05) (4.245e-05,-5.221e-04) (-1.374e-03,-8.137e-04) (1.867e-04,-5.237e-05) (-4.245e-05,5.221e-04) (2.049e-03,5.032e-03) (-2.135e-04,-4.567e-04) (8.177e-04,4.709e-03) + (-6.302e-03,-3.018e-03) (-8.177e-04,-4.709e-03) (3.256e-05,-2.959e-17) (9.914e-04,0.000e+00) (-3.256e-05,1.271e-16) (-2.313e-05,-1.095e-04) (-1.097e-04,-2.210e-04) (-1.691e-03,-3.401e-04) + (4.007e-05,1.897e-04) (1.097e-04,2.210e-04) + (-8.654e-04,5.306e-03) (1.056e-04,-4.964e-04) (1.382e-03,-8.205e-04) (1.382e-03,-8.205e-04) (8.765e-03,3.550e-03) (1.950e-04,-3.626e-04) (1.950e-04,-3.626e-04) (-6.392e-04,-4.871e-04) + (1.078e-04,-3.023e-05) (-1.374e-03,-8.137e-04) (4.245e-05,-5.221e-04) (1.867e-04,-5.237e-05) (4.245e-05,-5.221e-04) (-2.049e-03,-5.032e-03) (2.135e-04,4.567e-04) (-8.177e-04,-4.709e-03) + (-8.177e-04,-4.709e-03) (-6.302e-03,-3.018e-03) (-3.256e-05,-3.816e-17) (-3.256e-05,-1.271e-16) (9.914e-04,-5.082e-21) (2.313e-05,1.095e-04) (-1.691e-03,-3.401e-04) (-1.097e-04,-2.210e-04) + (4.007e-05,1.897e-04) (-1.097e-04,-2.210e-04) + (-4.228e-18,5.908e-17) (-3.458e-18,-9.195e-18) (1.113e-03,-2.186e-03) (-5.566e-04,1.093e-03) (5.566e-04,-1.093e-03) (-2.156e-04,6.047e-05) (1.078e-04,-3.023e-05) (-1.078e-04,3.023e-05) + (-5.119e-06,-7.825e-05) (-1.847e-04,1.199e-04) (1.847e-04,-1.199e-04) (3.526e-18,-1.895e-18) (-3.694e-04,2.397e-04) (-3.863e-17,-6.101e-17) (5.893e-18,1.079e-17) (-2.109e-03,1.254e-03) + (1.055e-03,-6.268e-04) (-1.055e-03,6.268e-04) (4.627e-05,-2.191e-04) (-2.313e-05,1.095e-04) (2.313e-05,-1.095e-04) (7.842e-05,0.000e+00) (-1.075e-04,1.921e-04) (1.075e-04,-1.921e-04) + (-7.035e-19,5.459e-18) (-2.151e-04,3.843e-04) + (2.387e-03,-7.959e-03) (-1.504e-04,6.531e-04) (-4.284e-03,2.804e-03) (-4.284e-03,2.804e-03) (-1.637e-02,-1.991e-03) (-4.245e-05,5.221e-04) (-4.245e-05,5.221e-04) (1.374e-03,8.137e-04) + (-1.847e-04,1.199e-04) (2.872e-03,1.079e-03) (4.101e-04,6.505e-04) (-3.199e-04,2.076e-04) (4.101e-04,6.505e-04) (2.931e-03,6.477e-03) (-2.300e-04,-7.056e-04) (3.513e-03,6.260e-03) + (3.513e-03,6.260e-03) (1.438e-02,4.085e-03) (-1.097e-04,2.210e-04) (-1.097e-04,2.210e-04) (-1.691e-03,3.401e-04) (-1.075e-04,-1.921e-04) (3.174e-03,0.000e+00) (5.354e-04,1.594e-17) + (-1.863e-04,-3.328e-04) (5.354e-04,3.984e-18) + (-2.387e-03,7.959e-03) (1.504e-04,-6.531e-04) (4.284e-03,-2.804e-03) (-1.637e-02,-1.991e-03) (-4.284e-03,2.804e-03) (4.245e-05,-5.221e-04) (1.374e-03,8.137e-04) (-4.245e-05,5.221e-04) + (1.847e-04,-1.199e-04) (4.101e-04,6.505e-04) (2.872e-03,1.079e-03) (-3.199e-04,2.076e-04) (-4.101e-04,-6.505e-04) (-2.931e-03,-6.477e-03) (2.300e-04,7.056e-04) (-3.513e-03,-6.260e-03) + (1.438e-02,4.085e-03) (3.513e-03,6.260e-03) (1.097e-04,-2.210e-04) (-1.691e-03,3.401e-04) (-1.097e-04,2.210e-04) (1.075e-04,1.921e-04) (5.354e-04,-1.594e-17) (3.174e-03,0.000e+00) + (-1.863e-04,-3.328e-04) (-5.354e-04,1.428e-17) + (2.414e-17,1.120e-16) (9.041e-18,-4.286e-17) (-4.077e-17,-3.203e-17) (9.641e-04,-1.893e-03) (9.641e-04,-1.893e-03) (1.308e-17,-4.740e-18) (-1.867e-04,5.237e-05) (-1.867e-04,5.237e-05) + (-1.572e-18,2.264e-18) (-3.199e-04,2.076e-04) (-3.199e-04,2.076e-04) (-5.119e-06,-7.825e-05) (-2.372e-19,5.130e-18) (-8.559e-17,-7.268e-17) (4.840e-18,4.135e-17) (-1.423e-17,2.686e-17) + (-1.826e-03,1.086e-03) (-1.826e-03,1.086e-03) (-7.891e-18,-7.295e-18) (4.007e-05,-1.897e-04) (4.007e-05,-1.897e-04) (-7.128e-19,-5.457e-18) (-1.863e-04,3.328e-04) (-1.863e-04,3.328e-04) + (7.842e-05,8.470e-22) (8.911e-18,-8.301e-19) + (-2.387e-03,7.959e-03) (1.504e-04,-6.531e-04) (-1.637e-02,-1.991e-03) (4.284e-03,-2.804e-03) (-4.284e-03,2.804e-03) (1.374e-03,8.137e-04) (4.245e-05,-5.221e-04) (-4.245e-05,5.221e-04) + (-3.694e-04,2.397e-04) (4.101e-04,6.505e-04) (-4.101e-04,-6.505e-04) (-1.148e-17,-1.884e-18) (2.872e-03,1.079e-03) (-2.931e-03,-6.477e-03) (2.300e-04,7.056e-04) (1.438e-02,4.085e-03) + (-3.513e-03,-6.260e-03) (3.513e-03,6.260e-03) (-1.691e-03,3.401e-04) (1.097e-04,-2.210e-04) (-1.097e-04,2.210e-04) (-2.151e-04,-3.843e-04) (5.354e-04,-4.093e-18) (-5.354e-04,-1.423e-17) + (8.904e-18,7.971e-19) (3.174e-03,0.000e+00) \ No newline at end of file diff --git a/source/module_io/test_serial/read_input_item_test.cpp b/source/module_io/test_serial/read_input_item_test.cpp index b8c30f89f1..14a274c87b 100644 --- a/source/module_io/test_serial/read_input_item_test.cpp +++ b/source/module_io/test_serial/read_input_item_test.cpp @@ -817,13 +817,6 @@ TEST_F(InputTest, Item_test) param.input.out_dm = true; it->second.reset_value(it->second, param); EXPECT_EQ(param.input.out_dm, false); - - param.sys.gamma_only_local = false; - param.input.out_dm = true; - testing::internal::CaptureStdout(); - EXPECT_EXIT(it->second.check_value(it->second, param), ::testing::ExitedWithCode(1), ""); - output = testing::internal::GetCapturedStdout(); - EXPECT_THAT(output, testing::HasSubstr("NOTICE")); } { // out_dm1 auto it = find_label("out_dm1", readinput.input_lists);