QMCPACK
test_TauParams.cpp
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2022 QMCPACK developers.
6 //
7 // File developed by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Laboratory
8 //
9 // File created by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Laboratory
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 #include "catch.hpp"
13 #include "TauParams.hpp"
14 
15 namespace qmcplusplus
16 {
17 
18 TEST_CASE("Taus", "[Particle]")
19 {
20  auto tau = 1.0;
21  auto invmass = 0.2;
22  auto spin_mass = 0.5;
23 
24  TauParams<QMCTraits::RealType, CoordsType::POS> taus_rs(tau, invmass, spin_mass);
25  CHECK(Approx(taus_rs.tauovermass) == 0.2);
26  CHECK(Approx(taus_rs.oneover2tau) == 2.5);
27  CHECK(Approx(taus_rs.sqrttau) == 0.447213595499957927703605);
28 
29  TauParams<QMCTraits::RealType, CoordsType::POS_SPIN> taus_rsspins(tau, invmass, spin_mass);
30  CHECK(Approx(taus_rsspins.spin_tauovermass) == 0.4);
31  CHECK(Approx(taus_rsspins.spin_oneover2tau) == 1.25);
32  CHECK(Approx(taus_rsspins.spin_sqrttau) == 0.632455532033675882352952);
33 }
34 
35 } // namespace qmcplusplus
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
TEST_CASE("complex_helper", "[type_traits]")
Object to encapsulate appropriate tau derived parameters for a particular CoordsType specialization...
Definition: TauParams.hpp:25
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))