Skip to content

Commit 7c371ad

Browse files
authoredMar 16, 2025··
Merge pull request #5382 from ye-luo/fix-sk
Fix LongRange unit test issue and adjust MPC reference value.
2 parents eb1203e + 402dad7 commit 7c371ad

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎src/Particle/LongRange/tests/test_StructFact.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ TEST_CASE("StructFact", "[lrhandler]")
6161

6262
for (int i = 0; i < ref.groups(); i++)
6363
{
64-
std::complex<QMCTraits::RealType> rhok_sum, rhok_even_sum;
64+
std::complex<double> rhok_sum, rhok_even_sum;
6565
for (int ik = 0; ik < simulation_cell.getKLists().numk; ik++)
66-
rhok_sum += std::complex<QMCTraits::RealType>(sk.rhok_r[i][ik], sk.rhok_i[i][ik]);
66+
rhok_sum += std::complex<double>(sk.rhok_r[i][ik], sk.rhok_i[i][ik]);
6767

6868
//std::cout << std::setprecision(14) << rhok_sum << std::endl;
6969
CHECK(ComplexApprox(rhok_sum).epsilon(5e-5) == rhok_sum_ref[i]);

‎tests/solids/diamondC_1x1x1_pp/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,7 @@ if(QMC_MIXED_PRECISION)
15021502
list(APPEND DET_DIAMOND_DMC_MULTI2_SCALARS "ionion" "-12.77566507 0.000001")
15031503
list(APPEND DET_DIAMOND_DMC_MULTI2_SCALARS "localecp" "-15.41387689 0.00001471")
15041504
list(APPEND DET_DIAMOND_DMC_MULTI2_SCALARS "nonlocalecp" "6.10588419 0.00001448")
1505-
list(APPEND DET_DIAMOND_DMC_MULTI2_SCALARS "mpc" "-2.61905734 0.00000179")
1505+
list(APPEND DET_DIAMOND_DMC_MULTI2_SCALARS "mpc" "-2.61905471 0.00000179")
15061506
list(APPEND DET_DIAMOND_DMC_MULTI2_SCALARS "samples" "9 0.0")
15071507
# DMC cycle 3
15081508
list(APPEND DET_DIAMOND_DMC_MULTI3_SCALARS "totenergy" "-8.93222965 0.00001861")

0 commit comments

Comments
 (0)
Please sign in to comment.