QMCPACK
test_fixed_node_branch.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) 2018 Jeongnim Kim and QMCPACK developers.
6 //
7 // File developed by: Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
8 //
9 // File created by: Mark Dewing, mdewing@anl.gov, Argonne National Laboratory
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
13 #include "catch.hpp"
14 
15 
17 #include "OhmmsData/Libxml2Doc.h"
18 #include "OhmmsPETE/OhmmsMatrix.h"
19 #include "Particle/ParticleSet.h"
23 
24 
25 #include <stdio.h>
26 #include <string>
27 #include <random>
28 
29 
30 using std::string;
31 
32 namespace qmcplusplus
33 {
34 TEST_CASE("Fixed node branch", "[drivers][walker_control]")
35 {
37 
38  auto emb_uptr = std::make_unique<EstimatorManagerBase>(c);
39  auto emb = emb_uptr.get();
40 
41  double tau = 0.5;
42  int nideal = 1;
43  SimpleFixedNodeBranch fnb(tau, nideal);
44 
45  fnb.setEstimatorManager(std::move(emb_uptr));
46  REQUIRE(fnb.getEstimatorManager() == emb);
47 
48  CHECK(fnb.getTau() == Approx(tau));
49 
50  fnb.advanceQMCCounter();
52 
53  // default is classic cutoff scheme
54  //fnb.setBranchCutoff();
55 }
56 
57 } // namespace qmcplusplus
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
TEST_CASE("complex_helper", "[type_traits]")
EstimatorManagerBase * getEstimatorManager()
get the EstimatorManager
void advanceQMCCounter()
increment QMCCounter
Communicate * Controller
Global Communicator for a process.
Definition: Communicate.cpp:35
Wrapping information on parallelism.
Definition: Communicate.h:68
Manages the state of QMC sections and handles population control for DMCs.
REQUIRE(std::filesystem::exists(filename))
Manager class of scalar estimators.
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
declare a handler of DMC branching
void setEstimatorManager(std::unique_ptr< EstimatorManagerBase > est)
set the EstimatorManager
Declare a global Random Number Generator.
Declaration of a MCWalkerConfiguration.