Skip to content

Commit

Permalink
Merge pull request #2578 from Hyeondeok-Shin/deterministic_test
Browse files Browse the repository at this point in the history
Add separated tolerance for r^2 == dr^2 check for the mixed precision…
  • Loading branch information
ye-luo committed Jul 14, 2020
2 parents a5d2e82 + 1620afe commit da99fef
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/QMCWaveFunctions/tests/test_hybridrep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,11 @@ TEST_CASE("Hybridrep SPO from HDF diamond_2x1x1", "[wavefunction]")
<< "r = " << r << " dr = " << dr << std::endl;
std::cout << "abs(r^2 - dr^2) = " << std::abs(r * r - dot(dr, dr))
<< " epsilon = " << std::numeric_limits<double>::epsilon() << std::endl;
#if defined(MIXED_PRECISION)
REQUIRE(std::abs(r * r - dot(dr, dr)) < std::numeric_limits<double>::epsilon() * 1e8);
#else
REQUIRE(std::abs(r * r - dot(dr, dr)) < std::numeric_limits<double>::epsilon());
#endif

// for vgl
SPOSet::ValueMatrix_t psiM(elec_.R.size(), spo->getOrbitalSetSize());
Expand Down

0 comments on commit da99fef

Please sign in to comment.