| 96 | }; |
| 97 | |
| 98 | bool almost_equal (ParticleReal lhs, ParticleReal rhs) |
| 99 | { |
| 100 | auto const scale = std::max({ParticleReal(1.0), std::abs(lhs), std::abs(rhs)}); |
| 101 | auto const tol = std::max(ParticleReal(1.0e-12), |
| 102 | ParticleReal(64.0) * std::numeric_limits<ParticleReal>::epsilon()); |
| 103 | return std::abs(lhs - rhs) <= tol * scale; |
| 104 | } |
| 105 | |
| 106 | void get_position_unit_cell(Real* r, const IntVect& nppc, int i_part) |
| 107 | { |
no outgoing calls
no test coverage detected