QMCPACK
LinearMethodTestSupport Class Reference
+ Collaboration diagram for LinearMethodTestSupport:

Public Member Functions

 LinearMethodTestSupport (const std::vector< int > &walkers_per_crowd, Communicate *comm)
 
std::vector< QMCCostFunctionBase::Return_rt > & getSumValue ()
 
Matrix< QMCCostFunctionBase::Return_rt > & getRecordsOnNode ()
 
Matrix< QMCCostFunctionBase::Return_t > & getDerivRecords ()
 
Matrix< QMCCostFunctionBase::Return_rt > & getHDerivRecords ()
 
void set_samples_and_param (int nsamples, int nparam)
 

Public Attributes

int numSamples
 
int numParam
 
SampleStack samples
 
const SimulationCell simulation_cell
 
MCWalkerConfiguration w
 
QMCHamiltonian h
 
RuntimeOptions runtime_options_
 
TrialWaveFunction psi = TrialWaveFunction(runtime_options_)
 
QMCCostFunctionBatched costFn
 

Detailed Description

Definition at line 52 of file test_QMCCostFunctionBatched.cpp.

Constructor & Destructor Documentation

◆ LinearMethodTestSupport()

Member Function Documentation

◆ getDerivRecords()

Matrix<QMCCostFunctionBase::Return_t>& getDerivRecords ( )
inline

◆ getHDerivRecords()

◆ getRecordsOnNode()

◆ getSumValue()

std::vector<QMCCostFunctionBase::Return_rt>& getSumValue ( )
inline

Definition at line 69 of file test_QMCCostFunctionBatched.cpp.

References LinearMethodTestSupport::costFn, and QMCCostFunctionBase::SumValue.

Referenced by qmcplusplus::fill_from_text(), and qmcplusplus::TEST_CASE().

69 { return costFn.SumValue; }
std::vector< Return_rt > SumValue
Sum of energies and weights for averages.

◆ set_samples_and_param()

void set_samples_and_param ( int  nsamples,
int  nparam 
)
inline

Definition at line 74 of file test_QMCCostFunctionBatched.cpp.

References LinearMethodTestSupport::costFn, LinearMethodTestSupport::getDerivRecords(), LinearMethodTestSupport::getHDerivRecords(), LinearMethodTestSupport::getRecordsOnNode(), VariableSet::insert(), QMCCostFunctionBase::NumOptimizables, LinearMethodTestSupport::numParam, LinearMethodTestSupport::numSamples, QMCCostFunctionBase::OptVariables, QMCCostFunctionBatched::rank_local_num_samples_, and QMCCostFunctionBase::SUM_INDEX_SIZE.

Referenced by qmcplusplus::fill_from_text(), and qmcplusplus::TEST_CASE().

75  {
76  numSamples = nsamples;
77  numParam = nparam;
78 
80 
81  for (int i = 0; i < nparam; i++)
82  {
83  std::string varname = "var" + std::to_string(i);
84  costFn.OptVariables.insert(varname, 1.0);
85  }
86 
88 
92  }
Matrix< QMCCostFunctionBase::Return_rt > & getHDerivRecords()
int NumOptimizables
total number of optimizable variables
opt_variables_type OptVariables
list of optimizables
Matrix< QMCCostFunctionBase::Return_rt > & getRecordsOnNode()
void insert(const std::string &vname, real_type v, bool enable=true, int type=OTHER_P)
Definition: VariableSet.h:133
Matrix< QMCCostFunctionBase::Return_t > & getDerivRecords()

Member Data Documentation

◆ costFn

◆ h

Definition at line 60 of file test_QMCCostFunctionBatched.cpp.

◆ numParam

int numParam

◆ numSamples

int numSamples

◆ psi

◆ runtime_options_

RuntimeOptions runtime_options_

Definition at line 61 of file test_QMCCostFunctionBatched.cpp.

◆ samples

SampleStack samples

Definition at line 57 of file test_QMCCostFunctionBatched.cpp.

◆ simulation_cell

const SimulationCell simulation_cell

Definition at line 58 of file test_QMCCostFunctionBatched.cpp.

◆ w


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