![]() |
QMCPACK
|
Testing class breaking EstimatorManagerNew encapsultation. More...
Public Types | |
using | QMCT = QMCTraits |
Public Member Functions | |
EstimatorManagerNewTest (const QMCHamiltonian &ham, Communicate *comm, int ranks) | |
void | fakeMainScalarSamples () |
Quickly add main scalar samples using FakeEstimator mock estimator. More... | |
void | fakeScalarSamplesAndCollect () |
Quickly add scalar samples using FakeEstimator mock estimator. More... | |
void | fakeSomeOperatorEstimatorSamples (int rank) |
Quickly add scalar samples using FakeOperatorEstimator mock estimator. More... | |
void | collectMainEstimators () |
call private EMB method and collect EMBTs estimators_ as main_estimators More... | |
void | collectScalarEstimators () |
call private EMB method and colelct EMBTs estimators_ More... | |
void | collectOperatorEstimators () |
reduce the OperatorEstimators onto the EstimatorManagerNew copy. More... | |
std::vector< QMCT::RealType > | generateGoodOperatorData (int num_ranks) |
for mpi test (it's trivial for 1 rank) More... | |
bool | testReplaceMainEstimator () |
test replacing the main estimator More... | |
bool | testMakeBlockAverages () |
void | testReduceOperatorEstimators () |
std::vector< QMCT::RealType > & | get_operator_data () |
Public Attributes | |
EstimatorManagerNew | em |
Private Attributes | |
Communicate * | comm_ |
std::vector< FakeEstimator > | estimators_ |
std::vector< RefVector< ScalarEstimatorBase > > | scalar_estimators_ |
Testing class breaking EstimatorManagerNew encapsultation.
Wraps EstimatorManagerNew
Definition at line 30 of file EstimatorManagerNewTest.h.
Definition at line 33 of file EstimatorManagerNewTest.h.
EstimatorManagerNewTest | ( | const QMCHamiltonian & | ham, |
Communicate * | comm, | ||
int | ranks | ||
) |
Definition at line 24 of file EstimatorManagerNewTest.cpp.
References qmcplusplus::app_log(), EstimatorManagerNewTest::comm_, qmcplusplus::num_ranks, and Communicate::size().
void collectMainEstimators | ( | ) |
call private EMB method and collect EMBTs estimators_ as main_estimators
Definition at line 147 of file EstimatorManagerNewTest.cpp.
References EstimatorManagerNew::collectMainEstimators(), EstimatorManagerNewTest::em, and EstimatorManagerNewTest::estimators_.
Referenced by qmcplusplus::TEST_CASE().
void collectOperatorEstimators | ( | ) |
reduce the OperatorEstimators onto the EstimatorManagerNew copy.
void collectScalarEstimators | ( | ) |
call private EMB method and colelct EMBTs estimators_
void fakeMainScalarSamples | ( | ) |
Quickly add main scalar samples using FakeEstimator mock estimator.
Definition at line 52 of file EstimatorManagerNewTest.cpp.
References EstimatorManagerNewTest::em, EstimatorManagerNewTest::estimators_, EstimatorManagerNew::get_AverageCache(), ScalarEstimatorBase::scalars, and ScalarEstimatorBase::scalars_saved.
Referenced by qmcplusplus::TEST_CASE().
void fakeScalarSamplesAndCollect | ( | ) |
Quickly add scalar samples using FakeEstimator mock estimator.
Definition at line 76 of file EstimatorManagerNewTest.cpp.
References EstimatorManagerNew::addScalarEstimator(), EstimatorManagerNew::collectScalarEstimators(), EstimatorManagerNewTest::em, EstimatorManagerNewTest::estimators_, EstimatorManagerNew::get_AverageCache(), EstimatorManagerNewTest::scalar_estimators_, ScalarEstimatorBase::scalars, and ScalarEstimatorBase::scalars_saved.
Referenced by qmcplusplus::TEST_CASE().
void fakeSomeOperatorEstimatorSamples | ( | int | rank | ) |
Quickly add scalar samples using FakeOperatorEstimator mock estimator.
Definition at line 120 of file EstimatorManagerNewTest.cpp.
References EstimatorManagerNewTest::comm_, qmcplusplus::crowd, EstimatorManagerNewTest::em, OperatorEstBase::get_data(), EstimatorManagerNew::operator_ests_, qmcplusplus::rank, FakeOperatorEstimator::set_walker_weights(), and Communicate::size().
std::vector< QMCTraits::RealType > generateGoodOperatorData | ( | int | num_ranks | ) |
for mpi test (it's trivial for 1 rank)
only used by test_manager_mpi.cpp so implemented there.
Definition at line 133 of file EstimatorManagerNewTest.cpp.
References qmcplusplus::num_ranks.
|
inline |
Definition at line 59 of file EstimatorManagerNewTest.h.
References EstimatorManagerNewTest::em, and EstimatorManagerNew::operator_ests_.
bool testMakeBlockAverages | ( | ) |
Definition at line 24 of file test_manager_mpi.cpp.
References EstimatorManagerNew::acceptRatioInd, RecordNamedProperty< T >::add(), EstimatorManagerNew::BlockProperties, EstimatorManagerNew::collectMainEstimators(), EstimatorManagerNew::cpuInd, EstimatorManagerNewTest::em, EstimatorManagerNewTest::estimators_, EstimatorManagerNew::makeBlockAverages(), EstimatorManagerNew::my_comm_, EstimatorManagerNew::PropertyCache, Communicate::rank(), Vector< T, Alloc >::resize(), RecordNamedProperty< T >::size(), and EstimatorManagerNew::weightInd.
void testReduceOperatorEstimators | ( | ) |
Definition at line 153 of file EstimatorManagerNewTest.cpp.
References EstimatorManagerNewTest::em, and EstimatorManagerNew::reduceOperatorEstimators().
bool testReplaceMainEstimator | ( | ) |
test replacing the main estimator
Definition at line 34 of file EstimatorManagerNewTest.cpp.
References EstimatorManagerNew::addMainEstimator(), qmcplusplus::CHECK(), EstimatorManagerNewTest::em, and EstimatorManagerNew::main_estimator_.
Referenced by qmcplusplus::TEST_CASE().
|
private |
Definition at line 63 of file EstimatorManagerNewTest.h.
Referenced by EstimatorManagerNewTest::EstimatorManagerNewTest(), and EstimatorManagerNewTest::fakeSomeOperatorEstimatorSamples().
Definition at line 61 of file EstimatorManagerNewTest.h.
Referenced by EstimatorManagerNewTest::collectMainEstimators(), EstimatorManagerNewTest::fakeMainScalarSamples(), EstimatorManagerNewTest::fakeScalarSamplesAndCollect(), EstimatorManagerNewTest::fakeSomeOperatorEstimatorSamples(), EstimatorManagerNewTest::get_operator_data(), qmcplusplus::if(), qmcplusplus::TEST_CASE(), EstimatorManagerNewTest::testMakeBlockAverages(), EstimatorManagerNewTest::testReduceOperatorEstimators(), and EstimatorManagerNewTest::testReplaceMainEstimator().
|
private |
|
private |
Definition at line 65 of file EstimatorManagerNewTest.h.
Referenced by EstimatorManagerNewTest::fakeScalarSamplesAndCollect().