QMCPACK
SetupDMCTest Class Reference
+ Inheritance diagram for SetupDMCTest:
+ Collaboration diagram for SetupDMCTest:

Public Member Functions

 SetupDMCTest (int nranks=4)
 
DMCBatched operator() ()
 
- Public Member Functions inherited from SetupPools
 SetupPools ()
 

Public Attributes

WalkerConfigurations walker_confs
 
Libxml2Document doc
 
xmlNodePtr node
 
int num_ranks
 
int num_crowds = 8
 
QMCDriverInput qmcdrv_input
 
DMCDriverInput dmcdrv_input
 
- Public Attributes inherited from SetupPools
UPtr< ParticleSetPoolparticle_pool
 
UPtr< WaveFunctionPoolwavefunction_pool
 
UPtr< HamiltonianPoolhamiltonian_pool
 
Libxml2Document doc
 
xmlNodePtr node
 
Communicatecomm
 

Private Attributes

ProjectData test_project
 

Detailed Description

Definition at line 28 of file SetupDMCTest.h.

Constructor & Destructor Documentation

◆ SetupDMCTest()

SetupDMCTest ( int  nranks = 4)
inline

Definition at line 31 of file SetupDMCTest.h.

References SetupDMCTest::num_crowds.

31  : num_ranks(nranks), qmcdrv_input()
32  {
33  if (Concurrency::maxCapacity<>() < 8)
34  num_crowds = Concurrency::maxCapacity<>();
35  }

Member Function Documentation

◆ operator()()

DMCBatched operator() ( )
inline

Definition at line 37 of file SetupDMCTest.h.

References SetupPools::comm, SetupDMCTest::dmcdrv_input, SetupDMCTest::doc, Libxml2Document::getRoot(), SetupPools::hamiltonian_pool, SetupDMCTest::node, Libxml2Document::parseFromString(), SetupPools::particle_pool, SetupDMCTest::qmcdrv_input, Communicate::rank(), DMCDriverInput::readXML(), QMCDriverInput::readXML(), Communicate::size(), SetupDMCTest::test_project, qmcplusplus::testing::valid_dmc_input_dmc_batch_index, qmcplusplus::testing::valid_dmc_input_sections, SetupDMCTest::walker_confs, and SetupPools::wavefunction_pool.

38  {
41  node = doc.getRoot();
42 
45 
46  QMCDriverInput qmc_input_copy(qmcdrv_input);
47  DMCDriverInput dmc_input_copy(dmcdrv_input);
48  return {test_project,
49  std::move(qmc_input_copy),
50  std::nullopt,
51  std::move(dmc_input_copy),
53  MCPopulation(comm->size(), comm->rank(), particle_pool->getParticleSet("e"),
54  wavefunction_pool->getPrimary(), hamiltonian_pool->getPrimary()),
55  comm};
56  }
class that handles xmlDoc
Definition: Libxml2Doc.h:76
int rank() const
return the rank
Definition: Communicate.h:116
UPtr< ParticleSetPool > particle_pool
Definition: SetupPools.h:33
xmlNodePtr getRoot()
Definition: Libxml2Doc.h:88
UPtr< HamiltonianPool > hamiltonian_pool
Definition: SetupPools.h:35
int size() const
return the number of tasks
Definition: Communicate.h:118
WalkerConfigurations walker_confs
Definition: SetupDMCTest.h:62
UPtr< WaveFunctionPool > wavefunction_pool
Definition: SetupPools.h:34
constexpr int valid_dmc_input_dmc_batch_index
void readXML(xmlNodePtr cur)
Reads qmc section xml node parameters.
bool parseFromString(const std::string_view data)
Definition: Libxml2Doc.cpp:204
constexpr std::array< const char *, 3 > valid_dmc_input_sections
void readXML(xmlNodePtr xml_input)

Member Data Documentation

◆ dmcdrv_input

DMCDriverInput dmcdrv_input

Definition at line 71 of file SetupDMCTest.h.

Referenced by SetupDMCTest::operator()().

◆ doc

Definition at line 64 of file SetupDMCTest.h.

Referenced by SetupDMCTest::operator()().

◆ node

xmlNodePtr node

Definition at line 65 of file SetupDMCTest.h.

Referenced by SetupDMCTest::operator()().

◆ num_crowds

int num_crowds = 8

Definition at line 68 of file SetupDMCTest.h.

Referenced by SetupDMCTest::SetupDMCTest().

◆ num_ranks

int num_ranks

Definition at line 67 of file SetupDMCTest.h.

◆ qmcdrv_input

QMCDriverInput qmcdrv_input

Definition at line 70 of file SetupDMCTest.h.

Referenced by SetupDMCTest::operator()().

◆ test_project

ProjectData test_project
private

Definition at line 59 of file SetupDMCTest.h.

Referenced by SetupDMCTest::operator()().

◆ walker_confs

WalkerConfigurations walker_confs

Definition at line 62 of file SetupDMCTest.h.

Referenced by SetupDMCTest::operator()().


The documentation for this class was generated from the following file: