47 double block_weight = 0;
49 [&block_weight](
auto& est) { block_weight += est.scalars[0].count(); });
57 unsigned long accepts = 4;
58 unsigned long rejects = 1;
65 TEST_CASE(
"EstimatorManagerNew::makeBlockAverages()",
"[estimators]")
89 TEST_CASE(
"EstimatorManagerNew::reduceOperatorestimators()",
"[estimators]")
108 for (
size_t i = 0; i < test_data.size(); ++i)
111 if (norm_good_data != test_data[i])
113 FAIL_CHECK(
"norm_good_data " << norm_good_data <<
" != test_data " << test_data[i] <<
" at index " << i);
void resize(size_type n, Type_t val=Type_t())
Resize the container.
void fakeSomeOperatorEstimatorSamples(int rank)
Quickly add scalar samples using FakeOperatorEstimator mock estimator.
void makeBlockAverages(unsigned long accept, unsigned long reject)
collect data and write
helper functions for EinsplineSetBuilder
int rank() const
return the rank
QTBase::RealType RealType
Declaration of OutputManager class.
TEST_CASE("complex_helper", "[type_traits]")
Collection of Local Energy Operators.
int weightInd
index for the block weight PropertyCache(weightInd)
std::vector< QMCTraits::RealType > good_data
Testing class breaking EstimatorManagerNew encapsultation.
void fakeMainScalarSamples()
Quickly add main scalar samples using FakeEstimator mock estimator.
Communicate * Controller
Global Communicator for a process.
int size() const
return the number of tasks
Wrapping information on parallelism.
void testReduceOperatorEstimators()
int acceptRatioInd
index for the accept counter PropertyCache(acceptInd)
double norm(const zVec &c)
int add(const std::string &aname)
int cpuInd
index for the block cpu PropertyCache(cpuInd)
Vector< RealType > PropertyCache
cached block averages of properties, e.g. BlockCPU
testing::EstimatorManagerNewTest embt(ham, c, 1)
void collectMainEstimators(const RefVector< ScalarEstimatorBase > &scalar_estimators)
At end of block collect the main scalar estimators for the entire rank.
std::vector< QMCT::RealType > & get_operator_data()
auto & get_AverageCache()
std::vector< FakeEstimator > estimators_
std::vector< std::reference_wrapper< T > > RefVector
CHECK(log_values[0]==ComplexApprox(std::complex< double >{ 5.603777579195571, -6.1586603331188225 }))
Communicate * my_comm_
communicator to handle communication
bool testMakeBlockAverages()
RecordNamedProperty< RealType > BlockProperties
manager of property data
std::vector< QMCT::RealType > generateGoodOperatorData(int num_ranks)
for mpi test (it's trivial for 1 rank)
Declaration of QMCHamiltonian.